Ruby On Rails, Design, Simplicity, Web 2.0, Ajax, Mac and Tons of Pizza.

Jul 26

PayPal Express Checkout and Ruby on Rails

Posted by Sandro Paganotti in Ruby on Rails - comments are closed digg this add to delicious

While working on the payment system solution for Whodoes we had to face the big challenge every online shop has to:

How can I connect and dialogate with my favourite payment gateway ?

Plus, having a company located in Italy means that you cannot use a lot of Americans and British payments gateway ( PayFlow, Authorize.net, and more… ) and you have to choose between a very few solutions. Finally we decided to use the PayPal Express Checkout payment system and we started looking around for sample code and plugins.

The first plugin we found was ActiveMerchant that covers a wide variety of payments gateway and at the first look seemed the right choice for us. Unfortunately the documentation related to this plugin is still in heavy development and the only sample we found about a PayPal Express Checkout payment with ActiveMerchant was very difficult to understand.

In the meanwhile I found that the same ActiveMerchant author Jaded Pixel had developed a plugin specifically designed for PayPal payments that is no longer supported because integrated into ActiveMerchant. However it is possible to download the latest version from the JadedPixel software repository ( I’m sorry I lost that url and google didn’t helped me in recovering) and also from here

This plugin is very easy to use, for exampe to create a form that redirect to paypal:


<%= paypal_form_tag %>
     <%= paypal_setup "Test", Money.us_dollar(9000), "demo@demoaccount.com"%>  

     Please press here to pay $90US using paypal. <br/>
     <%= submit_tag "Go to paypal >>" %>

<% end_form_tag %> 

You can also handle IPN functionalities and cryptografich payment transmissions (everything is well documented in the plugin RDoc documentation)

In a nutshell, I found this plugin understandable and useful and I think that until ActiveMerchant will be properly documented this is the best solution avaiable for Paypal Express Checkout payments.

Comments

  • Mooktakim

    Posted on August 15

    How do you use this for subscriptions? I haven't found any information where i can use activemerchant or this plugin to work with subcription based payments. I just don't know it it works with rails. Can i use IPN with it?
  • sandro

    Posted on August 20

    I think that you actually cannot use this plugin for subscription based payments. However I'm not really sure as actually I've used it just for one-time Express Checkout Payments.
  • Eric Pugh

    Posted on October 17

    I am down deep in the weeds of ActiveMerchant as well. We used the "paypal" plugin and had the integration done in a day, but I wanted to leverage ActiveMerchant for future integrations and have the same frustrations. I think though that with the lack of docs, that I may be better off sticking with "paypal" plugin. ARgh.

Post a comment

Categories:

Tags:

Powered by Mephisto, Valid XHTML 1.1, Valid CSS - Supported by Wave Factory