Commit ce81da24 authored by Łukasz Nowak's avatar Łukasz Nowak

Never raise during signature calculation.

Caller might try to log the transmission XMLs and raising would result in
aborted transaction.
parent 7674afa1
......@@ -5,6 +5,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Document import newTempDocument
import hashlib
import datetime
from zLOG import LOG, WARNING
try:
import suds
......@@ -93,8 +94,14 @@ else:
v = data_kw[k]
if not isinstance(v, str):
data_kw[k] = str(v)
return [data_kw, self._check_transcationInfoSignature(data),
str(client.last_sent()), str(client.last_received())]
try:
signature = self._check_transcationInfoSignature(data)
except Exception:
LOG('PayzenService', WARNING, 'Issue during signature calculation:',
error=True)
signature = False
return [data_kw, signature, str(client.last_sent()),
str(client.last_received())]
class PayzenService(XMLObject, PayzenSOAP):
meta_type = 'Payzen Service'
......
30
\ No newline at end of file
31
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment