lib/active_merchant/billing/gateways/safe_charge.rb in activemerchant-1.123.0 vs lib/active_merchant/billing/gateways/safe_charge.rb in activemerchant-1.124.0
- old
+ new
@@ -60,10 +60,11 @@
post[:sg_AuthCode] = auth
post[:sg_TransactionID] = transaction_id
post[:sg_CCToken] = token
post[:sg_ExpMonth] = exp_month
post[:sg_ExpYear] = exp_year
+ post[:sg_Email] = options[:email]
commit(post)
end
def refund(money, authorization, options = {})
@@ -124,12 +125,14 @@
end
private
def add_transaction_data(trans_type, post, money, options)
+ currency = options[:currency] || currency(money)
+
post[:sg_TransType] = trans_type
- post[:sg_Currency] = (options[:currency] || currency(money))
- post[:sg_Amount] = amount(money)
+ post[:sg_Currency] = currency
+ post[:sg_Amount] = localized_amount(money, currency)
post[:sg_ClientLoginID] = @options[:client_login_id]
post[:sg_ClientPassword] = @options[:client_password]
post[:sg_ResponseFormat] = '4'
post[:sg_Version] = VERSION
post[:sg_ClientUniqueID] = options[:order_id] if options[:order_id]