Sha256: 13169f829a3d95a387078dfcbb16933f8afd576d95b99ba065a20216d413ffc4

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

Spree::Payment.class_eval do
  attr_accessor :validate_bank_details
  validates :bank_name, :account_no, :transaction_reference_no, :deposited_on, :presence => true, :if => :validate_bank_details

  scope :from_bank_transfer, -> { joins(:payment_method).where(:spree_payment_methods => { :type => 'Spree::PaymentMethod::BankTransfer' }) }

  def details_submitted?
    transaction_reference_no?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree-bank-transfer-2.3.0 app/models/spree/payment_decorator.rb
spree-bank-transfer-2.2.5 app/models/spree/payment_decorator.rb