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 9397fc9e
authored
Aug 30, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
-vsi pln post
1 parent
ceaf8afd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
src/agratek/api/merchant/views/vsi/pln_post.py
src/agratek/api/merchant/views/vsi/pln_post.py
View file @
9397fc9
...
...
@@ -84,16 +84,6 @@ class Vendor(VendorClass):
elif
"status"
in
data
and
data
[
"status"
]
and
data
[
"status"
]
==
"ERROR"
:
self
.
status
=
-
1
code
=
"rc"
in
data
and
int
(
data
[
"rc"
])
or
500
if
code
==
0
:
self
.
status
=
1
message
=
"SUCCESS"
else
:
self
.
status
=
vsi_status
[
str
(
code
)][
"status"
]
if
self
.
status
==
-
3
:
message
=
"GAGAL"
else
:
message
=
"PENDING"
meter
=
"startend"
in
data
and
data
[
"startend"
]
or
""
"""
{
...
...
@@ -118,6 +108,19 @@ class Vendor(VendorClass):
"""
bulan
=
"bulan"
in
data
and
data
[
"bulan"
]
.
split
(
" "
)
bulan
=
bulan
and
bulan
[
0
]
or
0
code
=
"rc"
in
data
and
int
(
data
[
"rc"
])
or
500
if
code
==
0
:
self
.
status
=
1
message
=
"SUCCESS"
else
:
self
.
status
=
vsi_status
[
str
(
code
)][
"status"
]
if
self
.
status
==
-
3
:
message
=
"GAGAL"
else
:
message
=
"PENDING"
if
code
==
14
:
code
=
54
message
=
"GAGAL"
return
{
"code"
:
code
,
...
...
@@ -166,6 +169,9 @@ class Vendor(VendorClass):
data
=
dict
(
xmltodict
.
parse
(
resp
.
text
)[
"root"
])
self
.
response
=
data
data
=
self
.
pars_data
(
data
)
if
data
[
"code"
]
!=
0
:
return
self
.
set_failed
()
self
.
result
=
data
return
self
.
set_success
(
data
)
...
...
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