Class: DCAS::CreditCardPayment
Instance Attribute Summary
Attributes inherited from Payment
Instance Method Summary collapse
-
#initialize(*args) ⇒ CreditCardPayment
constructor
Arguments: client_id, client_name, amount, card_type, credit_card_number, expiration.
- #to_csv_data(options = {}) ⇒ Object
Constructor Details
#initialize(*args) ⇒ CreditCardPayment
Arguments: client_id, client_name, amount, card_type, credit_card_number, expiration
107 108 109 |
# File 'lib/dcas/payment.rb', line 107 def initialize(*args) @card_type, @credit_card_number, @expiration = *super end |
Instance Method Details
#to_csv_data(options = {}) ⇒ Object
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/dcas/payment.rb', line 111 def to_csv_data(={}) # DCAS Example: # 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 credit card transactions 'CC', @card_type, # Card Type @credit_card_number, # Account Number @expiration, # Expiration date (MM/YYYY) @amount, # Amount (00.00) 'N', # Card Present nil, # Card verification (if present) nil, # invoice number @client_name, # name # Larry Cummings @ DCAS Support: (972) 239-2327, ext 153 #OR# (972) 392-4654 nil, # address nil, # city nil, # state nil, # zip nil, # phone number nil, # driver license number nil, # driver license state "#{@batch.batch_id}#{@client_id}", # CustTraceCode @txn_type, # Credit/Debit (default Debit) nil, 2, 3, 1, nil ] end |