Files
odoo_source/addons/payment_ogone/tests/common.py
T
Florian Damhaut fda68f9e34 [IMP] payment_ogone: add possibility to use sha256
SHA1 is going to be deprecated by ogone.

This change try to keep current behaviour while adding the
possibility to use SHA256 and SHA512 via a Selection field
available in the developer mode.

opw-2766648

X-original-commit: b0df4af

See also:
- https://github.com/odoo/upgrade/pull/3490
- https://github.com/odoo/documentation/pull/1902

closes odoo/odoo#88628

Related: odoo/documentation#1902
Related: odoo/upgrade#3490
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-23 23:48:08 +02:00

39 lines
1.2 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.payment.tests.common import PaymentCommon
class OgoneCommon(PaymentCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
super().setUpClass(chart_template_ref=chart_template_ref)
cls.ogone = cls._prepare_acquirer('ogone', update_values={
'ogone_pspid': 'dummy',
'ogone_userid': 'dummy',
'ogone_password': 'dummy',
'ogone_shakey_in': 'dummy',
'ogone_shakey_out': 'dummy',
'ogone_hash_function': 'sha1',
})
cls.acquirer = cls.ogone
cls.currency = cls.currency_euro
cls.notification_data = {
'AAVADDRESS': 'NO',
'amount': '1111.11',
'CARDNO': 'XXXXXXXXXXXX1111',
'CN': 'Dummy Customer Name',
'currency': 'USD',
'IP': '101.00.111.22',
'NCERROR': '0',
'orderID': cls.reference,
'PAYID': '01234567899',
'PM': 'CreditCard',
'SHASIGN': '2CE444D2260D914EA7E56450B7B28F189238553B',
'STATUS': '9', # 'Payment requested' (done)
'TRXDATE': '01/31/22',
}