Authorize.net PHP会话变量被删除

I am having an issue with transfering PHP session variables after a payment is processed by my payment gateway. I have a payment page hosted on my server which submits to an SSL page to be processed on another domain (authorize.net).

The payment gateway then returns a variable to indicate whether or not the payment was a success. However, on some browsers the session variables don't carry through after the domain redirect, so I can't update the user's info in the database to reflect the purchase. What could be a cause of this?

You have two options:

  1. Use Silent Post. Silent Post is Authorize.Net's equivalent of Paypal's IPN. Silent Post will allow you to retrieve the information from each transaction "in the background" so you can update your database accordingly. Implementing it in PHP is easy to do. (Disclaimer, I wrote broke articles)

  2. You can pass the session ID as a hidden field to the payment page and then when the user is redirected back to your site you can restart the session by passing it as a parameter to session_id() which will restart the session.