Method: ActiveMerchant::Billing::PaypalCommonAPI#refund
- Defined in:
- lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb
permalink #refund(money, identification, options = {}) ⇒ Object
Refunds a transaction.
For a full refund pass nil for the amount:
gateway.refund nil, 'G39883289DH238'
This will automatically make the :refund_type be “Full”.
For a partial refund just pass the amount as usual:
gateway.refund 100, 'UBU83983N920'
137 138 139 |
# File 'lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb', line 137 def refund(money, identification, = {}) commit 'RefundTransaction', build_refund_request(money, identification, ) end |