11-07-2007, 11:10 PM
I've been researching the paypal developer API and either their documentation is crappy or I'm just not reading the right stuff.
What I'm building is a simple subscription based system. Someone enters their credit card information along with their account username and what not and they're automatically given an account on the website upon a successful transaction.
I've found the paypal developer center but the scripts I downloaded off the site don't really help me all that much. Are there any good tutorials for a system like the one I'm trying to build?
11-07-2007, 11:25 PM
I recently waded my way through the Paypal docs to accomplish a similar thing-- subscription-based payment.
I eventually became familiar with the jargon which helped a ton in knowing what the docs were talking about.
Generally, you want to use one of two Paypal features (or both) to verify payment. The first is called PDT (https://www.paypal.com/IntegrationCenter/ic_pdt.html) (Payment Data Transfer) and is the method by which Paypal returns your customer from the Paypal website to your website after payment. Look at the diagram on the page I linked; it explains it pretty well.
The second method is IPN (https://www.paypal.com/IntegrationCenter/ic_ipn.html)(Instant Payment Notification). This is a secondary process that Paypal offers which is separate from the customer's experience and is the "real" function that you use to verify a payment was actually made. Paypal sends an IPN after receiving a payment (or other transaction) via an HTTP POST request. You simply (I say simply but it's not that simple haha), simply "catch" the HTTP POST request with a script written to do nothing but sit there and wait for requests to be thrown at it. Paypal gives example code (which in my opinion is horribly written but it does work) on how to catch and process an HTTP POST request sent by Paypal. Here's the link to the sample scripts:
11-08-2007, 11:55 PM
So, when I send the transaction ID back to paypal using the PDT method when you get a successful reply from paypal and display the transaction details is that when I would create the users account?