Class ServiceCode
java.lang.Object
org.jpos.iso.ServiceCode
Implements a parser for card's service code as per ISO/IEC 7813:2006(E).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the third digit allows transactions with no restrictions (digits 0, 1, 6).booleanIndicates whether the third digit restricts use to ATMs (digit 3).booleanIndicates whether the third digit restricts use to cash transactions (digit 4).booleanIndicates whether the third digit restricts use to goods and services (digits 2, 5, 7).booleanisICC()Indicates whether the first digit signals an ICC-capable card (digits 2, 6).booleanIndicates whether the first digit signals international interchange (digits 1, 2).booleanIndicates whether the second digit signals issuer authorization is required (digit 2).booleanIndicates whether the first digit signals national interchange (digits 5, 6).booleanIndicates whether the second digit signals normal authorization processing (digit 0).booleanIndicates whether a PIN is required for transactions with this service code.booleanIndicates whether the first digit signals private interchange (digit 7).booleanisTest()Indicates whether the first digit signals test (digit 9).booleanIndicates whether the cardholder must be prompted for a PIN when a PED is available.
-
Constructor Details
-
ServiceCode
Creates a ServiceCode instance.- Parameters:
value- Three-digit service code value.
-
-
Method Details
-
isPrivate
Indicates whether the first digit signals private interchange (digit 7).- Returns:
trueif the first digit is'7'
-
isTest
Indicates whether the first digit signals test (digit 9).- Returns:
trueif the first digit is'9'
-
isICC
Indicates whether the first digit signals an ICC-capable card (digits 2, 6).- Returns:
trueif the first digit is'2'or'6'
-
isInternational
Indicates whether the first digit signals international interchange (digits 1, 2).- Returns:
trueif the first digit is'1'or'2'
-
isNational
Indicates whether the first digit signals national interchange (digits 5, 6).- Returns:
trueif the first digit is'5'or'6'
-
hasNoRestrictions
Indicates whether the third digit allows transactions with no restrictions (digits 0, 1, 6).- Returns:
truewhen no service restrictions apply
-
isGoodsAndServicesOnly
Indicates whether the third digit restricts use to goods and services (digits 2, 5, 7).- Returns:
truefor goods-and-services-only service codes
-
isATMOnly
Indicates whether the third digit restricts use to ATMs (digit 3).- Returns:
truefor ATM-only service codes
-
isCashOnly
Indicates whether the third digit restricts use to cash transactions (digit 4).- Returns:
truefor cash-only service codes
-
isPINRequired
Indicates whether a PIN is required for transactions with this service code.- Returns:
truewhen the third digit is'0','3', or'5'
-
mustPromptForPINIfPEDPresent
Indicates whether the cardholder must be prompted for a PIN when a PED is available.- Returns:
truewhen the third digit is'6'or'7'
-
isNormalAuthorization
Indicates whether the second digit signals normal authorization processing (digit 0).- Returns:
truefor normal authorization
-
isIssuerAuthorization
Indicates whether the second digit signals issuer authorization is required (digit 2).- Returns:
truewhen issuer authorization is required
-