I am wondering how to do the same thing...
If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!Hey all,
Could I use PayPal's Instant Payment Notification to have it run a PHP script and pass some variables through the transaction?
What I want to do is have an entry updated in the database after the payment was SUCCSSFUL, and I need a row ID, a transaction ID, and some other things.
How can I keep these vars through the process and use them after a successful/cancelled payment?
Thanks,
-Matt
I am wondering how to do the same thing...
When the Paypal IPN hits your site, it passes back a whole slew of variables.
Log into your account, goto your profile, click on "Instant Payment Notification Preferences". There should be a link in there to the documentation. Once you get the documentation, there is a chapter for "IPN Variables". This is probably what you want.
After Paypal posts back to your server, the only way to keep the variables from the post is to store them in a database. Its quite simple to take the data from the feed and store them (or do whatever based on the result of the payment).
-Bob
. . .
One word of warning -- the variables are separated by commas, AND Paypal puts comma in dollar amounts over $1,000, which breaks everything. The variables are not in a set order, either.
If anyone knows how to handle this properly, let me know.
I do not believe this to be the case. In all of my experiences, the data have been POSTED back to the URL that I specified. You can simply grab all of the variables out of the environment (e.g $_POST[] in PHP or use CGI in PERL). You can simply loop through the posted variables, build your confirmation string and post it back. Once you get the validated resonse, you can update your database accordingly. Commas in the data should not matter at all. . .
-Bob
. . .
Are you sure you have dealt with payments > $1,000? It all works fine until you get that comma.Originally Posted by Bob
Wow, this was an interesting read...
If this comma thing can be sorted out I'll be very happy! ^_^
it's considered bad systems to let the bugs out!Originally Posted by JuniperPark
I don't think PayPal's programmers are that inexperienced for this simple thing.
Big guys always have teams of system analysts, programmers, testers, QAs, etc. for their system.
Bookmarks