From a4d701ac273f40acb5f95b3ae18f21beee34be67 Mon Sep 17 00:00:00 2001 From: Alma Malambo Date: Thu, 22 Aug 2024 09:36:57 -0500 Subject: [PATCH] Revert "Iveri: Add AuthReversal for Authorizations" This reverts commit 89ddf5322565d8bd7530b547c2f6cf3633b22f5d. --- CHANGELOG | 1 - lib/active_merchant/billing/gateways/iveri.rb | 5 ++--- test/remote/gateways/remote_iveri_test.rb | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b8f0f913fa9..0a3ce14a884 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,7 +16,6 @@ * Decidir: Pass CVV for NT [almalee24] #5205 * NMI: Add customer vault fields [yunnydang] #5215 * CheckoutV2: Add inquire method [almalee24] #5209 -* Iveri: Add AuthReversal for Authorizations [almalee24] #5201 * Decidir & Braintree: Scrub cryptogram and card number [almalee24] #5220 * Naranja: Update valid number check to include luhn10 [DustinHaefele] #5217 * Cybersource: Add apple_pay with discover. [DustinHaefele] #5213 diff --git a/lib/active_merchant/billing/gateways/iveri.rb b/lib/active_merchant/billing/gateways/iveri.rb index 2fa669c21cc..c2cb8aa141a 100644 --- a/lib/active_merchant/billing/gateways/iveri.rb +++ b/lib/active_merchant/billing/gateways/iveri.rb @@ -55,8 +55,7 @@ def refund(money, authorization, options = {}) end def void(authorization, options = {}) - txn_type = options[:reference_type] == :authorize ? 'AuthReversal' : 'Void' - post = build_vxml_request(txn_type, options) do |xml| + post = build_vxml_request('Void', options) do |xml| add_authorization(xml, authorization, options) end @@ -66,7 +65,7 @@ def void(authorization, options = {}) def verify(credit_card, options = {}) MultiResponse.run(:use_first_response) do |r| r.process { authorize(100, credit_card, options) } - r.process(:ignore_result) { void(r.authorization, options.merge(reference_type: :authorize)) } + r.process(:ignore_result) { void(r.authorization, options) } end end diff --git a/test/remote/gateways/remote_iveri_test.rb b/test/remote/gateways/remote_iveri_test.rb index 5933fa60275..0ced8b40be3 100644 --- a/test/remote/gateways/remote_iveri_test.rb +++ b/test/remote/gateways/remote_iveri_test.rb @@ -136,8 +136,8 @@ def test_successful_verify assert_success response assert_equal 'Authorisation', response.responses[0].params['transaction_command'] assert_equal '0', response.responses[0].params['result_status'] - assert_equal 'AuthReversal', response.responses[1].params['transaction_command'] - assert_equal '-1', response.responses[1].params['result_status'] + assert_equal 'Void', response.responses[1].params['transaction_command'] + assert_equal '0', response.responses[1].params['result_status'] assert_equal 'Succeeded', response.message end