Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Kunto
/
backoffice
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0f487f14
authored
Sep 23, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add notify test
1 parent
63d68582
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
src/agratek/api/merchant/views/notify_vendor.py
src/agratek/api/merchant/views/notify_vendor.py
View file @
0f487f1
...
...
@@ -116,14 +116,14 @@ def payment_notify(order):
@view_config
(
route_name
=
'api-vendor-notify'
,
renderer
=
'json'
)
def
api_vendor_notify
(
request
):
vendor_nm
=
request
.
matchdict
[
'name'
]
log
.
info
(
"NOTIFY BEGIN {}"
.
format
(
vendor_nm
))
try
:
data
=
json
.
loads
(
request
.
text
)
except
:
data
=
request
.
POST
and
dict
(
request
.
POST
.
items
())
or
dict
(
request
.
GET
.
items
())
if
vendor_nm
==
"test"
:
log
.
info
(
"
TEST NOTIFY
{}"
.
format
(
data
))
log
.
info
(
"
NOTIFY TEST
{}"
.
format
(
data
))
return
modul
=
'.notify'
...
...
@@ -131,8 +131,10 @@ def api_vendor_notify(request):
moduls
=
import_module
(
modul
,
pckgs
)
typ
=
'proses'
cls
=
hasattr
(
moduls
,
typ
)
and
getattr
(
moduls
,
typ
)
or
None
log
.
info
(
"NOTIFY MODULES {} {} {}"
.
format
(
pckgs
,
moduls
,
typ
))
if
cls
:
order
=
cls
(
data
)
log
.
info
(
"NOTIFY END"
)
@view_config
(
route_name
=
'api-vendor-test'
,
renderer
=
"string"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment