001/*
002 * jPOS Project [http://jpos.org]
003 * Copyright (C) 2000-2026 jPOS Software SRL
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018
019package org.jpos.iso.packager;
020
021import org.jpos.iso.*;
022
023/**
024 * ISO 8583 v1993 Binary Packager<br>
025 * <b>WARNING UNTESTED</b>
026 *
027 * @author <a href="mailto:u_arunkumar@yahoo.com">Arun Kumar U</a>
028 * @author <a href="mailto:apr@cs.com.uy">Alejandro P. Revilla</a>
029 * @version $Id$
030 * @see ISOPackager
031 * @see ISOBasePackager
032 * @see ISOComponent
033 */
034public class ISO93BPackager extends ISOBasePackager {
035    private static final boolean pad = false;
036    protected ISOFieldPackager fld[] = {
037    /*000*/ new IFB_NUMERIC (  4, "Message Type Indicator", pad),
038    /*001*/ new IFB_BITMAP  ( 16, "Bitmap"),
039    /*002*/ new IFB_LLNUM   ( 19, "Primary Account number", pad),
040    /*003*/ new IFB_NUMERIC (  6, "Processing Code", pad),
041    /*004*/ new IFB_NUMERIC ( 12, "Amount, Transaction", pad),
042    /*005*/ new IFB_NUMERIC ( 12, "Amount, Reconciliation", pad),
043    /*006*/ new IFB_NUMERIC ( 12, "Amount, Cardholder billing", pad),
044    /*007*/ new IFB_NUMERIC ( 10, "Date and time, transmission", pad),
045    /*008*/ new IFB_NUMERIC (  8, "Amount, Cardholder billing fee", pad),
046    /*009*/ new IFB_NUMERIC (  8, "Conversion rate, Reconciliation", pad),
047    /*010*/ new IFB_NUMERIC (  8, "Conversion rate, Cardholder billing", pad),
048    /*011*/ new IFB_NUMERIC (  6, "Systems trace audit number", pad),
049    /*012*/ new IFB_NUMERIC ( 12, "Date and time, Local transaction", pad),
050    /*013*/ new IFB_NUMERIC (  4, "Date, Effective", pad),
051    /*014*/ new IFB_NUMERIC (  4, "Date, Expiration", pad),
052    /*015*/ new IFB_NUMERIC (  6, "Date, Settlement", pad),
053    /*016*/ new IFB_NUMERIC (  4, "Date, Conversion", pad),
054    /*017*/ new IFB_NUMERIC (  4, "Date, Capture", pad),
055    /*018*/ new IFB_NUMERIC (  4, "Merchant type", pad),
056    /*019*/ new IFB_NUMERIC (  3, "Country code, Acquiring institution", pad),
057    /*020*/ new IFB_NUMERIC (  3, "Country code, Primary account number", pad),
058    /*021*/ new IFB_NUMERIC (  3, "Country code, Forwarding institution", pad),
059    /*022*/ new IF_CHAR     ( 12, "Point of service data code"),
060    /*023*/ new IFB_NUMERIC (  3, "Card sequence number", pad),
061    /*024*/ new IFB_NUMERIC (  3, "Function code", pad),
062    /*025*/ new IFB_NUMERIC (  4, "Message reason code", pad),
063    /*026*/ new IFB_NUMERIC (  4, "Card acceptor business code", pad),
064    /*027*/ new IFB_NUMERIC (  1, "Approval code length", pad),
065    /*028*/ new IFB_NUMERIC (  6, "Date, Reconciliation", pad),
066    /*029*/ new IFB_NUMERIC (  3, "Reconciliation indicator", pad),
067    /*030*/ new IFB_NUMERIC ( 24, "Amounts, original", pad),
068    /*031*/ new IFB_LLCHAR  ( 99, "Acquirer reference data"),
069    /*032*/ new IFB_LLNUM   ( 11, "Acquirer institution ident code", pad),
070    /*033*/ new IFB_LLNUM   ( 11, "Forwarding institution ident code", pad),
071    /*034*/ new IFB_LLCHAR  ( 28, "Primary account number, extended"),
072    /*035*/ new IFB_LLCHAR  ( 37, "Track 2 data"),
073    /*036*/ new IFB_LLLCHAR (104, "Track 3 data"),
074    /*037*/ new IF_CHAR     ( 12, "Retrieval reference number"),
075    /*038*/ new IF_CHAR     (  6, "Approval code"),
076    /*039*/ new IFB_NUMERIC (  3, "Action code", pad),
077    /*040*/ new IFB_NUMERIC (  3, "Service code", pad),
078    /*041*/ new IF_CHAR     (  8, "Card acceptor terminal identification"),
079    /*042*/ new IF_CHAR     ( 15, "Card acceptor identification code"),
080    /*043*/ new IFB_LLCHAR  ( 99, "Card acceptor name/location"),
081    /*044*/ new IFB_LLCHAR  ( 99, "Additional response data"),
082    /*045*/ new IFB_LLCHAR  ( 76, "Track 1 data"),
083    /*046*/ new IFB_LLLCHAR (204, "Amounts, Fees"),
084    /*047*/ new IFB_LLLCHAR (999, "Additional data - national"),
085    /*048*/ new IFB_LLLCHAR (999, "Additional data - private"),
086    /*049*/ new IF_CHAR     (  3, "Currency code, Transaction"),
087    /*050*/ new IF_CHAR     (  3, "Currency code, Reconciliation"),
088    /*051*/ new IF_CHAR     (  3, "Currency code, Cardholder billing"),
089    /*052*/ new IFB_BINARY  (  8, "Personal identification number (PIN) data"),
090    /*053*/ new IFB_LLBINARY( 48, "Security related control information"),
091    /*054*/ new IFB_LLLCHAR (120, "Amounts, additional"),
092    /*055*/ new IFB_LLLBINARY(255,"IC card system related data"),
093    /*056*/ new IFB_LLNUM   ( 35, "Original data elements", pad),
094    /*057*/ new IFB_NUMERIC (  3, "Authorization life cycle code", pad),
095    /*058*/ new IFB_LLNUM   ( 11, "Authorizing agent institution Id Code", pad),
096    /*059*/ new IFB_LLLCHAR (999, "Transport data"),
097    /*060*/ new IFB_LLLCHAR (999, "Reserved for national use"),
098    /*061*/ new IFB_LLLCHAR (999, "Reserved for national use"),
099    /*062*/ new IFB_LLLCHAR (999, "Reserved for private use"),
100    /*063*/ new IFB_LLLCHAR (999, "Reserved for private use"),
101    /*064*/ new IFB_BINARY  (  8, "Message authentication code field"),
102    /*065*/ new IFB_BINARY  (  8, "Reserved for ISO use"),
103    /*066*/ new IFB_LLLCHAR (204, "Amounts, original fees"),
104    /*067*/ new IFB_NUMERIC (  2, "Extended payment data", pad),
105    /*068*/ new IFB_NUMERIC (  3, "Country code, receiving institution", pad),
106    /*069*/ new IFB_NUMERIC (  3, "Country code, settlement institution", pad),
107    /*070*/ new IFB_NUMERIC (  3, "Country code, authorizing agent Inst.", pad),
108    /*071*/ new IFB_NUMERIC (  8, "Message number", pad),
109    /*072*/ new IFB_LLLCHAR (999, "Data record"),
110    /*073*/ new IFB_NUMERIC (  6, "Date, action", pad),
111    /*074*/ new IFB_NUMERIC ( 10, "Credits, number", pad),
112    /*075*/ new IFB_NUMERIC ( 10, "Credits, reversal number", pad),
113    /*076*/ new IFB_NUMERIC ( 10, "Debits, number", pad),
114    /*077*/ new IFB_NUMERIC ( 10, "Debits, reversal number", pad),
115    /*078*/ new IFB_NUMERIC ( 10, "Transfer, number", pad),
116    /*079*/ new IFB_NUMERIC ( 10, "Transfer, reversal number", pad),
117    /*080*/ new IFB_NUMERIC ( 10, "Inquiries, number", pad),
118    /*081*/ new IFB_NUMERIC ( 10, "Authorizations, number", pad),
119    /*082*/ new IFB_NUMERIC ( 10, "Inquiries, reversal number", pad),
120    /*083*/ new IFB_NUMERIC ( 10, "Payments, number", pad),
121    /*084*/ new IFB_NUMERIC ( 10, "Payments, reversal number", pad),
122    /*085*/ new IFB_NUMERIC ( 10, "Fee collections, number", pad),
123    /*086*/ new IFB_NUMERIC ( 16, "Credits, amount", pad),
124    /*087*/ new IFB_NUMERIC ( 16, "Credits, reversal amount", pad),
125    /*088*/ new IFB_NUMERIC ( 16, "Debits, amount", pad),
126    /*089*/ new IFB_NUMERIC ( 16, "Debits, reversal amount", pad),
127    /*090*/ new IFB_NUMERIC ( 10, "Authorizations, reversal number", pad),
128    /*091*/ new IFB_NUMERIC (  3, "Country code, transaction Dest. Inst.", pad),
129    /*092*/ new IFB_NUMERIC (  3, "Country code, transaction Orig. Inst.", pad),
130    /*093*/ new IFB_LLNUM   ( 11, "Transaction Dest. Inst. Id code", pad),
131    /*094*/ new IFB_LLNUM   ( 11, "Transaction Orig. Inst. Id code", pad),
132    /*095*/ new IFB_LLCHAR  ( 99, "Card issuer reference data"),
133    /*096*/ new IFB_LLLBINARY(999,"Key management data"),
134    /*097*/ new IFB_AMOUNT  (1+16,"Amount, Net reconciliation", pad),
135    /*098*/ new IF_CHAR     ( 25, "Payee"),
136    /*099*/ new IFB_LLCHAR  ( 11, "Settlement institution Id code"),
137    /*100*/ new IFB_LLNUM   ( 11, "Receiving institution Id code", pad),
138    /*101*/ new IFB_LLCHAR  ( 17, "File name"),
139    /*102*/ new IFB_LLCHAR  ( 28, "Account identification 1"),
140    /*103*/ new IFB_LLCHAR  ( 28, "Account identification 2"),
141    /*104*/ new IFB_LLLCHAR (100, "Transaction description"),
142    /*105*/ new IFB_NUMERIC ( 16, "Credits, Chargeback amount", pad),
143    /*106*/ new IFB_NUMERIC ( 16, "Debits, Chargeback amount", pad),
144    /*107*/ new IFB_NUMERIC ( 10, "Credits, Chargeback number", pad),
145    /*108*/ new IFB_NUMERIC ( 10, "Debits, Chargeback number", pad),
146    /*109*/ new IFB_LLCHAR  ( 84, "Credits, Fee amounts"),
147    /*110*/ new IFB_LLCHAR  ( 84, "Debits, Fee amounts"),
148    /*111*/ new IFB_LLLCHAR (999, "Reserved for ISO use"),
149    /*112*/ new IFB_LLLCHAR (999, "Reserved for ISO use"),
150    /*113*/ new IFB_LLLCHAR (999, "Reserved for ISO use"),
151    /*114*/ new IFB_LLLCHAR (999, "Reserved for ISO use"),
152    /*115*/ new IFB_LLLCHAR (999, "Reserved for ISO use"),
153    /*116*/ new IFB_LLLCHAR (999, "Reserved for national use"),
154    /*117*/ new IFB_LLLCHAR (999, "Reserved for national use"),
155    /*118*/ new IFB_LLLCHAR (999, "Reserved for national use"),
156    /*119*/ new IFB_LLLCHAR (999, "Reserved for national use"),
157    /*120*/ new IFB_LLLCHAR (999, "Reserved for national use"),
158    /*121*/ new IFB_LLLCHAR (999, "Reserved for national use"),
159    /*122*/ new IFB_LLLCHAR (999, "Reserved for national use"),
160    /*123*/ new IFB_LLLCHAR (999, "Reserved for private use"),
161    /*124*/ new IFB_LLLCHAR (999, "Reserved for private use"),
162    /*125*/ new IFB_LLLCHAR (999, "Reserved for private use"),
163    /*126*/ new IFB_LLLCHAR (999, "Reserved for private use"),
164    /*127*/ new IFB_LLLCHAR (999, "Reserved for private use"),
165    /*128*/ new IFB_BINARY  (  8, "Message authentication code field")
166    };
167    public ISO93BPackager() {
168        super();
169        setFieldPackager(fld);
170    }
171}