lib/active_merchant/billing/gateways/smart_ps.rb in activemerchant-1.101.0 vs lib/active_merchant/billing/gateways/smart_ps.rb in activemerchant-1.102.0
- old
+ new
@@ -142,11 +142,11 @@
post[prefix+'company'] = address[:company].to_s
post[prefix+'phone'] = address[:phone].to_s
post[prefix+'zip'] = address[:zip].to_s
post[prefix+'city'] = address[:city].to_s
post[prefix+'country'] = address[:country].to_s
- post[prefix+'state'] = address[:state].blank? ? 'n/a' : address[:state]
+ post[prefix+'state'] = address[:state].blank? ? 'n/a' : address[:state]
end
end
def add_currency(post, money, options)
post[:currency] = options[:currency] || currency(money)
@@ -179,13 +179,13 @@
def add_creditcard(post, creditcard, options)
if options[:store]
post[:customer_vault] = 'add_customer'
post[:customer_vault_id] = options[:store] unless options[:store] == true
end
- post[:ccnumber] = creditcard.number
+ post[:ccnumber] = creditcard.number
post[:cvv] = creditcard.verification_value if creditcard.verification_value?
- post[:ccexp] = expdate(creditcard)
+ post[:ccexp] = expdate(creditcard)
post[:firstname] = creditcard.first_name
post[:lastname] = creditcard.last_name
end
def add_check(post, check, options)
@@ -223,11 +223,11 @@
results
end
def commit(action, money, parameters)
- parameters[:amount] = localized_amount(money, parameters[:currency] || default_currency) if money
+ parameters[:amount] = localized_amount(money, parameters[:currency] || default_currency) if money
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'],
@@ -253,10 +253,10 @@
end
end
def post_data(action, parameters = {})
post = {}
- post[:username] = @options[:login]
+ post[:username] = @options[:login]
post[:password] = @options[:password]
post[:type] = action if action
request = post.merge(parameters).map { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&')
request