Commit 26bda6ec by Solo Group

local vendor.py

1 parent e02d3541
......@@ -19,9 +19,9 @@ class Vendor(VendorClass):
VendorClass.__init__(self, vendor_produk, invoice_det=invoice_det)
# id_pel, customer_id, cust_trx, row
settings = get_settings()
self.mid = 'tangselpjk_mid' in settings and settings['tangselpjk_mid'] or None
self.key = 'tangselpjk_key' in settings and settings['tangselpjk_key'] or None
self.url = 'tangselpjk_url' in settings and settings['tangselpjk_url'] or None
self.mid = 'tangselpjk_mid' in settings and settings['tangselpjk_mid'] or ""
self.key = 'tangselpjk_key' in settings and settings['tangselpjk_key'] or ""
self.url = 'tangselpjk_url' in settings and settings['tangselpjk_url'] or ""
key = ":".join([self.mid, self.key]).encode()
self.auth = base64.b64encode(key).decode()
self.inq_url = '{0}/pbbJson/inq'.format(self.url)
......
......@@ -256,6 +256,8 @@ class Result(object):
class PulsaResult(Result):
pass
class PajakResult(Result):
pass
class Rincian(Result):
def rincian(self):
......@@ -397,3 +399,4 @@ class PdamResult(Rincian):
def sha256(hash_string):
return hashlib.sha256(hash_string.encode()).hexdigest()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!