lib/active_merchant/billing/gateways/nab_transact.rb in activemerchant-1.78.0 vs lib/active_merchant/billing/gateways/nab_transact.rb in activemerchant-1.79.0

- old
+ new

@@ -8,11 +8,11 @@ API_VERSION = 'xml-4.2' PERIODIC_API_VERSION = "spxml-4.2" class_attribute :test_periodic_url, :live_periodic_url - self.test_url = 'https://transact.nab.com.au/test/xmlapi/payment' + self.test_url = 'https://demo.transact.nab.com.au/xmlapi/payment' self.live_url = 'https://transact.nab.com.au/live/xmlapi/payment' self.test_periodic_url = 'https://transact.nab.com.au/xmlapidemo/periodic' self.live_periodic_url = 'https://transact.nab.com.au/xmlapi/periodic' self.supported_countries = ['AU'] @@ -102,11 +102,11 @@ end end def build_purchase_request(money, credit_card, options) xml = Builder::XmlMarkup.new - xml.tag! 'amount', amount(money) + xml.tag! 'amount', localized_amount(money, options[:currency] || currency(money)) xml.tag! 'currency', options[:currency] || currency(money) xml.tag! 'purchaseOrderNo', options[:order_id].to_s.gsub(/[ ']/, '') xml.tag! 'CreditCardInfo' do xml.tag! 'cardNumber', credit_card.number @@ -122,11 +122,11 @@ def build_reference_request(money, reference, options) xml = Builder::XmlMarkup.new transaction_id, order_id, preauth_id, original_amount = reference.split('*') - xml.tag! 'amount', (money ? amount(money) : original_amount) + xml.tag! 'amount', (money ? localized_amount(money, options[:currency] || currency(money)) : original_amount) xml.tag! 'currency', options[:currency] || currency(money) xml.tag! 'txnID', transaction_id xml.tag! 'purchaseOrderNo', order_id xml.tag! 'preauthID', preauth_id @@ -203,10 +203,10 @@ def build_purchase_using_stored_card_request(money, identification, options) xml = Builder::XmlMarkup.new xml.tag! 'crn', identification xml.tag! 'currency', options[:currency] || currency(money) - xml.tag! 'amount', amount(money) + xml.tag! 'amount', localized_amount(money, options[:currency] || currency(money)) xml.target! end def build_store_request(credit_card, options)