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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
francois
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
from
Products.ERP5Type.Document
import
newTempDocument
import
hashlib
from
zLOG
import
LOG
,
WARNING
import
datetime
try
:
import
suds
...
...
@@ -12,7 +13,6 @@ except ImportError:
class
PayzenSOAP
:
pass
else
:
import
time
class
PayzenSOAP
:
"""SOAP communication
...
...
@@ -219,10 +219,12 @@ class PayzenService(XMLObject, PayzenSOAP):
elif
k
.
lower
().
endswith
(
'date'
):
# maybe date?
try
:
v
=
time
.
strftime
(
'%Y%m%d'
,
time
.
strptime
(
str
(
v
),
'%Y-%m-%d %H:%M:%S'
))
v
=
datetime
.
datetime
.
strptime
(
str
(
v
),
'%Y-%m-%d %H:%M:%S'
)
except
Exception
:
v
=
str
(
v
)
else
:
ob
[
k
]
=
v
.
strftime
(
output_date_format
)
v
=
v
.
strftime
(
signature_date_format
)
else
:
# anything else cast to string
v
=
str
(
v
)
...
...
bt5/erp5_payzen_secure_payment/bt/revision
View file @
be898a8d
36
\ No newline at end of file
37
\ 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