0
votes

I need to pass a variable to PayPal when someone checks out and have it pass it back when the payment is completed. Basically I need to direct the user to PayPal to pay, then, after they pay have PayPal tell me in the return url who paid so I can update their subscription in the database.

Right now, after someone registers they are directed to https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EF3UGS6GMWP56 and then after they pay, they are directed to https://culturehog.com/success

I need something more like: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EF3UGS6GMWP56?USER=467

and: https://culturehog.com/success?USER=467

Then I can have the PHP update user 467 in the database to "paid."

Does anyone have any experience with this? :/

1
I'd check for headers on the response back. It wouldn't be a good strategy for paypal not to be returning some status with the request. https://culturehog.com/success?USER=467 is not secure, someone could brute force all your users to be paid very easily.user3783243

1 Answers

1
votes