lib/active_merchant/billing/gateways/borgun.rb in activemerchant-1.129.0 vs lib/active_merchant/billing/gateways/borgun.rb in activemerchant-1.130.0
- old
+ new
@@ -94,29 +94,30 @@
CURRENCY_CODES = Hash.new { |_h, k| raise ArgumentError.new("Unsupported currency for HDFC: #{k}") }
CURRENCY_CODES['ISK'] = '352'
CURRENCY_CODES['EUR'] = '978'
CURRENCY_CODES['USD'] = '840'
+ CURRENCY_CODES['GBP'] = '826'
def add_3ds_fields(post, options)
post[:ThreeDSMessageId] = options[:three_ds_message_id] if options[:three_ds_message_id]
post[:ThreeDS_PARes] = options[:three_ds_pares] if options[:three_ds_pares]
post[:ThreeDS_CRes] = options[:three_ds_cres] if options[:three_ds_cres]
end
def add_3ds_preauth_fields(post, options)
post[:SaleDescription] = options[:sale_description] || ''
- post[:MerchantReturnURL] = options[:merchant_return_url] if options[:merchant_return_url]
+ post[:MerchantReturnURL] = options[:redirect_url] if options[:redirect_url]
end
def add_invoice(post, money, options)
post[:TrAmount] = amount(money)
post[:TrCurrency] = CURRENCY_CODES[options[:currency] || currency(money)]
# The ISK currency must have a currency exponent of 2 on the 3DS request but not on the auth request
- if post[:TrCurrency] == '352' && options[:apply_3d_secure] == '1'
- post[:TrCurrencyExponent] = 2
- else
+ if post[:TrCurrency] == '352' && options[:apply_3d_secure] != '1'
post[:TrCurrencyExponent] = 0
+ else
+ post[:TrCurrencyExponent] = 2
end
post[:TerminalID] = options[:terminal_id] || '1'
end
def add_payment_method(post, payment_method)