简体   繁体   中英

Session value gets deleted after redircing with payment gateway?

My Application is using MonesterPay payment method. I am storing some user information in session variable as it will use after transaction is complete successfully. But once my transaction is complete the session values gets deleted which I have stored. Any solutions or reason there?

What I would suggest is, you first create an order id for each transaction and store it in your database, and send the ID in the request form to monsterpay as a hidden baggage field. Example -

<INPUT TYPE="HIDDEN" NAME="Option1name" VALUE="myUniqueTransactionID">
<INPUT TYPE="HIDDEN" NAME="Option1value" VALUE="12131">

These values will be passed back to your script upon the completion of the payment. You can cross check if the payment was successful by reading the response and mark the order ID as paid.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM