Reputation:
I'm going to be selling something on my site soon.
When a user chooses to buy the product, they will fill in a short HTML form and then be taken to PayPal to make the payment.
What I'm trying to do is send all the data from the form to the database, but after the PayPal payment has been successfully processed. So i was wondering if i could like carry the form input data a few pages before it actually gets submitted.
Any help is much appreciated
Thanks
Upvotes: 0
Views: 2227
Reputation: 371
Paypal allows you to have "pass-through" variables.
Full variables and references list here
Upvotes: 0
Reputation: 10721
A better way would be to store the information right away, but with a flag 'paid' set to false.
Then when they come back from paypal (or i believe paypal has some way of notifying you) you can set that transaction's 'paid' to true.
This a) cuts down on the information that needs to be ushered around, and b) cuts down on the users's ability to corrupt data.
Upvotes: 1