Class: PaymentMethod::CashOn
- Inherits:
-
Spree::PaymentMethod
- Object
- Spree::PaymentMethod
- PaymentMethod::CashOn
- Defined in:
- app/models/spree/payment_method/cash_on.rb
Instance Method Summary collapse
- #auto_capture? ⇒ Boolean
-
#cancel(_response_code, _payment = nil) ⇒ Object
override: Spree::Payment#cancel! calls payment_method.cancel(response_code, payment).
- #payment_source_class ⇒ Object
- #source_required? ⇒ Boolean
Instance Method Details
#auto_capture? ⇒ Boolean
11 12 13 |
# File 'app/models/spree/payment_method/cash_on.rb', line 11 def auto_capture? true end |
#cancel(_response_code, _payment = nil) ⇒ Object
override: Spree::Payment#cancel! calls payment_method.cancel(response_code, payment).
Cash has no gateway to void against, so acknowledge success and let the payment
transition to void.
18 19 20 |
# File 'app/models/spree/payment_method/cash_on.rb', line 18 def cancel(_response_code, _payment = nil) ActiveMerchant::Billing::Response.new(true, 'Cash On: Payment has been canceled.') end |
#payment_source_class ⇒ Object
3 4 5 |
# File 'app/models/spree/payment_method/cash_on.rb', line 3 def payment_source_class Spree::VpagoPaymentSource end |
#source_required? ⇒ Boolean
7 8 9 |
# File 'app/models/spree/payment_method/cash_on.rb', line 7 def source_required? true end |