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 a7c7d7c4
authored
Sep 15, 2019
by
Tatang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
kirim tx_id mrc
1 parent
f4aee097
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
src/agratek/api/merchant/views/notify_vendor.py
src/agratek/api/merchant/views/np/__init__.py
src/agratek/api/merchant/views/notify_vendor.py
View file @
a7c7d7c
...
...
@@ -76,7 +76,8 @@ def purchase_notify(order):
def
payment_notify
(
order
):
customer
=
order
.
customer
if
customer
and
customer
.
website
:
# if customer and customer.website:
if
customer
:
# for test
url
=
customer
.
website
users
=
customer
.
users
typ
=
"PAYMENT"
...
...
@@ -86,12 +87,15 @@ def payment_notify(order):
data
.
update
(
dict
(
invoice_no
=
order
.
cust_inv_no
,
signature
=
signature
,
type
=
typ
type
=
typ
,
tx_id
=
order
.
tx_id
))
# data.update(order.notify["result"])
# print('>>>', json.dumps(data, indent=4, sort_keys=True))
js
=
get_jsonrpc
(
method
=
"notify"
,
params
=
dict
(
data
=
data
))
log
.
info
(
"Notify:
%
s
%
s"
%
(
url
,
js
))
try
:
# pass
requests
.
post
(
url
,
data
=
js
,
timeout
=
20
)
except
:
pass
...
...
src/agratek/api/merchant/views/np/__init__.py
View file @
a7c7d7c
...
...
@@ -569,7 +569,7 @@ def get_result(response, pay_method):
# cancel_amt="cancelAmt" in response and int(response["cancelAmt"]) or 0,
# deposit_date="depositDt" in response and response["depositDt"] or "",
# deposit_time="depositTm" in response and response["depositTm"] or "",
# tx_id=
response[''], # <=
# tx_id=
"", # <= diisi tx_id merchant saat request register
invoice_no
=
"referenceNo"
in
response
and
response
[
"referenceNo"
]
or
""
,
amount
=
"amt"
in
response
and
int
(
response
[
"amt"
])
or
0
,
match_cl
=
"matchCl"
in
response
and
int
(
response
[
"matchCl"
])
or
0
,
...
...
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