def add_transaction(auth_type, amount = nil, options = {})
@auth_type = auth_type
xml.Transaction do
xml.Type @auth_type.to_s
if options[:payment_number] && options[:payment_number] > 1
xml.CardholderPresentCode({ :DataType => 'S32' }, 8)
else
xml.CardholderPresentCode({ :DataType => 'S32' }, 7)
end
if options[:payment_number]
xml.PaymentNumber({ :DataType => 'S32' }, options[:payment_number])
end
if options[:total_payments]
xml.TotalNumberPayments({ :DataType => 'S32' }, options[:total_payments])
end
if amount
xml.CurrentTotals do
xml.Totals do
xml.Total({ :DataType => 'Money', :Currency => 826 }, amount)
end
end
end
end
end