PayPal Express Checkout and Ruby on Rails

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,, 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), ""%>

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.

Leave a Comment