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 ...@@ -5,6 +5,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Document import newTempDocument from Products.ERP5Type.Document import newTempDocument
import hashlib import hashlib
import datetime import datetime
from zLOG import LOG, WARNING
try: try:
import suds import suds
...@@ -93,8 +94,14 @@ else: ...@@ -93,8 +94,14 @@ else:
v = data_kw[k] v = data_kw[k]
if not isinstance(v, str): if not isinstance(v, str):
data_kw[k] = str(v) data_kw[k] = str(v)
return [data_kw, self._check_transcationInfoSignature(data), try:
str(client.last_sent()), str(client.last_received())] 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): class PayzenService(XMLObject, PayzenSOAP):
meta_type = 'Payzen Service' meta_type = 'Payzen Service'
......
30 31
\ No newline at end of file \ 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