Class TerminalVerificationResults

java.lang.Object
org.jpos.emv.TerminalVerificationResults
All Implemented Interfaces:
Loggeable

public final class TerminalVerificationResults extends Object implements Loggeable
Terminal verification results (TVR) parser.
  • Constructor Details

    • TerminalVerificationResults

      public TerminalVerificationResults(byte[] tvr)
      Constructs a TerminalVerificationResults from a 5-byte TVR array.
      Parameters:
      tvr - the 5-byte Terminal Verification Results value
      Throws:
      IllegalArgumentException - if the array length is not 5
    • TerminalVerificationResults

      Constructs a TerminalVerificationResults from a hex-encoded TVR string.
      Parameters:
      hexTVR - 10-character hexadecimal string representing the 5-byte TVR
  • Method Details

    • offlineDataProcNotPerformed

      public boolean offlineDataProcNotPerformed()
      Returns true if offline data authentication was not performed.
      Returns:
      true if byte 1 bit 8 is set
    • sdaFailed

      public boolean sdaFailed()
      Returns true if Static Data Authentication (SDA) failed.
      Returns:
      true if byte 1 bit 7 is set
    • iccDataMissing

      public boolean iccDataMissing()
      Returns true if ICC data is missing.
      Returns:
      true if byte 1 bit 6 is set
    • panInHotlist

      public boolean panInHotlist()
      Returns true if the PAN appears in the hotlist.
      Returns:
      true if byte 1 bit 5 is set
    • ddaFailed

      public boolean ddaFailed()
      Returns true if Dynamic Data Authentication (DDA) failed.
      Returns:
      true if byte 1 bit 4 is set
    • cdaFailed

      public boolean cdaFailed()
      Returns true if Combined DDA/Application Cryptogram Generation (CDA) failed.
      Returns:
      true if byte 1 bit 3 is set
    • sdaSelected

      public boolean sdaSelected()
      Returns true if SDA was selected.
      Returns:
      true if byte 1 bit 2 is set
    • rfu

      public boolean rfu()
      Returns true if any reserved-for-future-use (RFU) bit is unset as expected.
      Returns:
      true if none of the RFU bits are unexpectedly set
    • cardAndTerminalDiffApps

      public boolean cardAndTerminalDiffApps()
      Returns true if the card and terminal have different application versions.
      Returns:
      true if byte 2 bit 8 is set
    • expiredApplication

      public boolean expiredApplication()
      Returns true if the application has expired.
      Returns:
      true if byte 2 bit 7 is set
    • applicationNotEffective

      public boolean applicationNotEffective()
      Returns true if the application is not yet effective.
      Returns:
      true if byte 2 bit 6 is set
    • serviceNotAllowedForCardProduct

      Returns true if the service is not allowed for the card product.
      Returns:
      true if byte 2 bit 5 is set
    • newCard

      public boolean newCard()
      Returns true if this is a new card (first transaction).
      Returns:
      true if byte 2 bit 4 is set
    • cardholderVerificationNotSuccessful

      Returns true if cardholder verification was not successful.
      Returns:
      true if byte 3 bit 8 is set
    • unrecognisedCVM

      public boolean unrecognisedCVM()
      Returns true if an unrecognised CVM (Cardholder Verification Method) was encountered.
      Returns:
      true if byte 3 bit 7 is set
    • pinTryLimitExceeded

      public boolean pinTryLimitExceeded()
      Returns true if the PIN try limit has been exceeded.
      Returns:
      true if byte 3 bit 6 is set
    • pinRequiredButNoPinPadPresent

      Returns true if a PIN is required but no PIN pad is present.
      Returns:
      true if byte 3 bit 5 is set
    • pinRequiredButNotEntered

      public boolean pinRequiredButNotEntered()
      Returns true if a PIN is required but was not entered.
      Returns:
      true if byte 3 bit 4 is set
    • onlinePINEntered

      public boolean onlinePINEntered()
      Returns true if an online PIN was entered.
      Returns:
      true if byte 3 bit 3 is set
    • transactionExceedsFloorLimit

      public boolean transactionExceedsFloorLimit()
      Returns true if the transaction amount exceeds the floor limit.
      Returns:
      true if byte 4 bit 8 is set
    • lowerConsecutiveOfflineLimitExceeded

      Returns true if the lower consecutive offline limit was exceeded.
      Returns:
      true if byte 4 bit 7 is set
    • upperConsecutiveOfflineLimitExceeded

      Returns true if the upper consecutive offline limit was exceeded.
      Returns:
      true if byte 4 bit 6 is set
    • transactionSelectedRandomlyOnlineProcessing

      Returns true if the transaction was selected randomly for online processing.
      Returns:
      true if byte 4 bit 5 is set
    • merchantForcedTransactionOnline

      Returns true if the merchant forced the transaction online.
      Returns:
      true if byte 4 bit 4 is set
    • defaultTDOLUsed

      public boolean defaultTDOLUsed()
      Returns true if the default TDOL (Transaction Data Object List) was used.
      Returns:
      true if byte 5 bit 8 is set
    • issuerAuthenticationFailed

      public boolean issuerAuthenticationFailed()
      Returns true if issuer authentication failed.
      Returns:
      true if byte 5 bit 7 is set
    • scriptFailedBeforeFinalGenerateAC

      Returns true if an issuer script failed before the final Generate AC command.
      Returns:
      true if byte 5 bit 6 is set
    • scriptFailedAfterFinalGenerateAC

      Returns true if an issuer script failed after the final Generate AC command.
      Returns:
      true if byte 5 bit 5 is set
    • relayResistanceThresholdExceeded

      Returns true if the relay resistance threshold was exceeded.
      Returns:
      true if byte 5 bit 4 is set
    • relayResistanceTimeLimitsExceeded

      Returns true if the relay resistance time limits were exceeded.
      Returns:
      true if byte 5 bit 3 is set
    • relayResistanceProtocolNotSupported

      Returns true if the relay resistance protocol is not supported.
      Returns:
      true if byte 5 bits 2 and 1 are both clear
    • relayResistanceProtocolNotPerformed

      Returns true if the relay resistance protocol was not performed.
      Returns:
      true if byte 5 bit 2 is clear and bit 1 is set
    • relayResistanceProtocolPerformed

      Returns true if the relay resistance protocol was performed.
      Returns:
      true if byte 5 bit 2 is set and bit 1 is clear
    • dump

      public void dump(PrintStream p, String indent)
      Dumps a human-readable binary representation of the TVR to the given stream.
      Specified by:
      dump in interface Loggeable
      Parameters:
      p - the output stream
      indent - indentation prefix string