Class: PaymentMethod::MercadoPago
- Inherits:
-
Spree::PaymentMethod
- Object
- Spree::PaymentMethod
- PaymentMethod::MercadoPago
- Defined in:
- app/models/payment_method/mercado_pago.rb
Instance Method Summary collapse
- #actions ⇒ Object
-
#can_capture?(payment) ⇒ Boolean
Indicates whether its possible to capture the payment.
-
#can_void?(payment) ⇒ Boolean
Indicates whether its possible to void the payment.
- #capture(*args) ⇒ Object
- #payment_profiles_supported? ⇒ Boolean
- #void(*args) ⇒ Object
Instance Method Details
#actions ⇒ Object
12 13 14 |
# File 'app/models/payment_method/mercado_pago.rb', line 12 def actions %w{capture void} end |
#can_capture?(payment) ⇒ Boolean
Indicates whether its possible to capture the payment
17 18 19 |
# File 'app/models/payment_method/mercado_pago.rb', line 17 def can_capture?(payment) ['checkout', 'pending'].include?(payment.state) end |
#can_void?(payment) ⇒ Boolean
Indicates whether its possible to void the payment.
22 23 24 |
# File 'app/models/payment_method/mercado_pago.rb', line 22 def can_void?(payment) payment.state != 'void' end |
#capture(*args) ⇒ Object
26 27 28 |
# File 'app/models/payment_method/mercado_pago.rb', line 26 def capture(*args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end |
#payment_profiles_supported? ⇒ Boolean
8 9 10 |
# File 'app/models/payment_method/mercado_pago.rb', line 8 def payment_profiles_supported? false end |
#void(*args) ⇒ Object
30 31 32 |
# File 'app/models/payment_method/mercado_pago.rb', line 30 def void(*args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end |