Class: ActiveMerchant::Billing::IdealRabobankGateway

Inherits:
IdealBaseGateway show all
Defined in:
lib/active_merchant/billing/gateways/ideal_rabobank.rb

Overview

First, make sure you have everything setup correctly and all of your dependencies in place with:

require 'rubygems'
require 'active_merchant'

ActiveMerchant expects the amounts to be given as an Integer in cents. In this case, 10 EUR becomes 1000.

Configure the gateway using your iDEAL bank account info and security settings:

Create gateway:

gateway = ActiveMerchant::Billing::IdealRabobankGateway.new(
  :login    => '123456789', # merchant number
  :pem      => File.read(RAILS_ROOT + '/config/ideal.pem'), # put certificate and PEM in this file
  :password => 'password' # password for the PEM key
)

Get list of issuers to fill selection list on your payment form:

response = gateway.issuers
list = response.issuer_list

Request transaction:

options = {
   :issuer_id         => '0001',
   :expiration_period => 'PT10M',
   :return_url        => 'http://www.return.url',
   :order_id          => '1234567890123456',
   :currency          => 'EUR',
   :description       => 'Een omschrijving',
   :entrance_code     => '1234'
}

response = gateway.setup_purchase(amount, options)
transaction_id = response.transaction['transactionID']
redirect_url = response.service_url

Mandatory status request will confirm transaction:

response = gateway.capture(transaction_id)

Implementation contains some simplifications

  • does not support multiple subID per merchant

  • language is fixed to ‘nl’

Constant Summary

Constants inherited from IdealBaseGateway

ActiveMerchant::Billing::IdealBaseGateway::API_VERSION, ActiveMerchant::Billing::IdealBaseGateway::AUTHENTICATION_TYPE, ActiveMerchant::Billing::IdealBaseGateway::LANGUAGE, ActiveMerchant::Billing::IdealBaseGateway::SUB_ID

Constants inherited from Gateway

Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS

Instance Attribute Summary

Attributes inherited from IdealBaseGateway

#url

Attributes inherited from Gateway

#options

Method Summary

Methods inherited from IdealBaseGateway

#capture, #initialize, #issuers, #setup_purchase, #test?

Methods inherited from Gateway

#card_brand, card_brand, inherited, #initialize, supports?, #test?

Methods included from CreditCardFormatting

#format

Constructor Details

This class inherits a constructor from ActiveMerchant::Billing::IdealBaseGateway