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
Levin Zimmermann
erp5
Commits
21e24f73
Commit
21e24f73
authored
Aug 30, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement cancellation.
parent
189a637c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletion
+56
-1
bt5/erp5_payzen_secure_payment/DocumentTemplateItem/PayzenService.py
...yzen_secure_payment/DocumentTemplateItem/PayzenService.py
+55
-0
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 @
21e24f73
...
@@ -196,6 +196,61 @@ else:
...
@@ -196,6 +196,61 @@ else:
signature
=
False
signature
=
False
return
[
data_kw
,
signature
,
last_sent
,
last_received
]
return
[
data_kw
,
signature
,
last_sent
,
last_received
]
@
setUTCTimeZone
def
soap_cancel
(
self
,
transmissionDate
,
transactionId
,
comment
=
''
):
# prepare with passed parameters
kw
=
dict
(
transmissionDate
=
transmissionDate
,
transactionId
=
transactionId
,
comment
=
comment
)
signature_sorted_key_list
=
[
'shopId'
,
'transmissionDate'
,
'transactionId'
,
'sequenceNb'
,
'ctxMode'
,
'comment'
]
kw
.
update
(
ctxMode
=
self
.
getPayzenVadsCtxMode
(),
shopId
=
self
.
getServiceUsername
(),
sequenceNb
=
1
,
)
kw
[
'wsSignature'
]
=
self
.
_getSignature
(
kw
,
signature_sorted_key_list
)
# Note: Code shall not raise since now, as communication begin and caller
# will have to log sent/received messages.
client
=
suds
.
client
.
Client
(
self
.
wsdl_link
.
getUrlString
())
data
=
client
.
service
.
cancel
(
**
kw
)
# Note: Code shall not raise since now, as communication begin and caller
# will have to log sent/received messages.
try
:
data_kw
=
dict
(
data
)
for
k
in
data_kw
.
keys
():
v
=
data_kw
[
k
]
if
not
isinstance
(
v
,
str
):
data_kw
[
k
]
=
str
(
v
)
except
Exception
:
data_kw
=
{}
signature
=
False
LOG
(
'PayzenService'
,
WARNING
,
'Issue during processing data_kw:'
,
error
=
True
)
else
:
try
:
signature
=
self
.
_check_transactionInfoSignature
(
data
)
except
Exception
:
LOG
(
'PayzenService'
,
WARNING
,
'Issue during signature calculation:'
,
error
=
True
)
signature
=
False
try
:
last_sent
=
str
(
client
.
last_sent
())
except
Exception
:
LOG
(
'PayzenService'
,
WARNING
,
'Issue during converting last_sent to string:'
,
error
=
True
)
signature
=
False
try
:
last_received
=
str
(
client
.
last_received
())
except
Exception
:
LOG
(
'PayzenService'
,
WARNING
,
'Issue during converting last_received to string:'
,
error
=
True
)
signature
=
False
return
[
data_kw
,
signature
,
last_sent
,
last_received
]
finally
:
finally
:
if
present
:
if
present
:
os
.
environ
[
'TZ'
]
=
tz
os
.
environ
[
'TZ'
]
=
tz
...
...
bt5/erp5_payzen_secure_payment/bt/revision
View file @
21e24f73
48
49
\ 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