| Class | ActiveMerchant::Billing::ExactGateway |
| In: |
lib/active_merchant/billing/gateways/exact.rb
|
| Parent: | Gateway |
| URL | = | 'https://secure2.e-xact.com/vplug-in/transaction/rpc-enc/service.asmx' |
| API_VERSION | = | "8.5" |
| TEST_LOGINS | = | [ {:login => "A00049-01", :password => "test1"}, {:login => "A00427-01", :password => "testus"} ] |
| TRANSACTIONS | = | { :sale => "00", :authorization => "01", :capture => "32", :credit => "34" } |
| ENVELOPE_NAMESPACES | = | { 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema', 'xmlns:env' => 'http://schemas.xmlsoap.org/soap/envelope/', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance' |
| SEND_AND_COMMIT_ATTRIBUTES | = | { 'xmlns:n1' => "http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/Request", 'env:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/' |
| SEND_AND_COMMIT_SOURCE_ATTRIBUTES | = | { 'xmlns:n2' => 'http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/encodedTypes', 'xsi:type' => 'n2:Transaction' |
| POST_HEADERS | = | { 'soapAction' => "http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/SendAndCommit", 'Content-Type' => 'text/xml' |
| SUCCESS | = | "true" |
| SENSITIVE_FIELDS | = | [ :verification_str2, :expiry_date, :card_number ] |
# File lib/active_merchant/billing/gateways/exact.rb, line 43
43: def initialize(options = {})
44: requires!(options, :login, :password)
45: @options = options
46:
47: if TEST_LOGINS.include?( { :login => options[:login], :password => options[:password] } )
48: @test_mode = true
49: end
50:
51: super
52: end
# File lib/active_merchant/billing/gateways/exact.rb, line 58
58: def authorize(money, credit_card, options = {})
59: commit(:authorization, build_sale_or_authorization_request(money, credit_card, options))
60: end
# File lib/active_merchant/billing/gateways/exact.rb, line 66
66: def capture(money, authorization, options = {})
67: commit(:capture, build_capture_or_credit_request(money, authorization, options))
68: end
# File lib/active_merchant/billing/gateways/exact.rb, line 70
70: def credit(money, authorization, options = {})
71: commit(:credit, build_capture_or_credit_request(money, authorization, options))
72: end