Commit 484a3ba8 authored by Łukasz Nowak's avatar Łukasz Nowak

Simply convert datetimes into string representation.

parent 412cc272
...@@ -4,6 +4,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces ...@@ -4,6 +4,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Document import newTempDocument from Products.ERP5Type.Document import newTempDocument
import hashlib import hashlib
import datetime
try: try:
import suds import suds
...@@ -50,7 +51,10 @@ else: ...@@ -50,7 +51,10 @@ else:
if k in ['transmissionDate', 'presentationDate', 'cardExpirationDate', if k in ['transmissionDate', 'presentationDate', 'cardExpirationDate',
'markDate', 'authDate', 'captureDate']: 'markDate', 'authDate', 'captureDate']:
# crazyiness again # crazyiness again
v = time.strftime('%Y%m%d', time.strptime(str(v), '%Y-%m-%d %H:%M:%S')) if isinstance(v, datetime.datetime):
v = v.strftime('%Y%m%d')
else:
v = time.strftime('%Y%m%d', time.strptime(str(v), '%Y-%m-%d %H:%M:%S'))
v = str(v) v = str(v)
signature += v + '+' signature += v + '+'
signature += self.getServicePassword() signature += self.getServicePassword()
......
28 29
\ 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