From 265f9ab5090e68ca4dc1e4147a262aaec1897a29 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 14 Sep 2017 11:24:47 +0200 Subject: [PATCH] [FIX] payment_sips: allow to override the default atos url. Sips is generic, and others services that Atos use the same protocol. It is not user-friendly, but that allow user to use alternative service like 'Sogenactif'. In next version, we need to add field on config to specify it and the InterfaceVersion that can differ according to the provider. --- addons/payment_sips/models/payment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/payment_sips/models/payment.py b/addons/payment_sips/models/payment.py index f7024d3b025..f7796bb5e2a 100644 --- a/addons/payment_sips/models/payment.py +++ b/addons/payment_sips/models/payment.py @@ -48,7 +48,8 @@ class AcquirerSips(models.Model): 'prod': 'https://payment-webinit.sips-atos.com/paymentInit', 'test': 'https://payment-webinit.simu.sips-atos.com/paymentInit', } - return {'sips_form_url': url.get(environment, url['test']), } + icp_value = self.env['ir.config_parameter'].sudo().get_param('acquirer_sips_url_%s' % environment) + return {'sips_form_url': icp_value or url.get(environment, url['test']), } def _sips_generate_shasign(self, values): """ Generate the shasign for incoming or outgoing communications.