Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
be898a8d
Commit
be898a8d
authored
Oct 24, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix from string date manipulation.
parent
1634c4a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
bt5/erp5_payzen_secure_payment/DocumentTemplateItem/PayzenService.py
...yzen_secure_payment/DocumentTemplateItem/PayzenService.py
+5
-3
bt5/erp5_payzen_secure_payment/bt/revision
bt5/erp5_payzen_secure_payment/bt/revision
+1
-1
No files found.
bt5/erp5_payzen_secure_payment/DocumentTemplateItem/PayzenService.py
View file @
be898a8d
...
@@ -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
from
zLOG
import
LOG
,
WARNING
from
zLOG
import
LOG
,
WARNING
import
datetime
try
:
try
:
import
suds
import
suds
...
@@ -12,7 +13,6 @@ except ImportError:
...
@@ -12,7 +13,6 @@ except ImportError:
class
PayzenSOAP
:
class
PayzenSOAP
:
pass
pass
else
:
else
:
import
time
class
PayzenSOAP
:
class
PayzenSOAP
:
"""SOAP communication
"""SOAP communication
...
@@ -219,10 +219,12 @@ class PayzenService(XMLObject, PayzenSOAP):
...
@@ -219,10 +219,12 @@ class PayzenService(XMLObject, PayzenSOAP):
elif
k
.
lower
().
endswith
(
'date'
):
elif
k
.
lower
().
endswith
(
'date'
):
# maybe date?
# maybe date?
try
:
try
:
v
=
time
.
strftime
(
'%Y%m%d'
,
time
.
strptime
(
str
(
v
),
v
=
datetime
.
datetime
.
strptime
(
str
(
v
),
'%Y-%m-%d %H:%M:%S'
)
'%Y-%m-%d %H:%M:%S'
))
except
Exception
:
except
Exception
:
v
=
str
(
v
)
v
=
str
(
v
)
else
:
ob
[
k
]
=
v
.
strftime
(
output_date_format
)
v
=
v
.
strftime
(
signature_date_format
)
else
:
else
:
# anything else cast to string
# anything else cast to string
v
=
str
(
v
)
v
=
str
(
v
)
...
...
bt5/erp5_payzen_secure_payment/bt/revision
View file @
be898a8d
36
37
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment