My favorites | Sign in
Project Home Downloads Issues
Project Information
Members
Links

Patch Installation

If you can not svn update from Active Merchant. Download the ruby files from the download tab and install them into your application's active merchant plugin directory:

active_merchant/lib/active_merchant/billing/gateways/bean_stream.rb

active_merchant/test/unit/gateways/bean_stream_test.rb

active_merchant/test/remote/gateways/remote_bean_stream_test.rb

Description

This description is also in lib/active_merchant/billing/gateways/bean_stream.rb

This class implements the Canada BeanStream payment gateway for the ActiveMerchant module. It is also named TD Canada Trust Online Mart payment gateway. To learn more about the specification of Bean Stream gateway, please read the OM_Direct_Interface_API.pdf, which is included in the download.

Created by xiaobozz

# Supported transaction types by Bean Stream:

P = Purchase PA = Pre Authorization PAC = Pre Authorization Completion

# Recursive billing is not implemented currently.

# Transaction Data is transfered to payment gateway by HTTPS get method.

# Login is username not merchant_id, username and password should be enabled in your bean stream account.

# Adding of order products information is not implemented.

# Country and province data must be code, such as "CA", "US", "QC".

# Test your app with your true merchant id and test credit card information provided in the api pdf document.

Example

Usage for a PreAuthauthorize is as follows:

twenty = 2000
gateway = BeanStreamGateway.new(
  :merchant_id => '100200000',
  :login => 'xiaobozz',
  :password => 'password'
)

creditcard = CreditCard.new(
  :number => '4030000010001234',
  :month => 8,
  :year => 2011,
  :first_name => 'xiaobo',
  :last_name => 'zzz',
  :verification_value => 137
)
response = @gateway.authorize(twenty, creditcard,
   :order_id =>  '1234',
   :billing_address => {
      :name => 'xiaobo zzz',
      :phone => '514-766-2333',
	    :address1 => '123 Rene-levesque St.',
	    :address2 => 'Apt B',
	    :city => 'Montreal',
	    :state => 'QC',
	    :country => 'CA',
	    :zip => 'H4D1W9'
  },
  :email => 'xiaobozzz@gmail.com',
  :sub_total => '8.0',
  :shipping_total => '1.0',
  :gst_total => '1.0',
  :province_tax_total => '1.0',
  :ref1 => 'reference one'
)
Powered by Google Project Hosting