Class | ActiveMerchant::Billing::BeanstreamGateway |
In: |
lib/active_merchant/billing/gateways/beanstream.rb
|
Parent: | Gateway |
This class implements the Canadian Beanstream payment gateway. It is also named TD Canada Trust Online Mart payment gateway. To learn more about the specification of Beanstream gateway, please read the OM_Direct_Interface_API.pdf, which you can get from your Beanstream account or get from me by email.
Example authorization (Beanstream PA transaction type): twenty = 2000 gateway = BeanstreamGateway.new( :login => '100200000', :user => 'xiaobozz', :password => 'password' ) credit_card = CreditCard.new( :number => '4030000010001234', :month => 8, :year => 2011, :first_name => 'xiaobo', :last_name => 'zzz', :verification_value => 137 ) response = gateway.authorize(twenty, credit_card, :order_id => '1234', :billing_address => { :name => 'xiaobo zzz', :phone => '555-555-5555', :address1 => '1234 Levesque St.', :address2 => 'Apt B', :city => 'Montreal', :state => 'QC', :country => 'CA', :zip => 'H2C1X8' }, :email => 'xiaobozzz@example.com', :subtotal => 800, :shipping => 100, :tax1 => 100, :tax2 => 100, :custom => 'reference one' )