Sha256: 04d910c6ce265bcca5673f171f0a1009781c42845bd5271bae69d8ca30d90ee2
Contents?: true
Size: 851 Bytes
Versions: 50
Compression:
Stored size: 851 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(*) 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
50 entries across 50 versions & 1 rubygems