Page 1 of 1
Paypal: Act Immediately after Payment
Posted: Fri Apr 29, 2011 2:05 pm
by Jonah Bron
Hello, world!
I'm trying to accept payments for license keys with the Paypal "Buy Now" button. I need to securely make sure that the correct amount was successfully paid, and subsequently generate a license key. Does anyone know of any good tutorials on this? Otherwise, how can this be done?
Re: Paypal: Act Immediately after Payment
Posted: Fri Apr 29, 2011 2:38 pm
by incubi
Re: Paypal: Act Immediately after Payment
Posted: Fri Apr 29, 2011 4:36 pm
by califdon
I've never used the Buy Now buttons, but their slightly more complex IPN (Instant Payment Notification) method sends an almost immediate set of POST data to a URL that you designate, which would seem to do what you want. PayPal's online/downloadable documentation is voluminous, but I found it to be somewhat out-of-date in some of the details, which makes it unreliable. This might help:
https://cms.paypal.com/us/cgi-bin/?cmd= ... lvariables and you should find much more experienced help on their community forums:
https://www.x.com/docs/DOC-1613.
Re: Paypal: Act Immediately after Payment
Posted: Fri Apr 29, 2011 4:55 pm
by Jonah Bron
I was hoping that I could directly confirm payment upon return to my site, but it looks like the "Buy Now" button doesn't support that. I'm going with Express Checkout.
Edit: update, apparently Express Checkout doesn't allow credit card payments. Guess I'll be going with IPN.
Re: Paypal: Act Immediately after Payment
Posted: Fri Apr 29, 2011 7:54 pm
by Jonah Bron
Okay, I answered my own question. The answer is Payment Data Transfer.
http://www.x.com/docs/DOC-1449
Re: Paypal: Act Immediately after Payment
Posted: Fri Apr 29, 2011 9:48 pm
by califdon
Note that the first paragraph of that reference says, "PDT is not meant to be used with credit card or Express Checkout transactions." I had a lot of difficulty trying to understand their various transaction options and settled on a combination of PDT and IPN, which seems to be a popular choice of developers. There are subtle issues to some of the transactions, such as what happens if a customer jumps to another site or shuts down his browser before the transaction is completed. It's quite possible to lose a confirmation or transaction if you don't have a clear picture of how their system operates. It's a rather nice system, IMHO, with several good features, but it wasn't easy for me to follow all the transaction logic and keep it straight as I tried to apply it to my project. That was a couple of years ago and now I would have to study it all again to understand it. (But it's still working!)

Re: Paypal: Act Immediately after Payment
Posted: Fri Apr 29, 2011 10:12 pm
by Jonah Bron
So, if they use their credit card, data isn't transmitted via PDT? I'm using Web Payment Standard.
They're system is downright confusing; frankly, I can't figure out why Express Checkout and Web Payment Standard are two different things. They're so similar

Re: Paypal: Act Immediately after Payment
Posted: Sat Apr 30, 2011 1:54 pm
by califdon
Yeah, that's the sort of thing I had trouble with, too. If you haven't already done so, I recommend that you spend some time in their forums. They aren't always very responsive, but sometimes are, and by poking around you will probably find that others have stumbled over the same issues, and I was able to find answers to several of my questions that way. One thing is sure: the only way you'll ever figure out how it really works is to try some transactions and capture the data it returns. Then it starts to make more sense. I think the big issue is that they offer so many different solutions to so many different kinds of users. Some want a shopping cart, some want subscriptions, some want a simple button for just one product, etc. So the whole process is burdened with a bunch of features and probably nobody wants ALL of them.
Re: Paypal: Act Immediately after Payment
Posted: Sat Apr 30, 2011 10:41 pm
by Jonah Bron
Hm, well, I'm glad their sandbox makes testing easy. Lets see if I can't make these lemons into some pomegranate juice
