AZS

com.a2zss.ISO8583
Class Utils

java.lang.Object
  extended by com.a2zss.ISO8583.Utils
All Implemented Interfaces:
ISOConstants

public final class Utils
extends java.lang.Object
implements ISOConstants

Some Helper methods to SDK


Field Summary
 
Fields inherited from interface com.a2zss.ISO8583.ISOConstants
AUTHORISATION, AUTHORISATION_REPEAT, AUTHORISATION_RESPONSE, CASH_ADVANCE, CLEARING_REQUEST, CLEARING_REQUEST_RESPONSE, ENC_CODED, ENC_LLLLPLAIN, ENC_PACKED, ENC_PLAIN, mandatoryBits, MSG_MAX_LENGTH, MTID, MTISTRING, NETWORK_REQUEST, NETWORK_RESPONSE, optionalBits, ORDINAL_PURCHASE, PROCS, PROCSTR, REVAERSAL_RESPONSE, REVERSAL, REVERSAL_REPEAT, SMS_AUTHORISATION, SMS_AUTHORISATION_REPEAT, SMS_AUTHORISATION_RESPONSE, UNATTENDED_PURCHASE, V1987, V1993, V2003
 
Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String getAction(java.lang.String codes, int ver)
           
static int getImpactByMTI(java.lang.String mti)
          return financial transaction type for transaction originator
static java.lang.String getResponse(java.lang.String codes)
           
static java.lang.String getResponse(java.lang.String codes, int ver)
           
static java.lang.String getTypeByMTI(java.lang.String mti)
          returns the transaction type string values like "0100", "1100", ..
static boolean isApproved(java.lang.String codes, int ver)
           
static int isNumeric(java.lang.String value)
           
static int isText(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

isNumeric

public static final int isNumeric(java.lang.String value)
Parameters:
value -
Returns:
-1 if the String contains only number characters '0'..'9' othervise returns the first position where String violates this condition

isText

public static final int isText(java.lang.String value)
Returns:
-1 if the String contains only chars with values 32..127 othervise returns the first position where String violates this condition

getImpactByMTI

public static final int getImpactByMTI(java.lang.String mti)
return financial transaction type for transaction originator

Returns:
1 in case of authorizations
0 in case of non financial transaction like network message
-1 in case of reversal/refund transactions

getTypeByMTI

public static final java.lang.String getTypeByMTI(java.lang.String mti)
returns the transaction type string values like "0100", "1100", ..


getResponse

public static final java.lang.String getResponse(java.lang.String codes)
Parameters:
codes - the ISO8583 v1987 field 39 value ("00", "01", "02", ..)
Returns:
string represent the mesaning of ISO8583 message action code field 39 values returned are like:
00 --> "OK, approved"
01 --> "Declined (01)"
02 --> "Call to Issuer, declined"

getResponse

public static final java.lang.String getResponse(java.lang.String codes,
                                                 int ver)
Parameters:
codes - the ISO8583 v1987 or v1993 field 39 value ("00", "01", "02", .. or "000", "001", "002")
ver - the ISO8583 message version use v1987 (=0) or v1993 (=1)
Returns:
string represent the mesaning of ISO8583 message action code field 39 values returned are like:
00/000 --> "OK, approved"
01/001 --> "Declined (01)"
02/002 --> "Call to Issuer, declined"

isApproved

public static final boolean isApproved(java.lang.String codes,
                                       int ver)
Parameters:
codes - the ISO8583 v1987 or v1993 field 39 value
ver - the ISO8583 message version use v1987 (=0) or v1993 (=1)
Returns:
true if ISO8583 message action code field 39 indicated approved/or ok values returned are like:
returns true for v1987 code 00 and v1993 codes 000 and 400

getAction

public static final java.lang.String getAction(java.lang.String codes,
                                               int ver)
Parameters:
codes - the ISO8583 v1987 or v1993 field 39 value ("00", "01", "02", .. or "000", "001", "002")
ver - the ISO8583 message version use v1987 (=0) or v1993 (=1)
Returns:
string represent the mesaning of ISO8583 message action code field 39 values returned are like:
00/000 --> "OK, approved"
01/001 --> "Declined (01)"
02/002 --> "Call to Issuer, declined"

AZS

Copyright © 2002-2010 AZS Services Ltd. All Rights Reserved.