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

- old
+ new

@@ -1,6 +1,6 @@ -require "cgi" +require 'cgi' module ActiveMerchant #:nodoc: module Billing #:nodoc: class MerchantOneGateway < Gateway @@ -86,27 +86,27 @@ parse(ssl_post(BASE_URL,post_data(action, parameters))) end def post_data(action, parameters = {}) parameters.merge!({:type => action}) - ret = "" + ret = '' for key in parameters.keys ret += "#{key}=#{CGI.escape(parameters[key].to_s)}" if key != parameters.keys.last - ret += "&" + ret += '&' end end ret.to_s end def parse(data) responses = CGI.parse(data).inject({}){|h,(k, v)| h[k] = v.first; h} Response.new( - (responses["response"].to_i == 1), - responses["responsetext"], + (responses['response'].to_i == 1), + responses['responsetext'], responses, :test => test?, - :authorization => responses["transactionid"] + :authorization => responses['transactionid'] ) end end end end