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 181b1140
authored
Mar 11, 2020
by
yasir
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update
1 parent
eb668ec9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
src/agratek/api/merchant/views/odeo/dummy.py
src/agratek/api/merchant/views/odeo/dummy.py
View file @
181b114
...
@@ -59,7 +59,7 @@ class Lolable(object):
...
@@ -59,7 +59,7 @@ class Lolable(object):
dumb_data
=
{}
dumb_data
=
{}
dumb_data
[
'order_id'
]
=
1
dumb_data
[
'order_id'
]
=
1
dumb_data
[
'message'
]
=
''
dumb_data
[
'message'
]
=
''
if
self
.
kategori
==
'e-pulsa'
:
if
self
.
kategori
==
'e-pulsa'
:
dumb_data
[
'price'
]
=
(
self
.
get_price_epulsa
(
denom
)
*
1000
)
dumb_data
[
'price'
]
=
(
self
.
get_price_epulsa
(
denom
)
*
1000
)
else
:
else
:
...
@@ -361,6 +361,7 @@ class Lolable(object):
...
@@ -361,6 +361,7 @@ class Lolable(object):
return
self
return
self
def
kirim_notify
(
order_id
):
def
kirim_notify
(
order_id
):
print
(
'masuk kirim_notify >>'
)
# try:
# try:
# {
# {
# "order_id": 1,
# "order_id": 1,
...
@@ -382,6 +383,11 @@ def kirim_notify(order_id):
...
@@ -382,6 +383,11 @@ def kirim_notify(order_id):
signature
=
sha256
(
"{order_id}{mid}{key}{status}"
.
format
(
order_id
=
order_id
,
mid
=
mid
,
key
=
key
,
status
=
'COMPLETED'
))
signature
=
sha256
(
"{order_id}{mid}{key}{status}"
.
format
(
order_id
=
order_id
,
mid
=
mid
,
key
=
key
,
status
=
'COMPLETED'
))
dict_notify
[
'signature'
]
=
signature
dict_notify
[
'signature'
]
=
signature
print
(
'kirim notify >>'
)
print
(
'website >>'
)
print
(
website
)
print
(
'dict_notify >>'
)
print
(
dict_notify
)
requests
.
post
(
website
,
data
=
json
.
dumps
(
dict_notify
),
timeout
=
30
)
requests
.
post
(
website
,
data
=
json
.
dumps
(
dict_notify
),
timeout
=
30
)
# requests.post(fake_web, data=json.dumps(dict_notify), timeout=30)
# requests.post(fake_web, data=json.dumps(dict_notify), timeout=30)
# except Exception as e:
# except Exception as e:
...
...
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