Sha256: 88827477e43642325b80d6e73d5a39c8d00b5724345b3944b11ee65d1d2d9f38
Contents?: true
Size: 808 Bytes
Versions: 11
Compression:
Stored size: 808 Bytes
Contents
module Spree class PaymentMethod::Check < PaymentMethod def actions %w{capture void credit} 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(*) simulated_successful_billing_response end def void(*) simulated_successful_billing_response end alias_method :try_void, :void def credit(*) simulated_successful_billing_response end def source_required? false end def simulated_successful_billing_response ActiveMerchant::Billing::Response.new(true, "", {}, {}) end end end
Version data entries
11 entries across 11 versions & 1 rubygems