Thursday, February 17, 2011

Mock testing Paypal's IPN with Rails

In the previous article "Using Paypal with Rails":http://ping.fm/rb7Or we showed how to implement a Paypal form using some of the Rails magic. What's equally important to the actual form, is, well ...testing it. Transactions are about customer's money so you can't rely on point and click testing. Up until the redirection of the user to the Paypal gateway, testing can be done like usual, using the build-in mechanisms Rails provides. What you *can't* test in an automated way is Paypal's IPN call back. And you can't test it because Paypal's sandbox is unreliable. It can fire the call back after 2 seconds or 2 hours or 2 years. http://ping.fm/bduzT

No comments:

Post a Comment