Method: ActiveMerchant::Billing::TrustCommerceGateway#refund
- Defined in:
- lib/active_merchant/billing/gateways/trust_commerce.rb
#refund(money, identification, options = {}) ⇒ Object
refund() allows you to return money to a card that was previously billed. You need to supply the amount, in cents or a money object, that you want to refund, and a TC transid for the transaction that you are refunding.
201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/active_merchant/billing/gateways/trust_commerce.rb', line 201 def refund(money, identification, = {}) transaction_id, = (identification) parameters = { amount: amount(money), transid: transaction_id } add_aggregator(parameters, ) add_custom_fields(parameters, ) commit('credit', parameters) end |