Class: ActiveMerchant::Billing::TransnationalGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::TransnationalGateway
show all
- Defined in:
- lib/active_merchant/billing/gateways/transnational.rb
Defined Under Namespace
Classes: ResponseCodes
Constant Summary
Constants inherited
from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
#options
Instance Method Summary
collapse
-
#authorize(money, creditcard_or_vault_id, options = {}) ⇒ Object
-
#capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ TransnationalGateway
constructor
A new instance of TransnationalGateway.
-
#purchase(money, creditcard_or_vault_id, options = {}) ⇒ Object
-
#refund(money, authorization, options = {}) ⇒ Object
-
#store(creditcard, options = {}) ⇒ Object
-
#unstore(customer_vault_id, options = {}) ⇒ Object
-
#void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
#format
Constructor Details
Returns a new instance of TransnationalGateway.
15
16
17
18
|
# File 'lib/active_merchant/billing/gateways/transnational.rb', line 15
def initialize(options = {})
requires!(options, :login, :password)
super
end
|
Instance Method Details
#authorize(money, creditcard_or_vault_id, options = {}) ⇒ Object
20
21
22
23
|
# File 'lib/active_merchant/billing/gateways/transnational.rb', line 20
def authorize(money, creditcard_or_vault_id, options = {})
post = build_auth_post(money, creditcard_or_vault_id, options)
commit('auth', post)
end
|
#capture(money, authorization, options = {}) ⇒ Object
30
31
32
33
|
# File 'lib/active_merchant/billing/gateways/transnational.rb', line 30
def capture(money, authorization, options = {})
post = build_capture_post(money, authorization, options)
commit('capture', post)
end
|
#purchase(money, creditcard_or_vault_id, options = {}) ⇒ Object
25
26
27
28
|
# File 'lib/active_merchant/billing/gateways/transnational.rb', line 25
def purchase(money, creditcard_or_vault_id, options = {})
post = build_purchase_post(money, creditcard_or_vault_id, options)
commit('sale', post)
end
|
#refund(money, authorization, options = {}) ⇒ Object
40
41
42
43
|
# File 'lib/active_merchant/billing/gateways/transnational.rb', line 40
def refund(money, authorization, options = {})
post = build_refund_post(money, authorization, options)
commit('refund', post)
end
|
#store(creditcard, options = {}) ⇒ Object
45
46
47
48
|
# File 'lib/active_merchant/billing/gateways/transnational.rb', line 45
def store(creditcard, options = {})
post = build_store_post(creditcard, options)
commit_vault('add_customer', post)
end
|
#unstore(customer_vault_id, options = {}) ⇒ Object
50
51
52
53
|
# File 'lib/active_merchant/billing/gateways/transnational.rb', line 50
def unstore(customer_vault_id, options = {})
post = build_unstore_post(customer_vault_id, options)
commit_vault('delete_customer', post)
end
|
#void(authorization, options = {}) ⇒ Object
35
36
37
38
|
# File 'lib/active_merchant/billing/gateways/transnational.rb', line 35
def void(authorization, options = {})
post = build_void_post(authorization, options)
commit('void', post)
end
|