summaryrefslogtreecommitdiff
path: root/addons/payment/models
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-05-15 17:27:24 +0200
committerOlivier Dony <odo@openerp.com>2017-08-20 23:25:54 +0200
commit481a00dc4b82bc1b2cbbd6079a147fe230ac57bd (patch)
tree975b178f4e4a3733b904bd511d905160014ec009 /addons/payment/models
parent9d83784f1df18306b6166fd92a0573f39bf6262d (diff)
[FIX] P3: hash/hmac payload must be bytes
Diffstat (limited to 'addons/payment/models')
-rw-r--r--addons/payment/models/payment_acquirer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py
index 623676c7a9c..909536ac95c 100644
--- a/addons/payment/models/payment_acquirer.py
+++ b/addons/payment/models/payment_acquirer.py
@@ -583,7 +583,7 @@ class PaymentTransaction(models.Model):
token = '%s%s%s' % (self.callback_model_id.model,
self.callback_res_id,
self.sudo().callback_method)
- return hmac.new(str(secret), token, hashlib.sha256).hexdigest()
+ return hmac.new(secret.encode('utf-8'), token.encode('utf-8'), hashlib.sha256).hexdigest()
# --------------------------------------------------
# FORM RELATED METHODS