Class: DCAS::AchPayment
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Payment
Instance Method Summary collapse
-
#initialize(*args) ⇒ AchPayment
constructor
Arguments: client_id, client_name, amount, account_type, routing_number, account_number, check_number.
- #to_csv_data(options = {}) ⇒ Object
Constructor Details
#initialize(*args) ⇒ AchPayment
Arguments: client_id, client_name, amount, account_type, routing_number, account_number, check_number
57 58 59 |
# File 'lib/dcas/payment.rb', line 57 def initialize(*args) @account_type, @routing_number, @account_number, @check_number = *super end |
Instance Method Details
#to_csv_data(options = {}) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/dcas/payment.rb', line 61 def to_csv_data(={}) # Example from DCAS: # HD,CompanyName,UserName,Password,Check # CA,111000753,1031103,42676345,50.99,,Darwin Rogers,1409 N AVE,,,75090,,,,,2919,,,,,Checking,,,,,,200 # CC,VISA,4118000000981234,04/2009,19.99,N,,162078,JACLYN ,545 Sheridan Ave,,,07203,,,,9872,,,2,3,1 [ # This is for bank account transactions 'CA', @routing_number, @account_number, @check_number, # check number field can be used to prevent duplicates @amount, nil, # invoice number @client_name, nil, # address - API says required, but it's really not. nil, # city nil, # state nil, # zip nil, # phone number nil, # driver license number nil, # driver license state nil, # third party check? 1=yes, 0=no "#{@batch.batch_id}#{@client_id}", # CustTraceCode nil, # image name nil, # back image name @txn_type, # Credit/Debit (default Debit) nil, # Internal Account Number: date (in 4 digits: YYMM) + client id @account_type, #, nil, # ECC - Default Entry Class Code (??) # nil, nil, nil, nil, # Deposit info # nil, # CPA Code # nil, nil, # scanned MICR info # nil, nil # endorsement and image ] end |