Skip to content
This repository

This library aims at making it easier to implement Adyen Payment services in your Ruby on Rails application.

Adyen integration relies on three modes of communication between Adyen, your server and your client/customer:

  • Client-to-Adyen communication using forms and redirects. See Payment forms
  • Adyen-to-server communications using notifications. See Notifications
  • Server-to-Adyen communication using SOAP services. See SOAP services

This library aims to ease the implementation of all these modes into your application. Moreover, it provides matchers, assertions and mocks to make it easier to implement an automated test suite to assert the integration is working correctly.

Complete RDoc documentation is available with extensive information on all methods.

Installation

  • Rails 3 / Bundler: Add gem 'adyen' to your Gemfile and run bundle install.
  • Rails 2: Add config.gem 'adyen' to your environment.rb and run rake gems:install.

This library has no dependencies. Having said that:

  • This gem will automatically use Nokogiri instead of REXML to speed up XML processing if it is available in your environment.
  • It comes with generators for Rails 3 to easily set up an integration.

Configuration

You can set configuration values using the Adyen.configuration object, e.g.:

    Adyen.configuration.environment = 'live'
    Adyen.configuration.api_username = 'me@myCompany.com'
    Adyen.configuration.api_password = '43s2df%y*|'

In Rails 3, you can alternatively use your application’s environment to configure Adyen differently for your development, test and production setup. E.g., config/environments/development.rb:

    ...
    config.adyen.api_username = 'me@myCompany.com' # etc.

All the configuration variables are documented at http://rdoc.info/github/wvanbergen/adyen/master/Adyen/Configuration.

Adyen test and live environments

Adyen offers a test and live environment. This plugin will use the live environment only if the Rails application is
running in production mode (i.e. RAILS_ENV == 'production'). You can explicitly set what environment to use if you want to override this behavior: Adyen.config.environment = :live or Adyen.config.environment = :test.

About

For more information about integrating Adyen, see their manuals and examples

This package is written by Michel Barbosa and Willem van Bergen for Floorplanner.com, and
made public under the MIT license (see LICENSE). Its is currently maintained by Willem van
Bergen, Stefan Borsje and Eloy Duran. We are not affiliated with Adyen B.V. The software
comes without warranty of any kind, so use at your own risk.

Contributions are welcomed; this is very much a scratch your own itch project. Some notes:

  • Fork the project, implement your stuff and issue a pull request. Topic branches not necessary.
  • All functionality must include tests and preferably documentation.
  • New SOAP API calls should include functional tests that actually test if the call is working. Adyen has a nasty tendency to switch things up every now and then, so this is vital.

Please visit the Changelog to see the changes in the different releases.

Something went wrong with that request. Please try again.