vin
vin

Reputation: 562

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?

Upvotes: 0

Views: 790

Answers (1)

Sujit Agarwal
Sujit Agarwal

Reputation: 12508

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.

Upvotes: 1

Related Questions