common.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  2. from odoo.addons.payment.tests.common import PaymentCommon
  3. class SipsCommon(PaymentCommon):
  4. @classmethod
  5. def setUpClass(cls):
  6. super().setUpClass()
  7. cls.sips = cls._prepare_provider('sips', update_values={
  8. 'sips_merchant_id': 'dummy_mid',
  9. 'sips_secret': 'dummy_secret',
  10. })
  11. # Override default values
  12. cls.provider = cls.sips
  13. cls.currency = cls.currency_euro
  14. cls.notification_data = {
  15. 'Data': f'captureDay=0|captureMode=AUTHOR_CAPTURE|currencyCode=840'
  16. f'|merchantId=002001000000001|orderChannel=INTERNET|responseCode=00'
  17. f'|transactionDateTime=2022-01-19T18:01:06+01:00'
  18. f'|transactionReference={cls.reference}'
  19. f'|keyVersion=1|acquirerResponseCode=00|amount=10000|authorisationId=12345'
  20. f'|guaranteeIndicator=Y|cardCSCResultCode=4D|panExpiryDate=202201'
  21. f'|paymentMeanBrand=VISA|paymentMeanType=CARD|customerIpAddress=111.11.111.11'
  22. f'|maskedPan=4100##########00|returnContext={{"reference": "{cls.reference}"}}'
  23. f'|scoreValue=-3.0|scoreColor=GREEN|scoreInfo=A3;N;N#SC;N;TRANS=3:2;CUMUL=4500:250000'
  24. f'|scoreProfile=25_BUSINESS_SCORE_PRE_AUTHORISATION|scoreThreshold=-7;-5'
  25. f'|holderAuthentRelegation=N|holderAuthentStatus=3D_SUCCESS'
  26. f'|tokenPan=dp528b9xwknujmkw|transactionOrigin=INTERNET|paymentPattern=ONE_SHOT'
  27. f'|customerMobilePhone=null|mandateAuthentMethod=null|mandateUsage=null'
  28. f'|transactionActors=null|mandateId=null|captureLimitDate=20220119'
  29. f'|dccStatus=null|dccResponseCode=null|dccAmount=null|dccCurrencyCode=null'
  30. f'|dccExchangeRate=null|dccExchangeRateValidity=null|dccProvider=null'
  31. f'|statementReference=tx20220119170050|panEntryMode=MANUAL|walletType=null'
  32. f'|holderAuthentMethod=NOT_SPECIFIED',
  33. 'Encode': '',
  34. 'InterfaceVersion': 'HP_2.4',
  35. 'Seal': 'eb2a499e1abd07f0d9361418f109d940d6cb7bcbaf6ef9385c28651956c96514',
  36. 'locale': 'en',
  37. }