Sha256: 3ba55182ddb9e7bf71215d6cef8ddc000c5416ff80d00d35e2098a213fdefce0
Contents?: true
Size: 758 Bytes
Versions: 9
Compression:
Stored size: 758 Bytes
Contents
module Spree class PaymentMethod::PurchaseOrder < PaymentMethod def payment_source_class Spree::PurchaseOrder end def actions %w(complete void) end def can_complete?(payment) %w(checkout pending).include?(payment.state) end def can_void?(payment) payment.state != 'void' end def authorize(*args) ActiveMerchant::Billing::Response.new(true, 'Purchase Order: Success', {}, {}) end def complete(*) ActiveMerchant::Billing::Response.new(true, 'Purchase Order: Success', {}, {}) end def void(*args) ActiveMerchant::Billing::Response.new(true, '', {}, {}) end def source_required? true end def auto_capture? false end end end
Version data entries
9 entries across 9 versions & 1 rubygems