Paypal IPN Information
|
|
|
The system seems straightforward and Paypal provide a guide on implementation. We were asked to provide a PHP script for a customer using Paypal Buy Now buttons so that an email would be triggered automatically informing buyers about their purchase. It should have been easy but it proved to be one of the most frustrating jobs we've worked on and made us feel like complete amateurs.
|
What made it difficult was that the script isn't run directly but triggered by Paypal and therefore, if it fails, there is no error report – it either works or it doesn't. We started by trying to run it on Sandbox – the Paypal test server, which Paypal claims duplicates the live server. We couldn't get it to work on Sandbox and checking developer forums about the problem revealed that mostly everyone else couldn't either.
Other irritations included not realising that tests to Sandbox won't work if you're not logged on to the development site as well as Sandbox running so slowly that often the connection would time out. We were unsure if the problem was with the script or Paypal not calling it so we ran it directly on the customer's server to see if any syntax errors would show up. Unfortunately what we didn't know was that, for some reason, the customer's server didn't report errors on PHP scripts until we ran it on our own server to find that we did have syntax errors. |
Eventually we got the script to run on the Paypal live site and would make the following recommendations to anyone trying to implement IPN.
- Don't bother trying to use Sandbox to test IPN. If you want to try it, fine, but we couldn't get it work. Use the live site and just set the item price to a small amount so that you don't run up a big bill with tests.
- Make sure your customer has IPN switched on and that they have entered the URL of the post back script within their Paypal profile.
- Before trying to get the complete post back script to run, write a script that only contains whatever it is you want to trigger on post back. Run this script and check it works as expected.
- Use the PHP script that Paypal provide for post back (it works) then add whatever it is you want to be triggered.
© 2000-2008 smallbizonline website design Tel: 01501 771106 Privacy Policy Terms & Conditions
