Commit cb31a34f authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Eteri

erp5_payzen_secure_payment: Convert boolean to 1 or 0 on Payzen

According to Payzen API, boolean should be translated into 0 or 1 in order to be part of the signature.
The only value which contains a boolean is "litige" which can cause signature miss-match without
this change.
parent f8a3c77c
......@@ -303,6 +303,8 @@ class PayzenService(XMLObject, PayzenSOAP):
elif isinstance(v, datetime.datetime):
# for sure date
v = v.strftime('%Y%m%d')
elif isinstance(v, bool):
v = str(int(v))
else:
# anything else cast to string
v = str(v)
......
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