douzhixun8393 2012-01-14 05:52
浏览 33
已采纳

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?

  • 写回答

1条回答 默认 最新

  • dongzhuo3376 2012-06-02 19:32
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?