user849137
user849137

Reputation:

setting up paypal payment and sending HTML form data to mysql (but after payment has been processed)

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

Answers (2)

Eric
Eric

Reputation: 371

Paypal allows you to have "pass-through" variables.

PayPal PDT.

Full variables and references list here

Upvotes: 0

helloandre
helloandre

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

Related Questions