[IMP] payment_sips: convert config param to proper field

The config param 'sips.key_version' was introduced "some time ago"
in revision a62480ad0f to allow setting the `keyVersion` POST param
to an arbitrary value, allowing other SIPS-comptatible providers to be
used with this module.

This revision (finally) converts this fix to a proper field.

Task-2259942
This commit is contained in:
Damien Bouvy
2020-08-17 12:39:29 +00:00
parent 2b06be6860
commit 9392f9cfc8
3 changed files with 7 additions and 4 deletions
+4 -3
View File
@@ -5,15 +5,16 @@
{
'name': 'Worldline SIPS',
'version': '1.0',
'version': '1.1',
'author': 'Eezee-It',
'category': 'Accounting/Payment Acquirers',
'sequence': 385,
'description': """
Worldline SIPS Payment Acquirer for online payments
Works with Worldline keys version 2.0, contains implementation of
payments acquirer using Worldline SIPS.""",
Implements the Worldline SIPS API for payment acquirers.
Other SIPS providers may be compatible, though this is
not guaranteed.""",
'depends': ['payment'],
'data': [
'views/payment_views.xml',
+2 -1
View File
@@ -51,7 +51,8 @@ class AcquirerSips(models.Model):
sips_secret = fields.Char('Secret Key', size=64, required_if_provider='sips', groups='base.group_user')
sips_test_url = fields.Char("Test url", required_if_provider='sips', default='https://payment-webinit.simu.sips-atos.com/paymentInit')
sips_prod_url = fields.Char("Production url", required_if_provider='sips', default='https://payment-webinit.sips-atos.com/paymentInit')
sips_version = fields.Char("Interface Version", required_if_provider='sips', default='HP_2.3')
sips_version = fields.Char("Interface Version", required_if_provider='sips', default='HP_2.31')
sips_key_version = fields.Char("Security Key Version", required_if_provider='sips', default="2.0")
def _sips_generate_shasign(self, values):
""" Generate the shasign for incoming or outgoing communications.
@@ -14,6 +14,7 @@
<field name="sips_test_url" attrs="{'required':[ ('provider', '=', 'sips'), ('state', '!=', 'disabled')]}" groups='base.group_no_one'/>
<field name="sips_prod_url" attrs="{'required':[ ('provider', '=', 'sips'), ('state', '!=', 'disabled')]}" groups='base.group_no_one'/>
<field name="sips_version" attrs="{'required':[ ('provider', '=', 'sips'), ('state', '!=', 'disabled')]}" groups='base.group_no_one'/>
<field name="sips_key_version" attrs="{'required':[ ('provider', '=', 'sips'), ('state', '!=', 'disabled')]}" groups='base.group_no_one'/>
</group>
</xpath>
</field>