From 601b0f9c5790b63b91b027600195759d782db119 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 4 Jun 2021 11:37:58 +0200 Subject: [PATCH 1/2] tipi/payfip_ws: change URL from www.tipi.budget.gouv.fr to www.payfip.gouv.fr (#46688) WSDL are also updated to their last version. --- eopayment/payfip_ws.py | 6 +++--- eopayment/resource/PaiementSecuriseService.wsdl | 2 +- eopayment/resource/PaiementSecuriseService2.xsd | 2 ++ eopayment/tipi.py | 2 +- tests/test_payfip_ws.py | 6 +++--- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/eopayment/payfip_ws.py b/eopayment/payfip_ws.py index 11e9a7e..984e7dc 100644 --- a/eopayment/payfip_ws.py +++ b/eopayment/payfip_ws.py @@ -38,11 +38,11 @@ from .common import (PaymentCommon, PaymentResponse, URL, PAID, DENIED, CANCELLED, ERROR, ResponseError, PaymentException, WAITING, EXPIRED, force_text, _) -WSDL_URL = 'https://www.tipi.budget.gouv.fr/tpa/services/mas_securite/contrat_paiement_securise/PaiementSecuriseService?wsdl' # noqa: E501 +WSDL_URL = 'https://www.payfip.gouv.fr/tpa/services/mas_securite/contrat_paiement_securise/PaiementSecuriseService?wsdl' # noqa: E501 -SERVICE_URL = 'https://www.tipi.budget.gouv.fr/tpa/services/securite' # noqa: E501 +SERVICE_URL = 'https://www.payfip.gouv.fr/tpa/services/securite' # noqa: E501 -PAYMENT_URL = 'https://www.tipi.budget.gouv.fr/tpa/paiementws.web' +PAYMENT_URL = 'https://www.payfip.gouv.fr/tpa/paiementws.web' REFDET_RE = re.compile(r'^[A-Za-z0-9]{1,30}$') diff --git a/eopayment/resource/PaiementSecuriseService.wsdl b/eopayment/resource/PaiementSecuriseService.wsdl index 4ed4851..d387399 100644 --- a/eopayment/resource/PaiementSecuriseService.wsdl +++ b/eopayment/resource/PaiementSecuriseService.wsdl @@ -134,7 +134,7 @@ - + diff --git a/eopayment/resource/PaiementSecuriseService2.xsd b/eopayment/resource/PaiementSecuriseService2.xsd index 2f13e75..0e3f528 100644 --- a/eopayment/resource/PaiementSecuriseService2.xsd +++ b/eopayment/resource/PaiementSecuriseService2.xsd @@ -11,6 +11,8 @@ + + \ No newline at end of file diff --git a/eopayment/tipi.py b/eopayment/tipi.py index 6a17230..c78010c 100644 --- a/eopayment/tipi.py +++ b/eopayment/tipi.py @@ -29,7 +29,7 @@ import warnings __all__ = ['Payment'] -TIPI_URL = 'https://www.tipi.budget.gouv.fr/tpa/paiement.web' +TIPI_URL = 'https://www.payfip.gouv.fr/tpa/paiement.web' LOGGER = logging.getLogger(__name__) diff --git a/tests/test_payfip_ws.py b/tests/test_payfip_ws.py index 5479c39..b1ce47f 100644 --- a/tests/test_payfip_ws.py +++ b/tests/test_payfip_ws.py @@ -302,7 +302,7 @@ def test_payment_ok(payfip, backend): assert payment_id == 'cc0cb210-1cd4-11ea-8cca-0213ad91a103' assert kind == eopayment.URL - assert url == 'https://www.tipi.budget.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103' + 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.PAID @@ -329,7 +329,7 @@ def test_payment_denied(history, backend): assert payment_id == 'cc0cb210-1cd4-11ea-8cca-0213ad91a103' assert kind == eopayment.URL - assert url == 'https://www.tipi.budget.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103' + 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.DENIED @@ -355,7 +355,7 @@ def test_payment_cancelled(history, backend): assert payment_id == 'cc0cb210-1cd4-11ea-8cca-0213ad91a103' assert kind == eopayment.URL - assert url == 'https://www.tipi.budget.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103' + 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 -- 2.32.0.rc0