Class: ActiveMerchant::Billing::OptimalPaymentGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::OptimalPaymentGateway
show all
- Defined in:
- lib/active_merchant/billing/gateways/optimal_payment.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?
#format
Constructor Details
Returns a new instance of OptimalPaymentGateway.
19
20
21
22
23
|
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 19
def initialize(options = {})
@options = options
super
end
|
Instance Method Details
#authorize(money, card_or_auth, options = {}) ⇒ Object
Also known as:
stored_authorize
25
26
27
28
|
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 25
def authorize(money, card_or_auth, options = {})
parse_card_or_auth(card_or_auth, options)
commit("cc#{@stored_data}Authorize", money, options)
end
|
#capture(money, authorization, options = {}) ⇒ Object
47
48
49
50
|
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 47
def capture(money, authorization, options = {})
options[:confirmationNumber] = authorization
commit('ccSettlement', money, options)
end
|
#purchase(money, card_or_auth, options = {}) ⇒ Object
Also known as:
stored_purchase
31
32
33
34
|
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 31
def purchase(money, card_or_auth, options = {})
parse_card_or_auth(card_or_auth, options)
commit("cc#{@stored_data}Purchase", money, options)
end
|
#refund(money, authorization, options = {}) ⇒ Object
37
38
39
40
|
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 37
def refund(money, authorization, options = {})
options[:confirmationNumber] = authorization
commit('ccCredit', money, options)
end
|
#test? ⇒ Boolean
52
53
54
|
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 52
def test?
super || @options[:test]
end
|
#void(authorization, options = {}) ⇒ Object
42
43
44
45
|
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 42
def void(authorization, options = {})
options[:confirmationNumber] = authorization
commit('ccAuthorizeReversal', nil, options)
end
|