Commit 26bda6ec by Solo Group

local vendor.py

1 parent e02d3541
...@@ -19,9 +19,9 @@ class Vendor(VendorClass): ...@@ -19,9 +19,9 @@ class Vendor(VendorClass):
VendorClass.__init__(self, vendor_produk, invoice_det=invoice_det) VendorClass.__init__(self, vendor_produk, invoice_det=invoice_det)
# id_pel, customer_id, cust_trx, row # id_pel, customer_id, cust_trx, row
settings = get_settings() settings = get_settings()
self.mid = 'tangselpjk_mid' in settings and settings['tangselpjk_mid'] or None self.mid = 'tangselpjk_mid' in settings and settings['tangselpjk_mid'] or ""
self.key = 'tangselpjk_key' in settings and settings['tangselpjk_key'] or None self.key = 'tangselpjk_key' in settings and settings['tangselpjk_key'] or ""
self.url = 'tangselpjk_url' in settings and settings['tangselpjk_url'] or None self.url = 'tangselpjk_url' in settings and settings['tangselpjk_url'] or ""
key = ":".join([self.mid, self.key]).encode() key = ":".join([self.mid, self.key]).encode()
self.auth = base64.b64encode(key).decode() self.auth = base64.b64encode(key).decode()
self.inq_url = '{0}/pbbJson/inq'.format(self.url) self.inq_url = '{0}/pbbJson/inq'.format(self.url)
......
...@@ -256,6 +256,8 @@ class Result(object): ...@@ -256,6 +256,8 @@ class Result(object):
class PulsaResult(Result): class PulsaResult(Result):
pass pass
class PajakResult(Result):
pass
class Rincian(Result): class Rincian(Result):
def rincian(self): def rincian(self):
...@@ -397,3 +399,4 @@ class PdamResult(Rincian): ...@@ -397,3 +399,4 @@ class PdamResult(Rincian):
def sha256(hash_string): def sha256(hash_string):
return hashlib.sha256(hash_string.encode()).hexdigest() 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!