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 13c71991
authored
Oct 03, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
penambahan cek sukses dan Noref+1
1 parent
30a88181
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
src/agratek/api/merchant/views/tangselpjk/pbb.py
src/agratek/api/merchant/views/tangselpjk/pbb.py
View file @
13c7199
...
@@ -82,7 +82,7 @@ class Vendor(VendorClass):
...
@@ -82,7 +82,7 @@ class Vendor(VendorClass):
discount
=
disc_biller
,
discount
=
disc_biller
,
subtotal
=
sub_total
,
subtotal
=
sub_total
,
admin
=
admin
,
admin
=
admin
,
total
=
sub_total
+
admin
,
total
=
sub_total
+
admin
,
# code=resp["responseCode"],
# code=resp["responseCode"],
# message=resp["responseDesc"],
# message=resp["responseDesc"],
nama
=
resp
[
"nama"
],
nama
=
resp
[
"nama"
],
...
@@ -136,7 +136,10 @@ class Vendor(VendorClass):
...
@@ -136,7 +136,10 @@ class Vendor(VendorClass):
if
resp
is
None
:
if
resp
is
None
:
return
self
.
set_failed
(
typ
=
"inquiry"
)
return
self
.
set_failed
(
typ
=
"inquiry"
)
if
resp
.
status_code
==
200
:
success
=
"responseCode"
in
self
.
response
and
\
self
.
response
[
"responseCode"
]
==
"00"
or
False
if
success
:
parsd
=
self
.
response_field
()
parsd
=
self
.
response_field
()
return
self
.
set_success
(
parsd
,
typ
=
"inquiry"
)
return
self
.
set_success
(
parsd
,
typ
=
"inquiry"
)
else
:
else
:
...
@@ -150,6 +153,9 @@ class Vendor(VendorClass):
...
@@ -150,6 +153,9 @@ class Vendor(VendorClass):
if
self
.
response
[
"responseCode"
]
!=
"00"
:
if
self
.
response
[
"responseCode"
]
!=
"00"
:
return
self
.
inquiry_error
(
self
.
response
)
return
self
.
inquiry_error
(
self
.
response
)
#ditambahkan disini karena minta noRefnya Berbeda
self
.
response
[
"noRef"
]
=
int
(
self
.
response
[
"noRef"
])
+
1
params
=
json
.
dumps
(
self
.
response
)
params
=
json
.
dumps
(
self
.
response
)
log
.
info
(
"Payment url: {} params: {}"
.
format
(
self
.
pay_url
,
params
))
log
.
info
(
"Payment url: {} params: {}"
.
format
(
self
.
pay_url
,
params
))
try
:
try
:
...
@@ -172,7 +178,9 @@ class Vendor(VendorClass):
...
@@ -172,7 +178,9 @@ class Vendor(VendorClass):
self
.
status
=
0
self
.
status
=
0
return
self
.
set_pending
()
return
self
.
set_pending
()
if
resp
.
status_code
==
200
:
success
=
"responseCode"
in
self
.
response
and
\
self
.
response
[
"responseCode"
]
==
"00"
or
False
if
success
:
self
.
status
=
1
# sukses
self
.
status
=
1
# sukses
parsd
=
self
.
response_field
()
parsd
=
self
.
response_field
()
...
@@ -237,4 +245,3 @@ class Vendor(VendorClass):
...
@@ -237,4 +245,3 @@ class Vendor(VendorClass):
#
#
# self.save_log('advice')
# self.save_log('advice')
# return parsd
# return parsd
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