Paypal Website Payments Pro with Ruby on Rails
I've been writing the billing system for DoodleKit and I finally got to the actual payment authorization piece. I chose Paypal Website Payments Pro because it seemed simple in a couple of ways. First of all their pricing structure is very easy. $20/mo + a small nominal transaction fee. Most other gateways are like $10 for the gateway $10 for the merchant account, complex transaction fees, minimum transaction fees, and a $.10 fee if the payment is made on your birthday. They also have a web service API which gave me a warm fuzzy feeling inside. Every payment gateway I've ever worked with has been a real pain in the rump.
So anyway, I had this working with PHP just fine, but now it was time to get it working with Ruby. First I tried vPayPal which seemed promising. However I actually went through many different issues, which I regrettably didn't log. Most of them where issues with my environment and not vPayPal. I finally ended up with "tlsv1 alert unknown ca". This was after I had spent at least 2 weeks on this and I felt like I was getting nowhere. I can't say that the problem was with vPayPal, I'm pretty sure it was just some weird combination of circumstances.
I thought about writing my own plugin, but I knew that would come with another set of unsavory issues. Finally I found RoR::PayPal. I just followed their instructions and poof, it worked. The thing I like about this one, other than the fact that it worked for me right away, is that it's a plugin instead of a ruby library. This way I can include it with the source code and it's deployed with the app. Also it makes it easier for running multiple apps with different configurations.
All in all I would recommend RoR::PayPal for anyone looking to use Paypal Website Payment Pro with Ruby on Rails. I would also recommend Website Payments Pro in general, as it has been fairly easy to work with.
Now if I could just get someone to try it out. Anyone want to try out the payment system? I think it would be best to test out large transactions.
Comments
| 3. | Paul Hepworth - 04 03, 2007 @ 09:29PM |
Thanks for the post. FYI, the link to the code is now http://elctech.com/projects/paypal.
It looks like they updated their blog recently.




Post a Comment