Sha256: 917fbc0b885d5ff7bb25e2aae8895da9f681ef8c309d0fc47049b250c0309d6b

Contents?: true

Size: 555 Bytes

Versions: 13

Compression:

Stored size: 555 Bytes

Contents

module Spree
  class PaymentMethod::PurchaseOrder < PaymentMethod
    def payment_source_class
      Spree::PurchaseOrder
    end

    def authorize(*args)
      simulated_successful_billing_response('Purchase Order: Success')
    end

    def void(*args)
      simulated_successful_billing_response
    end

    def source_required?
      true
    end

    def auto_capture?
      false
    end

    private

    def simulated_successful_billing_response(message = "")
      ActiveMerchant::Billing::Response.new(true, message, {}, {})
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spree_purchase_order-3.7.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.6.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.5.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.5.0.rc1 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.4.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.3.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.2.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-2.2.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-2.3.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-2.4.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.1.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.0.0 app/models/spree/payment_method/purchase_order.rb
spree_purchase_order-3.2.0.rc1 app/models/spree/payment_method/purchase_order.rb