Lan
Lan

Reputation: 1892

form hidden field paypal - simple

ok, so i have a form with several fields; company name, description, etc. when thats filled in you click 'Preview', that takes you to the preview page to see what your profile will look like, if you're happy with that you click 'buy now' which takes you to the paypal page, you pay, (IPN sent to my/ipn.php page) and then go back to my site/success.php which just says "success blah blah etc"

my question is; how do i retrieve all that form data in my ipn.php page?

you can do it with Sessions, but im sure there's a way with hidden fields, its just that the paypal paying page gets in the way

thanks

Upvotes: 0

Views: 237

Answers (2)

Tommy
Tommy

Reputation: 25

You can only pass through one custom variable to paypal. You could pass through the unique id of the data in the database and retrieve it in your IPN listener.

Upvotes: 1

Fluffeh
Fluffeh

Reputation: 33532

You would be better off using sessions or storing the data in a database. Forms can lose their information too easily, the user refreshes a page and you get into trouble or the user clicks on a link and then the information is lost (unless the user is savvy enough to click back back back until the right page is available again).

Sessions will allow you to manipulate the data nicely and you can reference it. Storing a unique ID in a session and saving the data to a database might be even better - and you certainly know that it won't go walking...

Upvotes: 1

Related Questions