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 26bda6ec
authored
Sep 12, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
local vendor.py
1 parent
e02d3541
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
src/agratek/api/merchant/views/tangselpjk/pbb.py
src/agratek/api/merchant/views/vendor.py
src/agratek/api/merchant/views/tangselpjk/pbb.py
View file @
26bda6e
...
@@ -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
)
...
...
src/agratek/api/merchant/views/vendor.py
View file @
26bda6e
...
@@ -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
()
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