Class ActiveMerchant::Billing::ExactGateway
In: lib/active_merchant/billing/gateways/exact.rb
Parent: Gateway

Methods

authorize   capture   credit   new   purchase   test?  

Constants

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 ]

Public Class methods

[Source]

    # 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

Public Instance methods

[Source]

    # 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

[Source]

    # 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

[Source]

    # 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

[Source]

    # File lib/active_merchant/billing/gateways/exact.rb, line 62
62:       def purchase(money, credit_card, options = {})
63:         commit(:sale, build_sale_or_authorization_request(money, credit_card, options))
64:       end

[Source]

    # File lib/active_merchant/billing/gateways/exact.rb, line 54
54:       def test?
55:         @test_mode || Base.gateway_mode == :test
56:       end

[Validate]