troubleshooting Question

PHP - Javascript - Wordpress - Need help editing scripts to accomplish business needs

Avatar of Netty Admin
Netty Admin asked on
JavaScriptPHPWordPressjQuery* woo commerce
129 Comments1 Solution530 ViewsLast Modified:
Need to edit PHP script to initiate by clicking a button titled "Add Card"

Once it initiates, I need it to first run a curl call and POST the Customer ID to a specified URL.
After the POST is complete I need the script to continuously run the remainder of the script (for at least a minute) until it finds the value populated in the "order_url_string" field as it may take up to 30 seconds for the field to populate after the inital POST was completed.

The URL in the iFrame is valid for 10min. After it times out I would like another button to pop back up and allow the user to click it again to reload the process.

Also during each reload I would like the client to see a "Retrieving Secure Window..." message and some sort of time processing indicator


Currently I also have a Javascript running that displays a "Credit Card Saved Successfully" message when the card is entered correctly into the iFrame and it unhides the "Place Order" button. And if the transaction is canceled, the "Place Order" button remains hidden and I have it displaying "Credit Card Not Saved" message and directs them to call the company since there is no reload available. I would like the button to reappear for a reload at this point as well.

With this new config the client will always have the ability to get a new Credit Card window regardless if they canceled it or if it times out.

It seems like we may be able to get this working with just editing the Javascript but I will need your help with that decision
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 129 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 129 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros