summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bouvy <dbo@odoo.com>2020-05-18 15:02:14 +0000
committerDamien Bouvy <dbo@odoo.com>2020-08-17 12:39:29 +0000
commit9392f9cfc893dc0f8b9bf37763c87900fc07d793 (patch)
tree2b70a5f5ebebaa99893d3d9e907797f6683dcec9
parent2b06be68600b5a15b5c2e3500b2e05394c966535 (diff)
[IMP] payment_sips: convert config param to proper field
The config param 'sips.key_version' was introduced "some time ago" in revision a62480ad0f6 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
-rw-r--r--addons/payment_sips/__manifest__.py7
-rw-r--r--addons/payment_sips/models/payment.py3
-rw-r--r--addons/payment_sips/views/payment_views.xml1
3 files changed, 7 insertions, 4 deletions
diff --git a/addons/payment_sips/__manifest__.py b/addons/payment_sips/__manifest__.py
index f637aa25376..c3afefb2714 100644
--- a/addons/payment_sips/__manifest__.py
+++ b/addons/payment_sips/__manifest__.py
@@ -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',
diff --git a/addons/payment_sips/models/payment.py b/addons/payment_sips/models/payment.py
index 49dbd5b4dbd..09815a9061f 100644
--- a/addons/payment_sips/models/payment.py
+++ b/addons/payment_sips/models/payment.py
@@ -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.
diff --git a/addons/payment_sips/views/payment_views.xml b/addons/payment_sips/views/payment_views.xml
index b6b6c2fae1c..0410bf9ad91 100644
--- a/addons/payment_sips/views/payment_views.xml
+++ b/addons/payment_sips/views/payment_views.xml
@@ -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>