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 85ff40f5
authored
Sep 15, 2019
by
Tatang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
open remark
1 parent
a7c7d7c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
src/agratek/api/merchant/views/notify_vendor.py
src/agratek/api/merchant/views/notify_vendor.py
View file @
85ff40f
...
...
@@ -76,19 +76,25 @@ def purchase_notify(order):
def
payment_notify
(
order
):
customer
=
order
.
customer
# if customer
and customer.website:
if
customer
:
# for test
# if customer
: # for test
if
customer
and
customer
.
website
:
url
=
customer
.
website
users
=
customer
.
users
typ
=
"PAYMENT"
key
=
order
.
cust_inv_no
+
users
.
user_name
+
users
.
api_key
+
typ
signature
=
sha256
(
key
)
data
=
order
.
notify
[
"result"
]
# tx_id merchant harus dikirim
tx_id
=
order
.
tx_id
if
not
tx_id
:
pay_request
=
'request'
in
order
.
payment
and
order
.
payment
[
'request'
]
or
{}
tx_id
=
'tx_id'
in
pay_request
and
pay_request
[
'tx_id'
]
or
""
data
.
update
(
dict
(
invoice_no
=
order
.
cust_inv_no
,
signature
=
signature
,
type
=
typ
,
tx_id
=
order
.
tx_id
tx_id
=
tx_id
))
# data.update(order.notify["result"])
# print('>>>', json.dumps(data, indent=4, sort_keys=True))
...
...
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