PDA

View Full Version : PHP Paypal IPN



Tsid
May 30th, 2008, 04:49 PM
Just wondering if anyone had any experience with using Paypal IPN in a subscription fee-based website, and how abouts to implement it. I read up that I need PEAR DB, but is it absolutely necessary? Thanks.

mattrock23
May 30th, 2008, 11:38 PM
I just set up a site with IPN, it's pretty simple once you get it all. I did not use PEAR. The site I set it up for does not use subscriptions, just one time payments. Shouldn't be too different.

Basically, Paypal POSTs some variables to a script of your choice. Your script must post them back and get another response from Paypal. They give sample scripts. I just edited the sample script to do what I want upon a successful response.

The tough part is troubleshooting. Since the script is not actually sent to a browser you cannot use normal methods to find out what's going wrong. Plus, you have to actually send money or set up some test accounts with paypal's sandbox in order to test it.

Let us know if you have any problems.

Tsid
June 2nd, 2008, 10:06 AM
I just set up a site with IPN, it's pretty simple once you get it all. I did not use PEAR. The site I set it up for does not use subscriptions, just one time payments. Shouldn't be too different.

Basically, Paypal POSTs some variables to a script of your choice. Your script must post them back and get another response from Paypal. They give sample scripts. I just edited the sample script to do what I want upon a successful response.

The tough part is troubleshooting. Since the script is not actually sent to a browser you cannot use normal methods to find out what's going wrong. Plus, you have to actually send money or set up some test accounts with paypal's sandbox in order to test it.

Let us know if you have any problems.

I actually have a question about the sandbox, how exactly does it work? When I tried the scripts on it and pointed it to the sandbox server, it kept giving me an error saying its not found. Thanks matt!

mattrock23
June 2nd, 2008, 02:36 PM
Sounds like that may be a problem with your firewall settings. I'm not too familiar with how to resolve that though, sorry.