Rich Cooke
Rich Cooke

Reputation: 11

Mechanism to store a session variable during Paypal IPN transaction

I've looked for hours for an workable answer to this without any luck so here is my question/issue:

I have a page with a form that has a Paypal generated Pay Now button with a drop down with 3 choices. The user clicks on one of the three choices which are priced $7, $14 and $20. The user is paying for a service and after paying on the Paypal site they will be uploading 1, 2 or 3 files depending on their choice.

I need a way to capture the choice so I can send them to one of 3 pages. I think I understand the the normal $_SESSION variable won't work when using Paypal according to this answer: Get information from PayPal after a transaction

I still don't understand what the proper way to do this is. What method is recommended? Should I use a DB to store the transaction data and then in the return page read back the data?

Any advice will be greatly appreciated.

Upvotes: 0

Views: 175

Answers (1)

user207421
user207421

Reputation: 310884

You don't need to capture session information to accomplish this. You can just set the return_url variable accordingly in the form. You can also add arguments to the URL to transmit context.

Upvotes: 1

Related Questions