lib/active_merchant/billing/gateways/smart_ps.rb in activemerchant-1.114.0 vs lib/active_merchant/billing/gateways/smart_ps.rb in activemerchant-1.116.0
- old
+ new
@@ -121,23 +121,23 @@
add_address(post, options[:billing_address] || options[:address])
add_customer_data(post, options)
commit(nil, nil, post)
end
- alias_method :unstore, :delete
+ alias unstore delete
private
def add_customer_data(post, options)
post[:email] = options[:email] if options.has_key? :email
post[:ipaddress] = options[:ip] if options.has_key? :ip
end
- def add_address(post, address, prefix='')
+ def add_address(post, address, prefix = '')
prefix += '_' unless prefix.blank?
- unless address.blank? or address.values.blank?
+ unless address.blank? || address.values.blank?
post[prefix + 'address1'] = address[:address1].to_s
post[prefix + 'address2'] = address[:address2].to_s unless address[:address2].blank?
post[prefix + 'company'] = address[:company].to_s
post[prefix + 'phone'] = address[:phone].to_s
post[prefix + 'zip'] = address[:zip].to_s
@@ -161,11 +161,11 @@
def add_invoice(post, options)
post[:orderid] = options[:order_id].to_s.gsub(/[^\w.]/, '')
end
- def add_payment_source(params, source, options={})
+ def add_payment_source(params, source, options = {})
case determine_funding_source(source)
when :vault then add_customer_vault_id(params, source)
when :credit_card then add_creditcard(params, source, options)
when :check then add_check(params, source, options)
end
@@ -228,11 +228,10 @@
response = parse(ssl_post(self.live_url, post_data(action, parameters)))
Response.new(response['response'] == '1', message_from(response), response,
authorization: (response['transactionid'] || response['customer_vault_id']),
test: test?,
cvv_result: response['cvvresponse'],
- avs_result: { code: response['avsresponse'] }
- )
+ avs_result: { code: response['avsresponse'] })
end
def expdate(creditcard)
year = sprintf('%.04i', creditcard.year)
month = sprintf('%.02i', creditcard.month)