Sha256: 0b6d5429219c8c55dd3148a34f8328239b02e2163cf71119f01fc2402cb5b55f

Contents?: true

Size: 779 Bytes

Versions: 4

Compression:

Stored size: 779 Bytes

Contents

module Spree
  class PaymentMethod::BankTransfer < 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(*args)
      ActiveMerchant::Billing::Response.new(true, "", {}, {})
    end

    def void(*args)
      ActiveMerchant::Billing::Response.new(true, "", {}, {})
    end

    def source_required?
      false
    end
      
    def credit(money, credit_card, response_code, options = {})
      ActiveMerchant::Billing::Response.new(true, "", {}, {})
    end
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree-bank-transfer-2.3.0 app/models/spree/payment_method/bank_transfer.rb
spree-bank-transfer-2.2.5 app/models/spree/payment_method/bank_transfer.rb
spree-bank-transfer-2.2.4 app/models/spree/payment_method/bank_transfer.rb
spree-bank-transfer-2.2.2 app/models/spree/payment_method/bank_transfer.rb