You can only capture a transaction once, even if you didn’t capture the full amount the first time.
# File lib/active_merchant/billing/gateways/sage_pay.rb, line 90 def capture(money, identification, options = {}) post = {} add_reference(post, identification) add_release_amount(post, money, options) commit(:capture, post) end
# File lib/active_merchant/billing/gateways/sage_pay.rb, line 121 def credit(money, identification, options = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, identification, options) end
# File lib/active_merchant/billing/gateways/sage_pay.rb, line 61 def purchase(money, credit_card, options = {}) requires!(options, :order_id) post = {} add_amount(post, money, options) add_invoice(post, options) add_credit_card(post, credit_card) add_address(post, options) add_customer_data(post, options) commit(:purchase, post) end
Refunding requires a new order_id to passed in, as well as a description
# File lib/active_merchant/billing/gateways/sage_pay.rb, line 109 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
Generated with the Darkfish Rdoc Generator 2.