Method: WebPay::Charge#refund
- Defined in:
- lib/webpay/charge.rb
#refund(params = {}) ⇒ ChargeResponse
Refund a paid charge specified by charge id. Optional argument amount is to refund partially.
28 29 30 31 32 |
# File 'lib/webpay/charge.rb', line 28 def refund(params = {}) req = WebPay::ChargeRequestRefund.create(params) raw_response = @client._request(:post, 'charges' + '/' + req.id.to_s + '/' + 'refund', req) WebPay::ChargeResponse.new(raw_response) end |