8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/eway_rapid/message/convert/transaction_to_payment.rb', line 8
def do_convert(transaction)
payment = InternalModels::Payment.new
payment_details = transaction.payment_details
if payment_details
payment.currency_code = payment_details.currency_code
payment.invoice_description = payment_details.invoice_description
payment.invoice_number = payment_details.invoice_number
payment.invoice_reference = payment_details.invoice_reference
payment.total_amount = payment_details.total_amount
else
payment.total_amount = 0
end
payment
end
|