lib/active_merchant/billing/gateways/nab_transact.rb in activemerchant-1.79.2 vs lib/active_merchant/billing/gateways/nab_transact.rb in activemerchant-1.80.0

- old
+ new

@@ -4,11 +4,11 @@ module Billing #:nodoc: # The National Australia Bank provide a payment gateway that seems to # be a rebadged Securepay Australia service, though some differences exist. class NabTransactGateway < Gateway API_VERSION = 'xml-4.2' - PERIODIC_API_VERSION = "spxml-4.2" + PERIODIC_API_VERSION = 'spxml-4.2' class_attribute :test_periodic_url, :live_periodic_url self.test_url = 'https://demo.transact.nab.com.au/xmlapi/payment' self.live_url = 'https://transact.nab.com.au/live/xmlapi/payment' @@ -82,11 +82,11 @@ def supports_scrubbing? true end def scrub(transcript) - return "" if transcript.blank? + return '' if transcript.blank? transcript. gsub(%r((<cardNumber>)[^<]+(<))i, '\1[FILTERED]\2'). gsub(%r((<cvv>)[^<]+(<))i, '\1[FILTERED]\2'). gsub(%r((<password>)[^<]+(<))i, '\1[FILTERED]\2') end @@ -154,12 +154,12 @@ xml.tag! 'password', @options[:password] end xml.tag! 'RequestType', 'Payment' xml.tag! 'Payment' do - xml.tag! 'TxnList', "count" => 1 do - xml.tag! 'Txn', "ID" => 1 do + xml.tag! 'TxnList', 'count' => 1 do + xml.tag! 'Txn', 'ID' => 1 do xml.tag! 'txnType', TRANSACTIONS[action] xml.tag! 'txnSource', 23 xml << body end end @@ -185,11 +185,11 @@ xml.tag! 'password', @options[:password] end xml.tag! 'RequestType', 'Periodic' xml.tag! 'Periodic' do - xml.tag! 'PeriodicList', "count" => 1 do - xml.tag! 'PeriodicItem', "ID" => 1 do + xml.tag! 'PeriodicList', 'count' => 1 do + xml.tag! 'PeriodicItem', 'ID' => 1 do xml.tag! 'actionType', action.to_s xml.tag! 'periodicType', PERIODIC_TYPES[action] if PERIODIC_TYPES[action] xml << body end end