Method: ActiveMerchant::Billing::TrustCommerceGateway#capture
- Defined in:
- lib/active_merchant/billing/gateways/trust_commerce.rb
#capture(money, authorization, options = {}) ⇒ Object
capture() is the second half of the preauth(authorize)/postauth(capture) model. The TC API docs call this postauth, we preserve active_merchant’s nomenclature of capture() for consistency with the rest of the library. To process a postauthorization with TC, you need an amount in cents or a money object, and a TC transid.
187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/active_merchant/billing/gateways/trust_commerce.rb', line 187 def capture(money, , = {}) transaction_id, = () parameters = { amount: amount(money), transid: transaction_id } add_aggregator(parameters, ) add_custom_fields(parameters, ) commit('postauth', parameters) end |