134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
# File 'lib/active_merchant/billing/gateways/litle.rb', line 134
def authorize(money, payment_method, options = {})
request = build_xml_request do |doc|
add_authentication(doc)
if check?(payment_method)
doc.echeckVerification(transaction_attributes(options)) do
add_echeck_purchase_params(doc, money, payment_method, options)
end
else
doc.authorization(transaction_attributes(options)) do
add_auth_purchase_params(doc, money, payment_method, options)
end
end
end
check?(payment_method) ? commit(:echeckVerification, request, money) : commit(:authorization, request, money)
end
|