lib/active_merchant/billing/gateways/safe_charge.rb in activemerchant-1.83.0 vs lib/active_merchant/billing/gateways/safe_charge.rb in activemerchant-1.84.0
- old
+ new
@@ -41,11 +41,11 @@
end
def capture(money, authorization, options={})
post = {}
auth, transaction_id, token, exp_month, exp_year, _, original_currency = authorization.split('|')
- add_transaction_data('Settle', post, money, (options.merge!({currency: original_currency})))
+ add_transaction_data('Settle', post, money, options.merge!({currency: original_currency}))
post[:sg_AuthCode] = auth
post[:sg_TransactionID] = transaction_id
post[:sg_CCToken] = token
post[:sg_ExpMonth] = exp_month
post[:sg_ExpYear] = exp_year
@@ -54,11 +54,11 @@
end
def refund(money, authorization, options={})
post = {}
auth, transaction_id, token, exp_month, exp_year, _, original_currency = authorization.split('|')
- add_transaction_data('Credit', post, money, (options.merge!({currency: original_currency})))
+ add_transaction_data('Credit', post, money, options.merge!({currency: original_currency}))
post[:sg_CreditType] = 2
post[:sg_AuthCode] = auth
post[:sg_TransactionID] = transaction_id
post[:sg_CCToken] = token
post[:sg_ExpMonth] = exp_month
@@ -77,11 +77,11 @@
end
def void(authorization, options={})
post = {}
auth, transaction_id, token, exp_month, exp_year, original_amount, original_currency = authorization.split('|')
- add_transaction_data('Void', post, (original_amount.to_f * 100), (options.merge!({currency: original_currency})))
+ add_transaction_data('Void', post, (original_amount.to_f * 100), options.merge!({currency: original_currency}))
post[:sg_CreditType] = 2
post[:sg_AuthCode] = auth
post[:sg_TransactionID] = transaction_id
post[:sg_CCToken] = token
post[:sg_ExpMonth] = exp_month
@@ -179,10 +179,10 @@
end
end
end
def element_name_to_symbol(response, childnode)
- name = "#{childnode.name.downcase}"
+ name = childnode.name.downcase
response[name.to_sym] = childnode.text
end
def commit(parameters)
url = (test? ? test_url : live_url)