ruby on rails implementation for the iPayment gateway
Pull request Compare This branch is 3 commits ahead, 11 commits behind saulabs:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Ruby on Rails implementation for the european 1&1 iPayment gateway for credit card processing.

Technical documentation from iPayment: (German)

This plugin provides a simple way to implement credit card processing by providing wrappers and helpers around the 1&1 iPayment SOAP API. As the credit card data doesn't touch your application's servers, no PCI certification is needed.


See the example/ directory for some example code.

How it works

  • form_for_ipayment_auth creates a session and stores transaction data into it (amount, currency, etc.).
  • The HTML form POSTs the user entered credit card data SSL secured directly to the iPayment servers.
  • The iPayment servers will process the transaction and request the callback_url provided to form_for_ipayment_auth passing the result to it. At this point your application should handle the transaction, e.g. booking the amount to the user account if it is successful.
  • iPayment will redirect the user to success_url if the transactions succeeds or to error_url if it doesn't.
  • All this happens transparently to the user – except for a short change in the address field of the browser, he stays on your site.

How to get it work

  • Get iPayment credentials and put them into the config file. The file goes into RAILS_ROOT/config/ipayment.yml (or use a test account, see ipayment_Technik-Handbuch_2008-08.pdf page 10).
  • Implement a controller to handle callback, success and error (see controller.rb example).
  • Add a view using form_for_ipayment_auth passing it an Ipayment::Payment with payment data (see controller.rb and new.html.erb).

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add specs for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.


Copyright (c) 2009-2010 Dieter Komendera. See LICENSE for details.