lib/active_merchant/billing/gateways/payway.rb in activemerchant-1.105.0 vs lib/active_merchant/billing/gateways/payway.rb in activemerchant-1.106.0

- old
+ new

@@ -15,11 +15,11 @@ '1' => 'Declined', '2' => 'Erred', '3' => 'Rejected' } - RESPONSE_CODES= { + RESPONSE_CODES = { '00' => 'Completed Successfully', '01' => 'Refer to card issuer', '03' => 'Invalid merchant', '04' => 'Pick-up card', '05' => 'Do not honour', @@ -72,17 +72,17 @@ 'QX' => 'Network Error has occurred', 'QY' => 'Card Type Not Accepted', 'QZ' => 'Zero value transaction' } - TRANSACTIONS = { - :authorize => 'preauth', - :purchase => 'capture', - :capture => 'captureWithoutAuth', - :status => 'query', - :refund => 'refund', - :store => 'registerAccount' + TRANSACTIONS = { + authorize: 'preauth', + purchase: 'capture', + capture: 'captureWithoutAuth', + status: 'query', + refund: 'refund', + store: 'registerAccount' } def initialize(options={}) @options = options @@ -191,18 +191,18 @@ message = "#{SUMMARY_CODES[params[:summary_code]]} - #{RESPONSE_CODES[params[:response_code]]}" success = (params[:summary_code] ? (params[:summary_code] == '0') : (params[:response_code] == '00')) Response.new(success, message, params, - :test => (@options[:merchant].to_s == 'TEST'), - :authorization => post[:order_number] + test: (@options[:merchant].to_s == 'TEST'), + authorization: post[:order_number] ) rescue ActiveMerchant::ResponseError => e raise unless e.response.code == '403' - return Response.new(false, 'Invalid credentials', {}, :test => test?) + return Response.new(false, 'Invalid credentials', {}, test: test?) rescue ActiveMerchant::ClientCertificateError - return Response.new(false, 'Invalid certificate', {}, :test => test?) + return Response.new(false, 'Invalid certificate', {}, test: test?) end end end end