lib/active_merchant/billing/gateways/paymill.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/paymill.rb in activemerchant-1.87.0
- old
+ new
@@ -80,11 +80,11 @@
post['account.expiry.month'] = sprintf('%.2i', credit_card.month)
post['account.expiry.year'] = sprintf('%.4i', credit_card.year)
post['account.verification'] = credit_card.verification_value
post['account.email'] = (options[:email] || nil)
post['presentation.amount3D'] = (options[:money] || nil)
- post['presentation.currency3D'] = (options[:currency] || currency( options[:money]))
+ post['presentation.currency3D'] = (options[:currency] || currency(options[:money]))
end
def headers
{ 'Authorization' => ('Basic ' + Base64.strict_encode64("#{@options[:private_key]}:X").chomp) }
end
@@ -126,13 +126,13 @@
end
def action_with_token(action, money, payment_method, options)
options[:money] = money
case payment_method
- when String
+ when String
self.send("#{action}_with_token", money, payment_method, options)
- else
+ else
MultiResponse.run do |r|
r.process { save_card(payment_method, options) }
r.process { self.send("#{action}_with_token", money, r.authorization, options) }
end
end
@@ -312,10 +312,10 @@
50820 => 'Authorisation period expired'
}
def response_message(parsed_response)
return parsed_response['error'] if parsed_response['error']
- return 'Transaction approved.' if (parsed_response['data'] == [])
+ return 'Transaction approved.' if parsed_response['data'] == []
code = parsed_response['data']['response_code'].to_i
RESPONSE_CODES[code] || code.to_s
end