Skip to content

Commit

Permalink
[FIX] payment_sips: allow to customize key_version
Browse files Browse the repository at this point in the history
Some sips provider don't use 2 as key_version.
E.g. mercanet uses '1' as production key.

Now we allow to override it in Ir Config Parameter for stable version.

Todo:
Need to make it customizable by end user into the configuration of acquirer.

Courtesy of BEK for reporting

opw-1916316

closes odoo#30185
  • Loading branch information
JKE-be authored and jpp-odoo committed Jan 14, 2019
1 parent e176749 commit 6e3661d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/payment_sips/models/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def sips_form_generate_values(self, values):
if self.environment == 'prod':
# For production environment, key version 2 is required
merchant_id = getattr(self, 'sips_merchant_id')
key_version = '2'
key_version = self.env['ir.config_parameter'].sudo().get_param('sips.key_version', '2')
else:
# Test key provided by Atos Wordline works only with version 1
merchant_id = '002001000000001'
Expand Down

0 comments on commit 6e3661d

Please sign in to comment.