lib/active_merchant/billing/gateways/cams.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/cams.rb in activemerchant-1.87.0
- old
+ new
@@ -138,22 +138,22 @@
private
def add_address(post, creditcard, options={})
post[:firstname] = creditcard.first_name
- post[:lastname ] = creditcard.last_name
+ post[:lastname] = creditcard.last_name
return unless options[:billing_address]
address = options[:billing_address]
- post[:address1 ] = address[:address1]
- post[:address2 ] = address[:address2]
- post[:city ] = address[:city]
- post[:state ] = address[:state]
- post[:zip ] = address[:zip]
- post[:country ] = address[:country]
- post[:phone ] = address[:phone]
+ post[:address1] = address[:address1]
+ post[:address2] = address[:address2]
+ post[:city] = address[:city]
+ post[:state] = address[:state]
+ post[:zip] = address[:zip]
+ post[:country] = address[:country]
+ post[:phone] = address[:phone]
end
def add_reference(post, authorization)
transaction_id, authcode = split_authorization(authorization)
post['transactionid'] = transaction_id
@@ -165,19 +165,19 @@
post[:currency] = (options[:currency] || default_currency)
end
def add_payment(post, payment)
post[:ccnumber] = payment.number
- post[:ccexp ] = "#{payment.month.to_s.rjust(2,"0")}#{payment.year.to_s[-2..-1]}"
- post[:cvv ] = payment.verification_value
+ post[:ccexp] = "#{payment.month.to_s.rjust(2, "0")}#{payment.year.to_s[-2..-1]}"
+ post[:cvv] = payment.verification_value
end
def parse(body)
kvs = body.split('&')
kvs.inject({}) { |h, kv|
- k,v = kv.split('=')
+ k, v = kv.split('=')
h[k] = v
h
}
end
@@ -217,10 +217,10 @@
def post_data(parameters = {})
parameters[:password] = @options[:password]
parameters[:username] = @options[:username]
- parameters.collect{|k,v| "#{k}=#{v}" }.join('&')
+ parameters.collect { |k, v| "#{k}=#{v}" }.join('&')
end
def error_code_from(response)
STANDARD_ERROR_CODE_MAPPING[response['response_code']]
end