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 61bbc928
authored
Aug 03, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
VSI
1 parent
e0e9b095
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
src/agratek/api/merchant/views/vsi_pulsa.py
src/agratek/api/merchant/views/vsi_pulsa.py
View file @
61bbc92
...
@@ -31,6 +31,8 @@ ERROR#0053#[53] ERROR Produk tidak ditemukan
...
@@ -31,6 +31,8 @@ ERROR#0053#[53] ERROR Produk tidak ditemukan
# 2. Auto Payment: protokol untuk melakukan pembayaran/pembelian tanpa harus
# 2. Auto Payment: protokol untuk melakukan pembayaran/pembelian tanpa harus
# melakukan inquiry terlebih dahulu
# melakukan inquiry terlebih dahulu
from
opensipkd.pasar.models
import
PartnerProduk
"""
"""
REQ :
REQ :
cid={CLIENT_ID}
cid={CLIENT_ID}
...
@@ -96,13 +98,24 @@ class Vendor(VendorClass):
...
@@ -96,13 +98,24 @@ class Vendor(VendorClass):
<serial>4A61D574138A2D6B4B6 </serial>
<serial>4A61D574138A2D6B4B6 </serial>
:return:
:return:
"""
"""
code
=
"rc"
in
data
and
int
(
data
[
"rc"
])
or
0
if
code
:
discount
=
PartnerProduk
.
get_discount
(
self
.
invoice_det
)
harga
=
self
.
vendor_produk
.
produk
.
harga
else
:
discount
=
0
harga
=
0
result
=
dict
(
result
=
dict
(
status
=
"status"
in
data
and
data
[
"status"
]
or
"FAILED"
,
status
=
"status"
in
data
and
data
[
"status"
]
or
"FAILED"
,
code
=
"rc"
in
data
and
int
(
data
[
"rc"
])
or
0
,
code
=
code
,
message
=
"rcm"
in
data
\
message
=
"rcm"
in
data
\
and
(
data
[
"rcm"
]
==
"00000"
and
"Sukses"
or
data
[
"rcm"
])
\
and
(
data
[
"rcm"
]
==
"00000"
and
"Sukses"
or
data
[
"rcm"
])
\
or
"PENDING"
,
or
"PENDING"
,
serial_number
=
"voucherid"
in
data
and
data
[
"voucherid"
]
or
""
serial_number
=
"serialnumber"
in
data
and
data
[
"serialnumber"
]
or
""
,
subtotal
=
harga
,
discount
=
discount
,
total
=
harga
-
discount
)
)
return
result
return
result
...
@@ -150,6 +163,8 @@ class Vendor(VendorClass):
...
@@ -150,6 +163,8 @@ class Vendor(VendorClass):
message
=
e
.
strerror
)
message
=
e
.
strerror
)
log
.
info
(
"VSI PULSA Payment Response:
%
s"
%
(
data
))
log
.
info
(
"VSI PULSA Payment Response:
%
s"
%
(
data
))
self
.
amt_buy
=
"harga"
in
data
and
data
[
"harga"
]
or
self
.
amt_buy
self
.
vend_inv_no
=
"ref_num"
in
data
and
data
[
"ref_num"
]
or
self
.
vend_inv_no
self
.
response
=
data
self
.
response
=
data
self
.
result
=
self
.
pars_data
(
data
)
self
.
result
=
self
.
pars_data
(
data
)
log
.
info
(
"VSI PULSA Payment Result:
%
s"
%
(
self
.
result
))
log
.
info
(
"VSI PULSA Payment Result:
%
s"
%
(
self
.
result
))
...
...
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