Class: ActiveMerchant::Billing::AxcessmsGateway
- Defined in:
- lib/active_merchant/billing/gateways/axcessms.rb
Constant Summary collapse
- API_VERSION =
'1.0'
- PAYMENT_CODE_PREAUTHORIZATION =
'CC.PA'
- PAYMENT_CODE_DEBIT =
'CC.DB'
- PAYMENT_CODE_CAPTURE =
'CC.CP'
- PAYMENT_CODE_REVERSAL =
'CC.RV'
- PAYMENT_CODE_REFUND =
'CC.RF'
- PAYMENT_CODE_REBILL =
'CC.RB'
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, authorization, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ AxcessmsGateway
constructor
A new instance of AxcessmsGateway.
- #purchase(money, payment, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
- #verify(credit_card, options = {}) ⇒ Object
- #void(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 CreditCardFormatting
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ AxcessmsGateway
Returns a new instance of AxcessmsGateway.
26 27 28 29 |
# File 'lib/active_merchant/billing/gateways/axcessms.rb', line 26 def initialize( = {}) requires!(, :sender, :login, :password, :channel) super end |
Instance Method Details
#authorize(money, authorization, options = {}) ⇒ Object
36 37 38 |
# File 'lib/active_merchant/billing/gateways/axcessms.rb', line 36 def (money, , = {}) commit(PAYMENT_CODE_PREAUTHORIZATION, money, , ) end |
#capture(money, authorization, options = {}) ⇒ Object
40 41 42 |
# File 'lib/active_merchant/billing/gateways/axcessms.rb', line 40 def capture(money, , = {}) commit(PAYMENT_CODE_CAPTURE, money, , ) end |
#purchase(money, payment, options = {}) ⇒ Object
31 32 33 34 |
# File 'lib/active_merchant/billing/gateways/axcessms.rb', line 31 def purchase(money, payment, = {}) payment_code = payment.respond_to?(:number) ? PAYMENT_CODE_DEBIT : PAYMENT_CODE_REBILL commit(payment_code, money, payment, ) end |
#refund(money, authorization, options = {}) ⇒ Object
44 45 46 |
# File 'lib/active_merchant/billing/gateways/axcessms.rb', line 44 def refund(money, , = {}) commit(PAYMENT_CODE_REFUND, money, , ) end |
#verify(credit_card, options = {}) ⇒ Object
52 53 54 55 56 57 |
# File 'lib/active_merchant/billing/gateways/axcessms.rb', line 52 def verify(credit_card, = {}) MultiResponse.run(:use_first_response) do |r| r.process { (100, credit_card, ) } r.process(:ignore_result) { void(r., ) } end end |
#void(authorization, options = {}) ⇒ Object
48 49 50 |
# File 'lib/active_merchant/billing/gateways/axcessms.rb', line 48 def void(, = {}) commit(PAYMENT_CODE_REVERSAL, nil, , ) end |