Created
November 7, 2011 07:56
-
-
Save leondu/1344420 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
credit_card = ActiveMerchant::Billing::CreditCard.new(:number => '4111111111111111', :month => '8',:year => '2013', :first_name => 'Tobias', :last_name => 'Luetke', :verification_value => '123') | |
gateway = ActiveMerchant::Billing::OgoneGateway.new(:login => "xxx", :user => "xxx", :password => "xxx") | |
response = gateway.purchase(10000, credit_card, :order_id => "1", :store => "abcdefg") | |
=> #<ActiveMerchant::Billing::Response:0x007f830ac655e0 @params={"orderID"=>"137", "PAYID"=>"12303272", "NCSTATUS"=>"0", "NCERROR"=>"0", "ACCEPTANCE"=>"test123", "STATUS"=>"9", "IPCTY"=>"99", "CCCTY"=>"US", "ECI"=>"7", "CVCCheck"=>"NO", "AAVCheck"=>"NO", "VC"=>"NO", "amount"=>"100", "currency"=>"EUR", "PM"=>"CreditCard", "BRAND"=>"VISA", "NCERRORPLUS"=>"!"}, @message="The transaction was successful", @success=true, @test=true, @authorization="12303272;SAL", @fraud_review=nil, @avs_result={"code"=>"R", "message"=>"System unavailable.", "street_match"=>nil, "postal_match"=>nil}, @cvv_result={"code"=>"P", "message"=>"Not Processed"}> | |
response = gateway.purchase(10000, "abcdefg", :order_id => "2") | |
=> #<ActiveMerchant::Billing::Response:0x007f830a85ca98 @params={"orderID"=>"138", "PAYID"=>"0", "NCSTATUS"=>"5", "NCERROR"=>"50001111", "ACCEPTANCE"=>"", "STATUS"=>"0", "ECI"=>"9", "amount"=>"", "currency"=>"EUR", "PM"=>"", "BRAND"=>"", "NCERRORPLUS"=>" Alias abcdefg not Found"}, @message="Alias abcdefg not found", @success=false, @test=true, @authorization="0;SAL", @fraud_review=nil, @avs_result={"code"=>nil, "message"=>nil, "street_match"=>nil, "postal_match"=>nil}, @cvv_result={"code"=>nil, "message"=>nil}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment