Sha256: efa764b159c825f8fa5a1b7d86ecfffe5f0974e6eec6daea2994dcefbfcb129d
Contents?: true
Size: 654 Bytes
Versions: 65
Compression:
Stored size: 654 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
65 entries across 65 versions & 2 rubygems