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 fbf87b4f
authored
Mar 23, 2020
by
yasir
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update
1 parent
aab18d42
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
src/agratek/api/merchant/views/odeo/__init__.py
src/agratek/api/merchant/views/odeo/__init__.py
View file @
fbf87b4
...
...
@@ -61,26 +61,26 @@ class Vendor(VendorClass):
log
.
info
(
"Inquiry Request: url:
%
s params
%
s"
%
(
url
,
params
))
self
.
save_log
(
"inquiry"
)
#
try:
try
:
#
resp = requests.get(url, params=params, verify=False,
#
headers=self.get_headers())
resp
=
requests
.
get
(
url
,
params
=
params
,
verify
=
False
,
headers
=
self
.
get_headers
())
#
print('respon inquiry beneran >>')
#
print(resp.text)
#
except Exception as e:
#
log.info(e)
#
print('error lolable >>')
#
print(e)
#
return
print
(
'respon inquiry beneran >>'
)
print
(
resp
.
text
)
except
Exception
as
e
:
log
.
info
(
e
)
print
(
'error lolable >>'
)
print
(
e
)
return
lolable
=
Lolable
(
self
.
vendor_produk
,
self
.
invoice_det
)
#
lolable = Lolable(self.vendor_produk, self.invoice_det)
resp
=
lolable
.
inquat
(
json
.
dumps
(
params
))
#
resp = lolable.inquat(json.dumps(params))
print
(
'resp_inquat >>'
)
print
(
resp
)
#
print('resp_inquat >>')
#
print(resp)
return
resp
...
...
@@ -177,20 +177,20 @@ class Vendor(VendorClass):
parsd
=
self
.
get_price
()
url
=
self
.
get_url
(
"/prepaid/purchase"
)
#
try:
#
resp = requests.post(url, data=json.dumps(params), verify=False,
#
headers=self.get_headers(), timeout=timeout)
#
print('response purchase beneran >>')
#
print(resp.text)
try
:
resp
=
requests
.
post
(
url
,
data
=
json
.
dumps
(
params
),
verify
=
False
,
headers
=
self
.
get_headers
(),
timeout
=
timeout
)
print
(
'response purchase beneran >>'
)
print
(
resp
.
text
)
#
except Exception as e:
#
print(e)
#
resp = None
except
Exception
as
e
:
print
(
e
)
resp
=
None
lolable
=
Lolable
(
self
.
vendor_produk
,
self
.
invoice_det
)
resp
=
lolable
.
stupeed
(
json
.
dumps
(
params
))
print
(
'response purchase >>'
)
print
(
resp
.
text
)
#
lolable = Lolable(self.vendor_produk, self.invoice_det)
#
resp = lolable.stupeed(json.dumps(params))
#
print('response purchase >>')
#
print(resp.text)
if
resp
is
None
or
not
resp
.
text
:
return
self
.
set_pending
(
parsd
,
typ
=
"payment"
)
...
...
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