From 8dc3e01fbe0deef6ee9876e8df9f45b2b1f84ff4 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 8 Nov 2022 18:39:22 +0100 Subject: [PATCH] payfip_ws: consider cancelled transaction as still waiting for a resolution (#71155) --- eopayment/payfip_ws.py | 2 +- tests/test_payfip_ws.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eopayment/payfip_ws.py b/eopayment/payfip_ws.py index 751cd88..5413a9d 100644 --- a/eopayment/payfip_ws.py +++ b/eopayment/payfip_ws.py @@ -353,7 +353,7 @@ class Payment(PaymentCommon): result = DENIED bank_status = 'refused direct debit' elif response.resultrans == 'A': - result = CANCELLED + result = WAITING bank_status = 'cancelled CB' else: result = ERROR diff --git a/tests/test_payfip_ws.py b/tests/test_payfip_ws.py index d141849..8d128d0 100644 --- a/tests/test_payfip_ws.py +++ b/tests/test_payfip_ws.py @@ -393,7 +393,7 @@ def test_payment_cancelled(history, backend): assert url == 'https://www.payfip.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103' response = backend.response('idop=%s' % payment_id) - assert response.result == eopayment.CANCELLED + assert response.result == eopayment.WAITING assert response.bank_status == 'cancelled CB' assert response.order_id == payment_id assert response.transaction_id == '201912261758460053903194 cc0cb210-1cd4-11ea-8cca-0213ad91a103' @@ -406,7 +406,7 @@ def test_payment_status_cancelled(history, backend, freezer): response = backend.payment_status( transaction_id='cc0cb210-1cd4-11ea-8cca-0213ad91a103', transaction_date=now ) - assert response.result == eopayment.CANCELLED + assert response.result == eopayment.WAITING def test_normalize_objet(): -- 2.37.2