Skip to content

Instantly share code, notes, and snippets.

@theinventor
Created June 19, 2014 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theinventor/c1202d079fac03dbd7f4 to your computer and use it in GitHub Desktop.
Save theinventor/c1202d079fac03dbd7f4 to your computer and use it in GitHub Desktop.
@gateway = ActiveMerchant::Billing::UsaEpayGateway.new login: 'KEYHERE', password: '1234', software_id: 'ABC123'
credit_card = ActiveMerchant::Billing::CreditCard.new(
:number => '4000100011112224',
:verification_value => 123,
:month => 9,
:year => 2014,
:first_name => 'Bob',
:last_name => 'Bobsen'
)
billing_address = {
:first_name => 'John',
:last_name => 'Smith',
:company => 'ABC COrp',
:address => '123 ANy',
:address1 => '123 line1',
:city => 'Kirkland',
:state => 'WA',
:zip => '98034',
:country => 'USA',
:phone_number => '4252141212'
}
customer_info = {address: {}, billing_address: billing_address, email: 'troy@test.com' }
response = @gateway.purchase(1000, credit_card, customer_info)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment