Created
June 19, 2014 14:50
-
-
Save theinventor/c1202d079fac03dbd7f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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