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 da970dbe
authored
Aug 05, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
VSI
1 parent
d6a7e8e5
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 @
da970db
...
@@ -98,9 +98,24 @@ class Vendor(VendorClass):
...
@@ -98,9 +98,24 @@ class Vendor(VendorClass):
self
.
response
=
dict
(
code
=
result
.
status_code
,
message
=
result
.
text
)
self
.
response
=
dict
(
code
=
result
.
status_code
,
message
=
result
.
text
)
log
.
info
(
"Payment Response:
%
s"
%
(
self
.
response
))
log
.
info
(
"Payment Response:
%
s"
%
(
self
.
response
))
return
self
.
set_pending
(
data
,
message
=
result
.
text
)
return
self
.
set_pending
(
data
,
message
=
result
.
text
)
except
requests
.
exceptions
.
HTTPError
as
errh
:
message
=
"Http Error:"
self
.
status
=
-
2
return
self
.
set_pending
(
data
,
message
=
message
)
except
requests
.
exceptions
.
ConnectionError
as
errc
:
message
=
"Error Connecting:"
self
.
status
=
-
2
return
self
.
set_pending
(
data
,
message
=
message
)
except
requests
.
exceptions
.
Timeout
as
errt
:
message
=
"Timeout Error:"
self
.
status
=
-
2
return
self
.
set_pending
(
data
,
message
=
message
)
except
requests
.
exceptions
.
RequestException
as
e
:
except
requests
.
exceptions
.
RequestException
as
e
:
self
.
status
=
0
message
=
"Other HTTP Error"
return
self
.
set_pending
(
data
,
message
=
e
.
strerror
)
self
.
status
=
-
2
return
self
.
set_pending
(
data
,
message
=
message
)
self
.
amt_buy
=
"harga"
in
data
and
data
[
"harga"
]
or
self
.
amt_buy
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
.
vend_inv_no
=
"ref_num"
in
data
and
data
[
"ref_num"
]
or
self
.
vend_inv_no
...
...
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