Class: Spree::Gateway::CheckoutV2Gateway
- Inherits:
-
Spree::Gateway
- Object
- Spree::Gateway
- Spree::Gateway::CheckoutV2Gateway
- Defined in:
- app/models/spree/gateway/checkout_v2_gateway.rb
Instance Method Summary collapse
- #authorize(money, creditcard, gateway_options) ⇒ Object
- #method_type ⇒ Object
- #provider_class ⇒ Object
- #purchase(money, creditcard, gateway_options) ⇒ Object
Instance Method Details
#authorize(money, creditcard, gateway_options) ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/models/spree/gateway/checkout_v2_gateway.rb', line 17 def (money, creditcard, ) if creditcard.number.blank? && creditcard.gateway_payment_profile_id.present? provider.(money, creditcard.gateway_payment_profile_id, ) else provider.(money, creditcard, ) end end |
#method_type ⇒ Object
9 10 11 |
# File 'app/models/spree/gateway/checkout_v2_gateway.rb', line 9 def method_type 'checkout_v2' end |
#provider_class ⇒ Object
13 14 15 |
# File 'app/models/spree/gateway/checkout_v2_gateway.rb', line 13 def provider_class ActiveMerchant::Billing::CheckoutV2 end |
#purchase(money, creditcard, gateway_options) ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/models/spree/gateway/checkout_v2_gateway.rb', line 25 def purchase(money, creditcard, ) if creditcard.number.blank? && creditcard.gateway_payment_profile_id.present? provider.purchase(money, creditcard.gateway_payment_profile_id, ) else provider.purchase(money, creditcard, ) end end |