Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
iso8583
/
bjb-samsat-banten
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 b82a3511
authored
Apr 05, 2019
by
Solo Group
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add time pput
1 parent
556de23b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
opensipkd/iso8583/bjb/samsat/banten/doc.py
opensipkd/iso8583/bjb/samsat/transaction.py
opensipkd/iso8583/bjb/samsat/banten/doc.py
View file @
b82a351
...
...
@@ -94,8 +94,9 @@ class Doc(Transaction):
self
.
log_info
(
"REQUEST {}"
.
format
(
data
))
try
:
results
=
requests
.
post
(
url
,
json
=
data
,
headers
=
headers
,
timeout
=
timeout
)
# data=jsondata,
except
Exce
tions
as
e
:
except
Exce
ption
as
e
:
print
(
e
)
return
if
results
.
status_code
!=
200
:
self
.
log_error
(
results
)
...
...
@@ -185,6 +186,8 @@ class Doc(Transaction):
return
self
.
ack_invalid_number
()
data
=
self
.
get_data
()
rows
=
self
.
send_rpc
(
'inquiry'
,
data
)
if
not
rows
:
return
self
.
ack_inquiry_timeout
()
if
'error'
in
rows
:
code
=
rows
[
'error'
][
'code'
]
\
...
...
@@ -562,7 +565,7 @@ class Doc(Transaction):
def
ack_inquiry_timeout
(
self
):
msg
=
ERR_INQUIRY_TIMEOUT
.
format
(
kd_bayar
=
self
.
invoice_id
[
'Nomor Bayar'
])
self
.
ack_
other
(
msg
)
self
.
ack_
timeout
(
msg
)
def
ack_already_paid
(
self
):
msg
=
ERR_ALREADY_PAID
.
format
(
invoice_id
=
self
.
invoice_id_raw
)
...
...
@@ -576,7 +579,7 @@ class Doc(Transaction):
kd_bayar
=
self
.
invoice_profile
[
'Nomor Bayar'
]
ntb
=
self
.
from_iso
.
get_ntb
()
msg
=
ERR_PAYMENT_TIMEOUT
.
format
(
kd_bayar
=
kd_bayar
,
ntb
=
ntb
)
self
.
ack_
other
(
msg
)
self
.
ack_
timeout
(
msg
)
def
ack_payment_failed
(
self
,
result
):
kd_bayar
=
self
.
invoice_profile
[
'Nomor Bayar'
]
...
...
@@ -601,7 +604,7 @@ class Doc(Transaction):
kd_bayar
=
self
.
invoice_profile
[
'Nomor Bayar'
]
ntb
=
self
.
from_iso
.
get_ntb
()
msg
=
ERR_REVERSAL_TIMEOUT
.
format
(
kd_bayar
=
kd_bayar
,
ntb
=
ntb
)
self
.
ack_
other
(
msg
)
self
.
ack_
timeout
(
msg
)
def
ack_reversal_failed
(
self
,
result
):
kd_bayar
=
self
.
invoice_profile
[
'Nomor Bayar'
]
...
...
opensipkd/iso8583/bjb/samsat/transaction.py
View file @
b82a351
...
...
@@ -259,5 +259,8 @@ class Transaction(BaseTransaction, Log):
self
.
setBit
(
62
,
msg
)
BaseTransaction
.
ack_other
(
self
,
msg
)
def
ack_timeout
(
self
,
msg
=
'Biller Timeout'
):
self
.
ack
(
68
,
msg
)
def
set_transaction_code
(
self
,
code
):
self
.
setBit
(
3
,
code
)
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