Class: ActiveMerchant::Billing::SoEasyPayGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::SoEasyPayGateway
show all
- Defined in:
- lib/active_merchant/billing/gateways/so_easy_pay.rb
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
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
#format
Constructor Details
Returns a new instance of SoEasyPayGateway.
17
18
19
20
|
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 17
def initialize(options = {})
requires!(options, :login, :password)
super
end
|
Instance Method Details
#authorize(money, payment_source, options = {}) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 22
def authorize(money, payment_source, options = {})
if payment_source.respond_to?(:number)
commit('AuthorizeTransaction', do_authorization(money, payment_source, options), options)
else
commit('ReauthorizeTransaction', do_reauthorization(money, payment_source, options), options)
end
end
|
#capture(money, authorization, options = {}) ⇒ Object
38
39
40
|
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 38
def capture(money, authorization, options = {})
commit('CaptureTransaction', do_capture(money, authorization, options), options)
end
|
#purchase(money, payment_source, options = {}) ⇒ Object
30
31
32
33
34
35
36
|
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 30
def purchase(money, payment_source, options = {})
if payment_source.respond_to?(:number)
commit('SaleTransaction', do_sale(money, payment_source, options), options)
else
commit('RebillTransaction', do_rebill(money, payment_source, options), options)
end
end
|
#refund(money, authorization, options = {}) ⇒ Object
42
43
44
|
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 42
def refund(money, authorization, options={})
commit('RefundTransaction', do_refund(money, authorization, options), options)
end
|
#void(authorization, options = {}) ⇒ Object
46
47
48
|
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 46
def void(authorization, options={})
commit('CancelTransaction', do_void(authorization, options), options)
end
|