Class ServiceCode

java.lang.Object
org.jpos.iso.ServiceCode

public class ServiceCode extends Object
Implements a parser for card's service code as per ISO/IEC 7813:2006(E).
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a ServiceCode instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether the third digit allows transactions with no restrictions (digits 0, 1, 6).
    boolean
    Indicates whether the third digit restricts use to ATMs (digit 3).
    boolean
    Indicates whether the third digit restricts use to cash transactions (digit 4).
    boolean
    Indicates whether the third digit restricts use to goods and services (digits 2, 5, 7).
    boolean
    Indicates whether the first digit signals an ICC-capable card (digits 2, 6).
    boolean
    Indicates whether the first digit signals international interchange (digits 1, 2).
    boolean
    Indicates whether the second digit signals issuer authorization is required (digit 2).
    boolean
    Indicates whether the first digit signals national interchange (digits 5, 6).
    boolean
    Indicates whether the second digit signals normal authorization processing (digit 0).
    boolean
    Indicates whether a PIN is required for transactions with this service code.
    boolean
    Indicates whether the first digit signals private interchange (digit 7).
    boolean
    Indicates whether the first digit signals test (digit 9).
    boolean
    Indicates whether the cardholder must be prompted for a PIN when a PED is available.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServiceCode

      public ServiceCode(String value)
      Creates a ServiceCode instance.
      Parameters:
      value - Three-digit service code value.
  • Method Details

    • isPrivate

      public boolean isPrivate()
      Indicates whether the first digit signals private interchange (digit 7).
      Returns:
      true if the first digit is '7'
    • isTest

      public boolean isTest()
      Indicates whether the first digit signals test (digit 9).
      Returns:
      true if the first digit is '9'
    • isICC

      public boolean isICC()
      Indicates whether the first digit signals an ICC-capable card (digits 2, 6).
      Returns:
      true if the first digit is '2' or '6'
    • isInternational

      public boolean isInternational()
      Indicates whether the first digit signals international interchange (digits 1, 2).
      Returns:
      true if the first digit is '1' or '2'
    • isNational

      public boolean isNational()
      Indicates whether the first digit signals national interchange (digits 5, 6).
      Returns:
      true if the first digit is '5' or '6'
    • hasNoRestrictions

      public boolean hasNoRestrictions()
      Indicates whether the third digit allows transactions with no restrictions (digits 0, 1, 6).
      Returns:
      true when no service restrictions apply
    • isGoodsAndServicesOnly

      public boolean isGoodsAndServicesOnly()
      Indicates whether the third digit restricts use to goods and services (digits 2, 5, 7).
      Returns:
      true for goods-and-services-only service codes
    • isATMOnly

      public boolean isATMOnly()
      Indicates whether the third digit restricts use to ATMs (digit 3).
      Returns:
      true for ATM-only service codes
    • isCashOnly

      public boolean isCashOnly()
      Indicates whether the third digit restricts use to cash transactions (digit 4).
      Returns:
      true for cash-only service codes
    • isPINRequired

      public boolean isPINRequired()
      Indicates whether a PIN is required for transactions with this service code.
      Returns:
      true when the third digit is '0', '3', or '5'
    • mustPromptForPINIfPEDPresent

      public boolean mustPromptForPINIfPEDPresent()
      Indicates whether the cardholder must be prompted for a PIN when a PED is available.
      Returns:
      true when the third digit is '6' or '7'
    • isNormalAuthorization

      public boolean isNormalAuthorization()
      Indicates whether the second digit signals normal authorization processing (digit 0).
      Returns:
      true for normal authorization
    • isIssuerAuthorization

      public boolean isIssuerAuthorization()
      Indicates whether the second digit signals issuer authorization is required (digit 2).
      Returns:
      true when issuer authorization is required