Class: ActiveMerchant::Billing::MerchantESolutionsGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::MerchantESolutionsGateway
show all
- Defined in:
- lib/active_merchant/billing/gateways/merchant_e_solutions.rb
Constant Summary
- TEST_URL =
'https://cert.merchante-solutions.com/mes-api/tridentApi'
- LIVE_URL =
'https://api.merchante-solutions.com/mes-api/tridentApi'
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)
-
- (Object) authorize(money, creditcard_or_card_id, options = {})
-
- (Object) capture(money, transaction_id, options = {})
-
- (Object) credit(money, creditcard_or_card_id, options = {})
-
- (MerchantESolutionsGateway) initialize(options = {})
constructor
A new instance of MerchantESolutionsGateway.
-
- (Object) purchase(money, creditcard_or_card_id, options = {})
-
- (Object) refund(money, identification, options = {})
-
- (Object) store(creditcard, options = {})
-
- (Object) unstore(card_id)
-
- (Object) void(transaction_id, options = {})
Methods inherited from Gateway
card_brand, #card_brand, inherited, supports?, #test?
#format
Constructor Details
A new instance of MerchantESolutionsGateway
20
21
22
23
24
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 20
def initialize(options = {})
requires!(options, :login, :password)
@options = options
super
end
|
Instance Method Details
- (Object) authorize(money, creditcard_or_card_id, options = {})
26
27
28
29
30
31
32
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 26
def authorize(money, creditcard_or_card_id, options = {})
post = {}
add_invoice(post, options)
add_payment_source(post, creditcard_or_card_id, options)
add_address(post, options)
commit('P', money, post)
end
|
- (Object) capture(money, transaction_id, options = {})
42
43
44
45
46
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 42
def capture(money, transaction_id, options = {})
post ={}
post[:transaction_id] = transaction_id
commit('S', money, post)
end
|
- (Object) credit(money, creditcard_or_card_id, options = {})
64
65
66
67
68
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 64
def credit(money, creditcard_or_card_id, options = {})
post = {}
add_payment_source(post, creditcard_or_card_id, options)
commit('C', money, post)
end
|
- (Object) purchase(money, creditcard_or_card_id, options = {})
34
35
36
37
38
39
40
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 34
def purchase(money, creditcard_or_card_id, options = {})
post = {}
add_invoice(post, options)
add_payment_source(post, creditcard_or_card_id, options)
add_address(post, options)
commit('D', money, post)
end
|
- (Object) refund(money, identification, options = {})
60
61
62
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 60
def refund(money, identification, options = {})
commit('U', money, options.merge(:transaction_id => identification))
end
|
- (Object) store(creditcard, options = {})
48
49
50
51
52
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 48
def store(creditcard, options = {})
post = {}
add_creditcard(post, creditcard, options)
commit('T', nil, post)
end
|
- (Object) unstore(card_id)
54
55
56
57
58
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 54
def unstore(card_id)
post = {}
post[:card_id] = card_id
commit('X', nil, post)
end
|
- (Object) void(transaction_id, options = {})
70
71
72
|
# File 'lib/active_merchant/billing/gateways/merchant_e_solutions.rb', line 70
def void(transaction_id, options = {})
commit('V', nil, options.merge(:transaction_id => transaction_id))
end
|