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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
aa8c33dd
Commit
aa8c33dd
authored
Oct 11, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement getInfo SOAP call.
parent
c0542b36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
bt5/erp5_payzen_secure_payment/DocumentTemplateItem/PayzenService.py
...yzen_secure_payment/DocumentTemplateItem/PayzenService.py
+33
-1
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 @
aa8c33dd
...
...
@@ -5,7 +5,39 @@ from Products.ERP5Type.XMLObject import XMLObject
from
Products.ERP5Type.Document
import
newTempDocument
import
hashlib
class
PayzenService
(
XMLObject
):
try
:
import
suds
except
ImportError
:
class
PayzenSOAP
:
pass
else
:
import
time
class
PayzenSOAP
:
def
soap_getInfo
(
self
,
transmissionDate
,
transactionId
):
client
=
suds
.
client
.
Client
(
self
.
wsdl_link
.
getUrlString
())
sorted_keys
=
(
'shopId'
,
'transmissionDate'
,
'transactionId'
,
'sequenceNb'
,
'ctxMode'
)
kw
=
dict
(
transactionId
=
transactionId
,
ctxMode
=
self
.
getPayzenVadsCtxMode
(),
shopId
=
self
.
getServiceUsername
(),
sequenceNb
=
1
,
)
date
=
time
.
strptime
(
transmissionDate
,
'%Y%m%d'
)
signature
=
''
for
k
in
sorted_keys
:
if
k
==
'transmissionDate'
:
# craziness: date format in signature is different then in sent message
v
=
time
.
strftime
(
'%Y%m%d'
,
date
)
kw
[
'transmissionDate'
]
=
time
.
strftime
(
'%Y-%m-%dT%H:%M:%S'
,
date
)
else
:
v
=
kw
[
k
]
signature
+=
str
(
v
)
+
'+'
signature
+=
self
.
getServicePassword
()
kw
[
'wsSignature'
]
=
hashlib
.
sha1
(
signature
).
hexdigest
()
return
client
.
service
.
getInfo
(
**
kw
)
class
PayzenService
(
XMLObject
,
PayzenSOAP
):
meta_type
=
'Payzen Service'
portal_type
=
'Payzen Service'
...
...
bt5/erp5_payzen_secure_payment/bt/revision
View file @
aa8c33dd
22
\ No newline at end of file
23
\ 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