lib/active_merchant/billing/gateways/merchant_partners.rb in activemerchant-1.103.0 vs lib/active_merchant/billing/gateways/merchant_partners.rb in activemerchant-1.104.0

- old
+ new

@@ -108,11 +108,11 @@ post[:merchantordernumber] = options[:order_id] post[:currency] = options[:currency] || currency(money) end def add_payment_method(post, payment_method) - if(payment_method.is_a?(String)) + if payment_method.is_a?(String) user_profile_id, last_4 = split_authorization(payment_method) post[:userprofileid] = user_profile_id post[:last4digits] = last_4 else post[:ccname] = payment_method.name @@ -125,11 +125,11 @@ end def add_customer_data(post, options) post[:email] = options[:email] if options[:email] post[:ipaddress] = options[:ip] if options[:ip] - if(billing_address = options[:billing_address]) + if (billing_address = options[:billing_address]) post[:billaddr1] = billing_address[:address1] post[:billaddr2] = billing_address[:address2] post[:billcity] = billing_address[:city] post[:billstate] = billing_address[:state] post[:billcountry] = billing_address[:country] @@ -233,10 +233,10 @@ def split_authorization(authorization) authorization.split('|') end def error_message_from(response) - if(response[:status] == 'Declined') + if response[:status] == 'Declined' match = response[:result].match(/DECLINED:\d{10}:(.+):/) match[1] if match end end end