Method: ActiveMerchant::Billing::SafeChargeGateway#capture

Defined in:
lib/active_merchant/billing/gateways/safe_charge.rb

#capture(money, authorization, options = {}) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/active_merchant/billing/gateways/safe_charge.rb', line 57

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 }))
  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