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 890b0299
authored
Aug 30, 2019
by
solo
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://git.opensipkd.com/pasar/api-merchant
2 parents
a0b8229d
54e7cc83
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
src/agratek/api/merchant/views/vsi/pln_post.py
src/agratek/api/merchant/views/vsi/pln_pre.py
src/agratek/api/merchant/views/vsi/pln_post.py
View file @
890b029
...
@@ -108,7 +108,15 @@ class Vendor(VendorClass):
...
@@ -108,7 +108,15 @@ class Vendor(VendorClass):
"""
"""
bulan
=
"bulan"
in
data
and
data
[
"bulan"
]
.
split
(
" "
)
bulan
=
"bulan"
in
data
and
data
[
"bulan"
]
.
split
(
" "
)
bulan
=
bulan
and
bulan
[
0
]
or
0
bulan
=
bulan
and
bulan
[
0
]
or
0
code
=
"rc"
in
data
and
data
[
'rc'
]
==
'0000'
and
0
or
int
(
data
[
"rc"
])
or
500
if
"rc"
in
data
:
if
data
[
'rc'
]
==
'0000'
:
code
=
0
else
:
code
=
int
(
data
[
"rc"
])
else
:
code
=
500
# code = "rc" in data and data['rc']=='0000' and 0 or int(data["rc"]) or 500
if
code
==
0
:
if
code
==
0
:
self
.
status
=
1
self
.
status
=
1
message
=
"SUCCESS"
message
=
"SUCCESS"
...
...
src/agratek/api/merchant/views/vsi/pln_pre.py
View file @
890b029
...
@@ -74,7 +74,15 @@ class Vendor(VendorClass):
...
@@ -74,7 +74,15 @@ class Vendor(VendorClass):
elif
"status"
in
data
and
data
[
"status"
]
and
data
[
"status"
]
==
"ERROR"
:
elif
"status"
in
data
and
data
[
"status"
]
and
data
[
"status"
]
==
"ERROR"
:
self
.
status
=
-
1
self
.
status
=
-
1
code
=
"rc"
in
data
and
data
[
'rc'
]
==
'0000'
and
0
or
int
(
data
[
"rc"
])
or
500
if
"rc"
in
data
:
if
data
[
'rc'
]
==
'0000'
:
code
=
0
else
:
code
=
int
(
data
[
"rc"
])
else
:
code
=
500
# code = "rc" in data and data['rc']=='0000' and 0 or int(data["rc"]) or 500
log
.
info
(
"VSI Result Code: {} {}"
.
format
(
code
,
data
))
log
.
info
(
"VSI Result Code: {} {}"
.
format
(
code
,
data
))
if
code
==
0
:
if
code
==
0
:
self
.
status
=
1
self
.
status
=
1
...
...
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