Projet

Général

Profil

0001-tipi-payfip_ws-change-URL-from-www.tipi.budget.gouv..patch

Benjamin Dauvergne, 04 juin 2021 13:01

Télécharger (5 ko)

Voir les différences:

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(-)
eopayment/payfip_ws.py
38 38
                     CANCELLED, ERROR, ResponseError, PaymentException,
39 39
                     WAITING, EXPIRED, force_text, _)
40 40

  
41
WSDL_URL = 'https://www.tipi.budget.gouv.fr/tpa/services/mas_securite/contrat_paiement_securise/PaiementSecuriseService?wsdl'  # noqa: E501
41
WSDL_URL = 'https://www.payfip.gouv.fr/tpa/services/mas_securite/contrat_paiement_securise/PaiementSecuriseService?wsdl'  # noqa: E501
42 42

  
43
SERVICE_URL = 'https://www.tipi.budget.gouv.fr/tpa/services/securite'  # noqa: E501
43
SERVICE_URL = 'https://www.payfip.gouv.fr/tpa/services/securite'  # noqa: E501
44 44

  
45
PAYMENT_URL = 'https://www.tipi.budget.gouv.fr/tpa/paiementws.web'
45
PAYMENT_URL = 'https://www.payfip.gouv.fr/tpa/paiementws.web'
46 46

  
47 47
REFDET_RE = re.compile(r'^[A-Za-z0-9]{1,30}$')
48 48

  
eopayment/resource/PaiementSecuriseService.wsdl
134 134
  </binding>
135 135
  <service name="PaiementSecuriseService">
136 136
    <port name="PaiementSecuriseServicePort" binding="tns:PaiementSecuriseServicePortBinding">
137
      <soap:address location="http://www.tipi.budget.gouv.fr:80/tpa/services/mas_securite/contrat_paiement_securise/PaiementSecuriseService"/>
137
      <soap:address location="https://www.payfip.gouv.fr/tpa/services/mas_securite/contrat_paiement_securise/PaiementSecuriseService"/>
138 138
    </port>
139 139
  </service>
140 140
</definitions>
eopayment/resource/PaiementSecuriseService2.xsd
11 11
      <xs:element name="saisie" type="xs:string" minOccurs="0"/>
12 12
      <xs:element name="urlnotif" type="xs:string" minOccurs="0"/>
13 13
      <xs:element name="urlredirect" type="xs:string" minOccurs="0"/>
14
      <xs:element name="typeAuthentification" type="xs:string" minOccurs="0"/>
15
      <xs:element name="typeUsager" type="xs:string" minOccurs="0"/>
14 16
    </xs:sequence>
15 17
  </xs:complexType>
16 18
</xs:schema>
eopayment/tipi.py
29 29

  
30 30
__all__ = ['Payment']
31 31

  
32
TIPI_URL = 'https://www.tipi.budget.gouv.fr/tpa/paiement.web'
32
TIPI_URL = 'https://www.payfip.gouv.fr/tpa/paiement.web'
33 33
LOGGER = logging.getLogger(__name__)
34 34

  
35 35

  
tests/test_payfip_ws.py
302 302

  
303 303
    assert payment_id == 'cc0cb210-1cd4-11ea-8cca-0213ad91a103'
304 304
    assert kind == eopayment.URL
305
    assert url == 'https://www.tipi.budget.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103'
305
    assert url == 'https://www.payfip.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103'
306 306

  
307 307
    response = backend.response('idop=%s' % payment_id)
308 308
    assert response.result == eopayment.PAID
......
329 329

  
330 330
    assert payment_id == 'cc0cb210-1cd4-11ea-8cca-0213ad91a103'
331 331
    assert kind == eopayment.URL
332
    assert url == 'https://www.tipi.budget.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103'
332
    assert url == 'https://www.payfip.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103'
333 333

  
334 334
    response = backend.response('idop=%s' % payment_id)
335 335
    assert response.result == eopayment.DENIED
......
355 355

  
356 356
    assert payment_id == 'cc0cb210-1cd4-11ea-8cca-0213ad91a103'
357 357
    assert kind == eopayment.URL
358
    assert url == 'https://www.tipi.budget.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103'
358
    assert url == 'https://www.payfip.gouv.fr/tpa/paiementws.web?idop=cc0cb210-1cd4-11ea-8cca-0213ad91a103'
359 359

  
360 360
    response = backend.response('idop=%s' % payment_id)
361 361
    assert response.result == eopayment.CANCELLED
362
-