Sha256: 1e136bc19065c4a2cfe675047343ea1b200f05908b76e9b688c6f77a74b7faa7
Contents?: true
Size: 656 Bytes
Versions: 26
Compression:
Stored size: 656 Bytes
Contents
module Spree class PaymentMethod::Check < PaymentMethod def actions %w{capture void} end # Indicates whether its possible to capture the payment def can_capture?(payment) ['checkout', 'pending'].include?(payment.state) end # Indicates whether its possible to void the payment. def can_void?(payment) payment.state != 'void' end def capture(*_args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end def cancel(response); end def void(*_args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end def source_required? false end end end
Version data entries
26 entries across 26 versions & 1 rubygems