Class: PaymentMethod::BankTransfer
- Inherits:
-
PaymentMethod
- Object
- PaymentMethod
- PaymentMethod::BankTransfer
- Defined in:
- app/models/spree/payment_method/bank_transfer.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
- #source_required? ⇒ Boolean
- #void(*args) ⇒ Object
Instance Method Details
#actions ⇒ Object
4 5 6 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 4 def actions %w{capture void} end |
#can_capture?(payment) ⇒ Boolean
Indicates whether its possible to capture the payment
9 10 11 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 9 def can_capture?(payment) ['checkout', 'pending'].include?(payment.state) end |
#can_void?(payment) ⇒ Boolean
Indicates whether its possible to void the payment.
14 15 16 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 14 def can_void?(payment) payment.state != 'void' end |
#capture(*args) ⇒ Object
18 19 20 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 18 def capture(*args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end |
#source_required? ⇒ Boolean
26 27 28 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 26 def source_required? false end |
#void(*args) ⇒ Object
22 23 24 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 22 def void(*args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end |