lib/active_merchant/billing/gateways/iridium.rb in activemerchant-1.107.1 vs lib/active_merchant/billing/gateways/iridium.rb in activemerchant-1.107.2
- old
+ new
@@ -289,11 +289,12 @@
def build_reference_request(type, money, authorization, options)
options[:action] = 'CrossReferenceTransaction'
order_id, cross_reference, _ = authorization.split(';')
build_request(options) do |xml|
if money
- details = {'CurrencyCode' => currency_code(options[:currency] || default_currency), 'Amount' => amount(money)}
+ currency = options[:currency] || currency(money)
+ details = {'CurrencyCode' => currency_code(currency), 'Amount' => localized_amount(money, currency)}
else
details = {'CurrencyCode' => currency_code(default_currency), 'Amount' => '0'}
end
xml.tag! 'TransactionDetails', details do
xml.tag! 'MessageDetails', {'TransactionType' => type, 'CrossReference' => cross_reference}
@@ -325,11 +326,12 @@
options[:billing_address] = options[:billing_address] || options[:address] || {}
options[:shipping_address] = options[:shipping_address] || {}
end
def add_purchase_data(xml, type, money, options)
+ currency = options[:currency] || currency(money)
requires!(options, :order_id)
- xml.tag! 'TransactionDetails', {'Amount' => amount(money), 'CurrencyCode' => currency_code(options[:currency] || currency(money))} do
+ xml.tag! 'TransactionDetails', {'Amount' => localized_amount(money, currency), 'CurrencyCode' => currency_code(currency)} do
xml.tag! 'MessageDetails', {'TransactionType' => type}
xml.tag! 'OrderID', options[:order_id]
xml.tag! 'TransactionControl' do
xml.tag! 'ThreeDSecureOverridePolicy', 'FALSE'
xml.tag! 'EchoAVSCheckResult', 'TRUE'