Thank you!
Performing a PHP action once when the page loads
Moderator: General Moderators
Performing a PHP action once when the page loads
Hi everybody! I'm new to this forum, and to PHP...(6 months strong and counting,) and I'm having a little issue trying to get a bit of my shopping cart script to work. I have to set it up so that my quantity drops by one once someone purchases an item, but the code goes outside the site to paypal, and it doesn't seem possible. I was thinking that I could have the update occur when the success page loads, but have not been able to figure that out. Any suggestions?
Thank you!
Thank you!
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Yes, the paypal thingy is called PayPal IPN. You setup a post url where it will either post to a form, or send XML to a webservice. In the post is data about the order (depending on how your shopping cart is setup).
PayPal has really good documentation on it. They also have a nice developer sandbox and I think developer.paypal.com. That way you can setup a test cart and test out the IPN features with your script.
PayPal has really good documentation on it. They also have a nice developer sandbox and I think developer.paypal.com. That way you can setup a test cart and test out the IPN features with your script.