Skip to content
Snippets Groups Projects
Unverified Commit 82a90bc0 authored by Joren Van Onder's avatar Joren Van Onder
Browse files

[FIX] pos_mercury: decode bytes from ir.ui.view render and requests

Due to switching to P3.

opw-779720
parent 2dfcc189
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ class MercuryTransaction(models.Model):
data['memo'] = "Odoo " + service.common.exp_version()['server_version']
def _do_request(self, template, data):
xml_transaction = self.env.ref(template).render(data)
xml_transaction = self.env.ref(template).render(data).decode()
if not data['merchant_id'] or not data['merchant_pwd']:
return "not setup"
......@@ -64,7 +64,7 @@ class MercuryTransaction(models.Model):
try:
r = requests.post('https://w1.mercurypay.com/ws/ws.asmx', data=xml_transaction, headers=headers, timeout=65)
r.raise_for_status()
response = werkzeug.utils.unescape(r.content)
response = werkzeug.utils.unescape(r.content.decode())
except:
response = "timeout"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment