lib/active_merchant/billing/gateways/inspire.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/inspire.rb in activemerchant-1.87.0

- old
+ new

@@ -31,11 +31,11 @@ # customer_vault_id InspireGateway should use (make sure it's # unique). def authorize(money, creditcard, options = {}) post = {} add_invoice(post, options) - add_payment_source(post, creditcard,options) + add_payment_source(post, creditcard, options) add_address(post, creditcard, options) add_customer_data(post, options) commit('auth', money, post) end @@ -134,15 +134,15 @@ when :credit_card then add_creditcard(params, source, options) when :check then add_check(params, source) end end - def add_customer_vault_id(params,vault_id) + def add_customer_vault_id(params, vault_id) params[:customer_vault_id] = vault_id end - def add_creditcard(post, creditcard,options) + def add_creditcard(post, creditcard, options) if options[:store] post[:customer_vault] = 'add_customer' post[:customer_vault_id] = options[:store] unless options[:store] == true end post[:ccnumber] = creditcard.number @@ -162,21 +162,21 @@ end def parse(body) results = {} body.split(/&/).each do |pair| - key,val = pair.split(%r{=}) + key, val = pair.split(%r{=}) results[key] = val end results end def commit(action, money, parameters) parameters[:amount] = amount(money) if money - response = parse( ssl_post(self.live_url, post_data(action,parameters)) ) + response = parse(ssl_post(self.live_url, post_data(action, parameters))) Response.new(response['response'] == '1', message_from(response), response, :authorization => response['transactionid'], :test => test?, :cvv_result => response['cvvresponse'], @@ -184,11 +184,11 @@ ) end def message_from(response) case response['responsetext'] - when 'SUCCESS','Approved' + when 'SUCCESS', 'Approved' 'This transaction has been approved' when 'DECLINE' 'This transaction has been declined' else response['responsetext'] @@ -199,10 +199,10 @@ post = {} post[:username] = @options[:login] post[:password] = @options[:password] post[:type] = action if action - request = post.merge(parameters).map {|key,value| "#{key}=#{CGI.escape(value.to_s)}"}.join('&') + request = post.merge(parameters).map { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&') request end def determine_funding_source(source) case