Commit 70310ce2 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Cédric Le Ninivin

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 6cca79c7
...@@ -215,6 +215,8 @@ class PayzenService(XMLObject, PayzenSOAP): ...@@ -215,6 +215,8 @@ class PayzenService(XMLObject, PayzenSOAP):
elif isinstance(v, datetime.datetime): elif isinstance(v, datetime.datetime):
# for sure date # for sure date
v = v.strftime('%Y%m%d') v = v.strftime('%Y%m%d')
elif isinstance(v, bool):
v = str(int(v))
else: else:
# anything else cast to string # anything else cast to string
v = str(v) 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