lib/active_merchant/billing/gateways/webpay.rb in activemerchant-1.114.0 vs lib/active_merchant/billing/gateways/webpay.rb in activemerchant-1.116.0

- old
+ new

@@ -49,11 +49,11 @@ if options[:customer] MultiResponse.run(:first) do |r| r.process { commit(:post, "customers/#{CGI.escape(options[:customer])}/", post, options) } - return r unless options[:set_default] and r.success? and !r.params['id'].blank? + return r unless options[:set_default] && r.success? && !r.params['id'].blank? r.process { update_customer(options[:customer], default_card: r.params['id']) } end else commit(:post, 'customers', post, options) @@ -87,10 +87,10 @@ def headers(options = {}) { 'Authorization' => 'Basic ' + Base64.encode64(@api_key.to_s + ':').strip, 'User-Agent' => "Webpay/v1 ActiveMerchantBindings/#{ActiveMerchant::VERSION}", 'X-Webpay-Client-User-Agent' => user_agent, - 'X-Webpay-Client-User-Metadata' => {ip: options[:ip]}.to_json + 'X-Webpay-Client-User-Metadata' => { ip: options[:ip] }.to_json } end end end end