Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Taufik Yulianto
/
esipkd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 79f4f8c7
authored
Nov 16, 2023
by
taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix sipandu bjbqris, va
1 parent
8533a404
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
esipkd/views/bjb_qris.py
esipkd/views/bjb_va.py
esipkd/views/bjb_qris.py
View file @
79f4f8c
...
@@ -492,7 +492,9 @@ def callback(request, data):
...
@@ -492,7 +492,9 @@ def callback(request, data):
if
not
get_va
:
if
not
get_va
:
return
render_to_response
(
'json'
,
return
render_to_response
(
'json'
,
dict
(
response_code
=
'-1'
,
response_message
=
'VA Number not Found'
))
dict
(
response_code
=
'-1'
,
response_message
=
'VA Number not Found'
))
cekbayar
(
get_va
.
invoice_no
,
request
,
1
)
if
cekbayar
(
get_va
.
invoice_no
,
request
,
1
):
return
render_to_response
(
'json'
,
dict
(
response_code
=
'-1'
,
response_message
=
'Failed to update'
))
get_va
.
status
=
'status'
in
data
and
data
[
'status'
]
\
get_va
.
status
=
'status'
in
data
and
data
[
'status'
]
\
and
str
(
data
[
'status'
])
or
get_va
.
status
and
str
(
data
[
'status'
])
or
get_va
.
status
get_va
.
transaction_amount
=
'transaction_amount'
in
data
and
data
[
'transaction_amount'
]
\
get_va
.
transaction_amount
=
'transaction_amount'
in
data
and
data
[
'transaction_amount'
]
\
...
@@ -517,14 +519,14 @@ def callback(request, data):
...
@@ -517,14 +519,14 @@ def callback(request, data):
if
int
(
get_va
.
status
)
==
2
and
not
pay
.
status
:
if
int
(
get_va
.
status
)
==
2
and
not
pay
.
status
:
get_va
.
status
=
'1'
get_va
.
status
=
'1'
try
:
DBSession
.
add
(
get_va
)
if
DBSession
.
add
(
get_va
):
DBSession
.
flush
()
DBSession
.
flush
()
if
not
sendrpc
(
request
,
get_va
.
invoice_no
):
if
not
sendrpc
(
request
,
get_va
.
invoice_no
):
return
log
.
error
(
'Error send BJBQRIS to pemda'
)
return
render_to_response
(
'json'
,
return
render_to_response
(
'json'
,
dict
(
response_code
=
'0000'
,
response_message
=
'Success'
))
dict
(
response_code
=
'0000'
,
response_message
=
'Success'
))
e
xcept
:
e
lse
:
return
render_to_response
(
'json'
,
return
render_to_response
(
'json'
,
dict
(
response_code
=
'-1'
,
response_message
=
'Failed to update'
))
dict
(
response_code
=
'-1'
,
response_message
=
'Failed to update'
))
...
...
esipkd/views/bjb_va.py
View file @
79f4f8c
...
@@ -574,7 +574,9 @@ def callback(request, data):
...
@@ -574,7 +574,9 @@ def callback(request, data):
if
not
get_va
:
if
not
get_va
:
return
render_to_response
(
'json'
,
return
render_to_response
(
'json'
,
dict
(
response_code
=
'-1'
,
response_message
=
'VA Number not Found'
))
dict
(
response_code
=
'-1'
,
response_message
=
'VA Number not Found'
))
cekbayar
(
get_va
.
invoice_no
,
request
,
1
)
if
cekbayar
(
get_va
.
invoice_no
,
request
,
1
):
return
render_to_response
(
'json'
,
dict
(
response_code
=
'-1'
,
response_message
=
'Failed to update'
))
get_va
.
status
=
'status'
in
data
and
data
[
'status'
]
\
get_va
.
status
=
'status'
in
data
and
data
[
'status'
]
\
and
str
(
data
[
'status'
])
or
get_va
.
status
and
str
(
data
[
'status'
])
or
get_va
.
status
get_va
.
transaction_amount
=
'transaction_amount'
in
data
and
data
[
'transaction_amount'
]
\
get_va
.
transaction_amount
=
'transaction_amount'
in
data
and
data
[
'transaction_amount'
]
\
...
@@ -599,14 +601,13 @@ def callback(request, data):
...
@@ -599,14 +601,13 @@ def callback(request, data):
if
int
(
get_va
.
status
)
==
2
and
not
pay
.
status
:
if
int
(
get_va
.
status
)
==
2
and
not
pay
.
status
:
get_va
.
status
=
'1'
get_va
.
status
=
'1'
try
:
if
DBSession
.
add
(
get_va
):
DBSession
.
add
(
get_va
)
DBSession
.
flush
()
DBSession
.
flush
()
if
not
sendrpc
(
request
,
get_va
.
invoice_no
):
if
not
sendrpc
(
request
,
get_va
.
invoice_no
):
return
log
.
error
(
'Error send BJBVA to pemda'
)
return
render_to_response
(
'json'
,
return
render_to_response
(
'json'
,
dict
(
response_code
=
'0000'
,
response_message
=
'Success'
))
dict
(
response_code
=
'0000'
,
response_message
=
'Success'
))
e
xcept
:
e
lse
:
return
render_to_response
(
'json'
,
return
render_to_response
(
'json'
,
dict
(
response_code
=
'-1'
,
response_message
=
'Failed to update'
))
dict
(
response_code
=
'-1'
,
response_message
=
'Failed to update'
))
...
...
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