Class: ActiveMerchant::Billing::ExactGateway
- Defined in:
- lib/active_merchant/billing/gateways/exact.rb
Constant Summary collapse
- 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 =
%i[verification_str2 expiry_date card_number]
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, credit_card, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
- #credit(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ ExactGateway
constructor
A new instance of ExactGateway.
- #purchase(money, credit_card, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#add_field_to_post_if_present, #add_fields_to_post_if_present, #card_brand, card_brand, #generate_unique_id, inherited, #scrub, #supported_countries, supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?
Methods included from Versionable
Methods included from CreditCardFormatting
#format, #strftime_yyyymm, #strftime_yyyymmdd_last_day
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ ExactGateway
Returns a new instance of ExactGateway.
38 39 40 41 42 |
# File 'lib/active_merchant/billing/gateways/exact.rb', line 38 def initialize( = {}) requires!(, :login, :password) super end |
Instance Method Details
#authorize(money, credit_card, options = {}) ⇒ Object
44 45 46 |
# File 'lib/active_merchant/billing/gateways/exact.rb', line 44 def (money, credit_card, = {}) commit(:authorization, (money, credit_card, )) end |
#capture(money, authorization, options = {}) ⇒ Object
52 53 54 |
# File 'lib/active_merchant/billing/gateways/exact.rb', line 52 def capture(money, , = {}) commit(:capture, build_capture_or_credit_request(money, , )) end |
#credit(money, authorization, options = {}) ⇒ Object
56 57 58 59 |
# File 'lib/active_merchant/billing/gateways/exact.rb', line 56 def credit(money, , = {}) ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
#purchase(money, credit_card, options = {}) ⇒ Object
48 49 50 |
# File 'lib/active_merchant/billing/gateways/exact.rb', line 48 def purchase(money, credit_card, = {}) commit(:sale, (money, credit_card, )) end |
#refund(money, authorization, options = {}) ⇒ Object
61 62 63 |
# File 'lib/active_merchant/billing/gateways/exact.rb', line 61 def refund(money, , = {}) commit(:credit, build_capture_or_credit_request(money, , )) end |