structure.py
1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Bersumber dari file yang dikirim oleh Bu Yardian Wensdi pada 25-9-2017
# bernama "Technical Specification ISO 8583.pdf". Pada halaman 2 tertulis
# Release 1.0, 2017, Arvid Theodorus.
from opensipkd.iso8583.network.structure import NETWORK_BITS
#################
# Redefine bits #
#################
TRANSACTION_BITS = NETWORK_BITS.copy()
TRANSACTION_BITS.update({
3: ['Processing', 'Processing Code', 'N', 6, 'n'],
4: ['Amount', 'Transaction Amount', 'N', 12, 'n'],
7: ['Transmission', 'Transmission Date and Time', 'N', 10, 'n'],
11: ['STAN', 'System Trace Audit Number', 'N', 6, 'n'],
32: ['Acquiring', 'Acquiring Institution Code', 'LL', 2+11, 'n'],
33: ['Forwarding', 'Forwarding Institution ID Code', 'LL', 2+97, 'n'],
37: ['Sequence', 'Retrieval Reference Number', 'N', 12, 'n'],
48: ['Additional', 'Additional Data', 'LLL', 3+200, 'ans'],
# 90: ['Original', 'Original Data Element', 'LLL', 3+31, 'ans'],
})
#########
# Bit 3 #
#########
INQUIRY_CODE = '360000'
PAYMENT_CODE = '560000'
#########################
# Response Code, Bit 39 #
#########################
RC_INSUFFICIENT_FUND = '03'
RC_OTHER = '04'
# RC_CREATE_PAYMENT = '05'
RC_NOT_AVAILABLE = '10'
RC_ALREADY_PAID = '13'
RC_PAYMENT_NOT_FOUND = '06'
RC_ALREADY_CANCELLED = '94'
###########################
# Invoice Profile, Bit 48 #
###########################
INVOICE_PROFILE = [
('Invoice ID', 22, 'N'),
('Nama', 30, 'A'),
('Nama Kecamatan', 30, 'A'),
('Nama Kelurahan', 45, 'A'),
('Tagihan', 12, 'N'),
('Denda', 12, 'N'),
('Total Bayar', 12, 'N'), # Pokok + Denda
('NTP', 16, 'N'), # Nomor Transaksi Pemda
]