Method: ActiveMerchant::Billing::CommerceHubGateway#refund

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

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



65
66
67
68
69
70
71
72
# File 'lib/active_merchant/billing/gateways/commerce_hub.rb', line 65

def refund(money, authorization, options = {})
  post = {}
  add_invoice(post, money, options) if money
  add_transaction_details(post, options)
  add_reference_transaction_details(post, authorization, options, :refund)

  commit('refund', post, options)
end