--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "First, make sure you have everything setup correctly and all of your dependencies in place with:"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'rubygems'\n  require 'active_merchant'\n"
- !ruby/struct:SM::Flow::P 
  body: ActiveMerchant expects the amounts to be given as an Integer in cents. In this case, $10 US becomes 1000.
- !ruby/struct:SM::Flow::VERB 
  body: "  tendollar = 1000\n"
- !ruby/struct:SM::Flow::P 
  body: Next, create a credit card object using a TC approved test card.
- !ruby/struct:SM::Flow::VERB 
  body: "  creditcard = ActiveMerchant::Billing::CreditCard.new(\n      :number =&gt; '4111111111111111',\n      :month =&gt; 8,\n      :year =&gt; 2006,\n      :first_name =&gt; 'Longbob',\n    :last_name =&gt; 'Longsen'\n  )\n  options = {\n    :order_id =&gt; '1230123',\n    :email =&gt; 'bob@testbob.com',\n    :address =&gt; { :address1 =&gt; '47 Bobway',\n                  :city =&gt; 'Bobville',\n                  :state =&gt; 'WA',\n                  :country =&gt; 'Australia',\n                  :zip =&gt; '2000'\n                }\n    :description =&gt; 'purchased items'\n  }\n"
- !ruby/struct:SM::Flow::P 
  body: To finish setting up, create the active_merchant object you will be using, with the eWay gateway. If you have a functional eWay account, replace :login with your account info.
- !ruby/struct:SM::Flow::VERB 
  body: "  gateway = ActiveMerchant::Billing::Base.gateway(:eway).new(:login =&gt; '87654321')\n"
- !ruby/struct:SM::Flow::P 
  body: Now we are ready to process our transaction
- !ruby/struct:SM::Flow::VERB 
  body: "  response = gateway.purchase(tendollar, creditcard, options)\n"
- !ruby/struct:SM::Flow::P 
  body: "Sending a transaction to TrustCommerce with active_merchant returns a Response object, which consistently allows you to:"
- !ruby/struct:SM::Flow::P 
  body: 1) Check whether the transaction was successful
- !ruby/struct:SM::Flow::VERB 
  body: "  response.success?\n"
- !ruby/struct:SM::Flow::P 
  body: 2) Retrieve any message returned by eWay, either a &quot;transaction was successful&quot; note or an explanation of why the transaction was rejected.
- !ruby/struct:SM::Flow::VERB 
  body: "  response.message\n"
- !ruby/struct:SM::Flow::P 
  body: 3) Retrieve and store the unique transaction ID returned by eWway, for use in referencing the transaction in the future.
- !ruby/struct:SM::Flow::VERB 
  body: "  response.authorization\n"
- !ruby/struct:SM::Flow::P 
  body: This should be enough to get you started with eWay and active_merchant. For further information, review the methods below and the rest of active_merchant's documentation.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: TEST_URL
  value: "'https://www.eway.com.au/gateway/xmltest/testpage.asp'"
- !ruby/object:RI::Constant 
  comment: 
  name: LIVE_URL
  value: "'https://www.eway.com.au/gateway/xmlpayment.asp'"
- !ruby/object:RI::Constant 
  comment: 
  name: TEST_CVN_URL
  value: "'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp'"
- !ruby/object:RI::Constant 
  comment: 
  name: LIVE_CVN_URL
  value: "'https://www.eway.com.au/gateway_cvn/xmlpayment.asp'"
- !ruby/object:RI::Constant 
  comment: 
  name: MESSAGES
  value: "{         \"00\" => \"Transaction Approved\",         \"01\" => \"Refer to Issuer\",         \"02\" => \"Refer to Issuer, special\",              \"03\" => \"No Merchant\",         \"04\" => \"Pick Up Card\",          \"05\" => \"Do Not Honour\",                 \"06\" => \"Error\",         \"07\" => \"Pick Up Card, Special\",                 \"08\" => \"Honour With Identification\",            \"09\" => \"Request In Progress\",         \"10\" => \"Approved For Partial Amount\",           \"11\" => \"Approved, VIP\",                 \"12\" => \"Invalid Transaction\",           \"13\" => \"Invalid Amount\",         \"14\" => \"Invalid Card Number\",           \"15\" => \"No Issuer\",             \"16\" => \"Approved, Update Track 3\",              \"19\" => \"Re-enter Last Transaction\",             \"21\" => \"No Action Taken\",               \"22\" => \"Suspected Malfunction\",                 \"23\" => \"Unacceptable Transaction Fee\",          \"25\" => \"Unable to Locate Record On File\",               \"30\" => \"Format Error\",          \"31\" => \"Bank Not Supported By Switch\",          \"33\" => \"Expired Card, Capture\",                 \"34\" => \"Suspected Fraud, Retain Card\",          \"35\" => \"Card Acceptor, Contact Acquirer, Retain Card\",          \"36\" => \"Restricted Card, Retain Card\",          \"37\" => \"Contact Acquirer Security Department, Retain Card\",             \"38\" => \"PIN Tries Exceeded, Capture\",           \"39\" => \"No Credit Account\",             \"40\" => \"Function Not Supported\",                \"41\" => \"Lost Card\",             \"42\" => \"No Universal Account\",          \"43\" => \"Stolen Card\",           \"44\" => \"No Investment Account\",                 \"51\" => \"Insufficient Funds\",            \"52\" => \"No Cheque Account\",             \"53\" => \"No Savings Account\",            \"54\" => \"Expired Card\",          \"55\" => \"Incorrect PIN\",                 \"56\" => \"No Card Record\",                \"57\" => \"Function Not Permitted to Cardholder\",          \"58\" => \"Function Not Permitted to Terminal\",            \"59\" => \"Suspected Fraud\",               \"60\" => \"Acceptor Contact Acquirer\",             \"61\" => \"Exceeds Withdrawal Limit\",              \"62\" => \"Restricted Card\",               \"63\" => \"Security Violation\",            \"64\" => \"Original Amount Incorrect\",             \"66\" => \"Acceptor Contact Acquirer, Security\",           \"67\" => \"Capture Card\",          \"75\" => \"PIN Tries Exceeded\",            \"82\" => \"CVV Validation Error\",          \"90\" => \"Cutoff In Progress\",            \"91\" => \"Card Issuer Unavailable\",               \"92\" => \"Unable To Route Transaction\",           \"93\" => \"Cannot Complete, Violation Of The Law\",                 \"94\" => \"Duplicate Transaction\",                 \"96\" => \"System Error\""
full_name: ActiveMerchant::Billing::EwayGateway
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: purchase
name: EwayGateway
superclass: Gateway
