Payal IPN and the Sandbox

April 11th, 2006 | Tags:

Paypal‘s IPN can be frustrating at times and any programmer who’s worked with the IPN would know what the sandbox is for. It’s truly a wonderful thing. It let’s developers test out the IPN integration without having to spend anything through their own account.

I was tasked to add Paypal IPN to an online application. Everything was working fine till we got back to the notify_url part. Obviously the download of files was to be activated only after paypal confirmed the transaction. No matter how hard I tried paypal wouldn’t confirm the transaction. After about an hour of doing everything I was about to give up when I realised that since the payment was being made on the sandbox, the sandbox should be asked for verification and not the live system. Wala! It worked. It was a really stupid mistake…

To confirm the transaction all you need to do is this:
1) When paypal posts to your notify_url, send back all the data back to Paypal using GET.
2) Paypal will return “VERIFIED” if the transaction is valid.

Thats it.

It’s a very good idea to confirm all your transactions with paypal to prevent all fraud. I know of a few download scripts which don’t do that but it’s neccessary to do so whenever you’re using the “custom” field to ask the paypal system to send back some data to your scripts. If you’re using a script which doesn’t do so I highly suggest you get someone to code it in for you.

Share and Enjoy:
  • del.icio.us
  • Google Bookmarks
  • DZone
  • Reddit
  • Digg
  • Facebook
  • Netvibes
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Print
  • Slashdot
  • Share/Bookmark

No related posts.

No comments yet.