Method: ActiveMerchant::Billing::PayexGateway#refund
- Defined in:
- lib/active_merchant/billing/gateways/payex.rb
#refund(money, authorization, options = {}) ⇒ Object
Public: Refunds a purchase transaction
money - The amount to refund authorization - The authorization token from the purchase request. options - A standard ActiveMerchant options hash: :order_id - The unique order ID for this transaction (required). :vat_amount - The vat amount (optional).
Returns an ActiveMerchant::Billing::Response object
133 134 135 136 137 |
# File 'lib/active_merchant/billing/gateways/payex.rb', line 133 def refund(money, , = {}) requires!(, :order_id) amount = amount(money) send_credit(, amount, ) end |