Method: ActiveMerchant::Billing::DataCashGateway#credit
- Defined in:
- lib/active_merchant/billing/gateways/data_cash.rb
#credit(money, reference_or_credit_card, options = {}) ⇒ Object
Refund to a card
Parameters
-
moneyThe amount to be refunded as an Integer value in cents. Set to nil for a full refund on existing transaction. -
reference_or_credit_cardThe credit card you want to refund OR the datacash_reference for the existing transaction you are refunding -
optionsAre ignored when refunding via reference to an existing transaction, otherwise-
:order_idA unique reference for this order (corresponds to merchantreference in datacash documentation) :address-
billing address for card
-
141 142 143 144 145 146 147 148 149 |
# File 'lib/active_merchant/billing/gateways/data_cash.rb', line 141 def credit(money, reference_or_credit_card, = {}) if reference_or_credit_card.is_a?(String) ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE refund(money, reference_or_credit_card) else request = build_refund_request(money, reference_or_credit_card, ) commit(request) end end |