Commit e306a8b2 by Owo Sugiana

Tambah trx_type 031 untuk cek status pembayaran

1 parent 96b5e15d
dist dist
*egg-info *egg-info
__pycache__ __pycache__
build
0.1.5 21-1-2024
---------------
- Tambah trx_type 031 untuk cek status pembayaran
0.1.4 28-11-2021 0.1.4 28-11-2021
---------------- ----------------
- Penggunaan pkgutil agar lebih fleksibel saat pip install -e - Penggunaan pkgutil agar lebih fleksibel saat pip install -e
......
...@@ -69,6 +69,10 @@ def is_reversal(data): ...@@ -69,6 +69,10 @@ def is_reversal(data):
return data['trx_type'] == METHOD_CODE['reversal'] return data['trx_type'] == METHOD_CODE['reversal']
def is_status(data):
return data['trx_type'] == METHOD_CODE['status']
def get_template_response(data): def get_template_response(data):
if is_inquiry(data): if is_inquiry(data):
return InquiryResponse() return InquiryResponse()
......
...@@ -2,19 +2,20 @@ INQUIRY_RESP_FIELDS = ( ...@@ -2,19 +2,20 @@ INQUIRY_RESP_FIELDS = (
'Response Code', 'Response Code',
'Biller Name', 'Biller Name',
'Bill Amount', 'Bill Amount',
'Bill Ref', # STAN 'Bill Ref', # Field linkaja_trx.id
'Notification Message') 'Notification Message')
PAYMENT_RESP_FIELDS = ( PAYMENT_RESP_FIELDS = (
'Response Code', 'Response Code',
'Transaction ID', # NTP 'Transaction ID', # NTP
'Bill Ref', # STAN 'Bill Ref', # Field linkaja_trx.inquiry_id
'Notification Message') 'Notification Message')
METHOD = { METHOD = {
'021': 'inquiry', '021': 'inquiry',
'022': 'payment', '022': 'payment',
'023': 'reversal'} '023': 'reversal',
'031': 'status'}
METHOD_CODE = dict() METHOD_CODE = dict()
for key, value in METHOD.items(): for key, value in METHOD.items():
METHOD_CODE[value] = key METHOD_CODE[value] = key
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!