I’m trying to add a payment method to working website that is using a wordpress auction plugin. The output should be that for every bid made, the user MUST pay a certain fee.
The question is: how to create a function, which:
- receives the information
- send the user to an external payment page
- receive the answer from the payment page (can take some time because the users manually enter the information.
- save the information to the database.
the 2nd and 3rd stages are a problem for me.
You can’t do it because a PHP script execution typically runs only during one request. It’s not possible to forward the user, suspend the execution of the script, and then continue with the same script.
A solution typically involves: