Sha256: 6cbcc7c8af3d3947b0123b1bd38a50b5625419e46ff12123197bbf33749b318f
Contents?: true
Size: 623 Bytes
Versions: 62
Compression:
Stored size: 623 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 void(*args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end def source_required? false end end end
Version data entries
62 entries across 62 versions & 2 rubygems