Commit ebf37c00 by solo

a

1 parent a1b7ce15
......@@ -19,7 +19,7 @@ class Vendor(VendorClass):
self.key = 'odeo_key' in settings and settings['odeo_key'] or None
self.url = 'odeo_url' in settings and settings['odeo_url'] or None
key = ":".join([self.mid, self.key]).encode()
self.auth = base64.b64encode(key)
self.auth = base64.b64encode(key).decode()
def request_post(self, params, url=None):
......@@ -43,7 +43,7 @@ class Vendor(VendorClass):
# PLN ONLY
if not self.v_produk_kd or not self.bill_no:
return
b
if self.v_produk_kd =='PLN' and self.v_produk_kd != 'PLNPASCA':
params = dict(
data=dict(
......@@ -91,7 +91,6 @@ class Vendor(VendorClass):
def payment(self):
if not self.v_produk_kd or not self.bill_no:
return
params = dict(
data=dict(
denom=self.v_produk_kd,
......@@ -104,7 +103,7 @@ class Vendor(VendorClass):
content = None
if resp and resp.text:
content = json.loads(resp.text)
if resp.ok:
#todo mapping content
"""
......@@ -139,6 +138,7 @@ class Vendor(VendorClass):
"""
result = content
else:
content = json.loads(resp.text)
result = dict(code=resp.status_code,
message=resp.text)
self.response = content
......
......@@ -345,7 +345,7 @@ class VendorClass(object):
row.inquiry = dict(request=self.request,
response=self.response)
elif typ == 'payment':
row.inquiry = dict(request=self.request,
row.payment = dict(request=self.request,
response=self.response)
elif typ == 'advice':
row.advice = dict(request=self.request,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!