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

- old
+ new

@@ -71,16 +71,16 @@ def add_customer_data(form, options) form[:email] = options[:email].to_s.slice(0, 100) unless options[:email].blank? form[:customer_code] = options[:customer].to_s.slice(0, 10) unless options[:customer].blank? end - def add_invoice(form,options) + def add_invoice(form, options) form[:invoice_number] = (options[:order_id] || options[:invoice]).to_s.slice(0, 10) form[:description] = options[:description].to_s.slice(0, 255) end - def add_address(form,options) + def add_address(form, options) billing_address = options[:billing_address] || options[:address] if billing_address form[:avs_address] = billing_address[:address1].to_s.slice(0, 30) form[:address2] = billing_address[:address2].to_s.slice(0, 30) @@ -136,11 +136,11 @@ def commit(action, money, parameters) parameters[:amount] = amount(money) parameters[:transaction_type] = self.actions[action] - response = parse( ssl_post(test? ? self.test_url : self.live_url, post_data(parameters)) ) + response = parse(ssl_post(test? ? self.test_url : self.live_url, post_data(parameters))) Response.new(response['result'] == APPROVED, message_from(response), response, :test => @options[:test] || test?, :authorization => authorization_from(response), :avs_result => { :code => response['avs_response'] }, @@ -163,10 +163,10 @@ end # Parse the response message def parse(msg) resp = {} - msg.split(self.delimiter).collect{|li| + msg.split(self.delimiter).collect { |li| key, value = li.split('=') resp[key.strip.gsub(/^ssl_/, '')] = value.to_s.strip } resp end