Method: ActiveMerchant::Billing::WorldpayUsGateway#refund

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

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



52
53
54
55
56
57
58
59
# File 'lib/active_merchant/billing/gateways/worldpay_us.rb', line 52

def refund(amount, authorization, options = {})
  post = {}
  add_invoice(post, amount, options)
  add_reference(post, authorization)
  add_customer_data(post, options)

  commit('refund', options, post)
end