lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.13.0 vs lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.14.0

- old
+ new

@@ -103,20 +103,25 @@ action = abort_or_void_from(identification) commit(action, post) end - # Crediting requires a new order_id to passed in, as well as a description - def credit(money, identification, options = {}) + # Refunding requires a new order_id to passed in, as well as a description + def refund(money, identification, options = {}) requires!(options, :order_id, :description) post = {} add_credit_reference(post, identification) add_amount(post, money, options) add_invoice(post, options) commit(:credit, post) + end + + def credit(money, identification, options = {}) + deprecated CREDIT_DEPRECATION_MESSAGE + refund(money, identification, options) end private def add_reference(post, identification) order_id, transaction_id, authorization, security_key = identification.split(';')