Sha256: 1fe9839d9f546c3eec5352499eec4cde52eb0d6dab913efef84e0cff4bdc4fe8
Contents?: true
Size: 860 Bytes
Versions: 98
Compression:
Stored size: 860 Bytes
Contents
module Spree class PaymentMethod::Check < ::Spree::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(*) simulated_successful_billing_response end def cancel(*) simulated_successful_billing_response end def void(*) simulated_successful_billing_response end def source_required? false end def credit(*) simulated_successful_billing_response end private def simulated_successful_billing_response ActiveMerchant::Billing::Response.new(true, '', {}, {}) end end end
Version data entries
98 entries across 98 versions & 1 rubygems