Class PINPadProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.pinpad.PINPadProperties
All Implemented Interfaces:
JposBaseInterface, PINPadInterface

public class PINPadProperties extends JposCommonProperties implements PINPadInterface
Class containing the PIN pad specific properties, their default values and default implementations of PINPadInterface. For details about properties, methods and method parameters, see UPOS specification, chapter PIN Pad.
  • Field Details

    • AccountNumber

      public String AccountNumber
      UPOS property AccountNumber. Default: an empty string.
    • AdditionalSecurityInformation

      public String AdditionalSecurityInformation
      UPOS property AdditionalSecurityInformation. Default: an empty string.
    • Amount

      public long Amount
      UPOS property Amount. Default: 0.
    • AvailableLanguagesList

      public String AvailableLanguagesList
      UPOS property AvailableLanguagesList. Default: an empty string.
    • AvailablePromptsList

      public String AvailablePromptsList
      UPOS property AvailablePromptsList. Default: an empty string.
    • CapDisplay

      public int CapDisplay
      UPOS property CapDisplay. Default: DISP_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapKeyboard

      public boolean CapKeyboard
      UPOS property CapKeyboard. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapLanguage

      public int CapLanguage
      UPOS property CapLanguage. Default: LANG_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapMACCalculation

      public boolean CapMACCalculation
      UPOS property CapMACCalculation. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapTone

      public boolean CapTone
      UPOS property CapTone. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • EncryptedPIN

      public String EncryptedPIN
      UPOS property EncryptedPIN. Default: an empty string.
    • MaximumPINLength

      public Integer MaximumPINLength
      UPOS property MaximumPINLength. Must be set by objects derived from JposDevice within method changeDefaults.
    • MinimumPINLength

      public Integer MinimumPINLength
      UPOS property MinimumPINLength. Must be set by objects derived from JposDevice within method changeDefaults.
    • MerchantID

      public String MerchantID
      UPOS property MerchantID. Default: an empty string.
    • PINEntryEnabled

      public boolean PINEntryEnabled
      UPOS property PINEntryEnabled. Default: false.
    • Prompt

      public Integer Prompt
      UPOS property Prompt. Must be set by objects derived from JposDevice within method changeDefaults if .
    • PromptLanguage

      public String PromptLanguage
      UPOS property PromptLanguage. Default: an empty string.
    • TerminalID

      public String TerminalID
      UPOS property TerminalID. Default: an empty string.
    • Track1Data

      public byte[] Track1Data
      UPOS property Track1Data. Default: an empty byte array.
    • Track2Data

      public byte[] Track2Data
      UPOS property Track2Data. Default: an empty byte array.
    • Track3Data

      public byte[] Track3Data
      UPOS property Track3Data. Default: an empty byte array.
    • Track4Data

      public byte[] Track4Data
      UPOS property Track4Data. Default: an empty byte array.
    • TransactionType

      public Integer TransactionType
      UPOS property TransactionType. Default: null. Must be overwritten by application before calling BeginEFTTransaction.
    • SupportedPINPadSystems

      public String SupportedPINPadSystems
      Internal property, contains all valid PINPadSystem parameters of method BeginEFTTransaction. The default should contain all strings listed in UPOS specification for method BeginEFTTransaction, separated by comma.
  • Constructor Details

    • PINPadProperties

      protected PINPadProperties(int dev)
      Constructor.
      Parameters:
      dev - Device index
  • Method Details

    • clearDataProperties

      public void clearDataProperties()
      Description copied from class: JposCommonProperties
      Clear data properties. Performed during ClearInput and ClearInputProperties.
      Overrides:
      clearDataProperties in class JposCommonProperties
    • setAccountNumber

      public void setAccountNumber(String accountNumber) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting AccountNumber. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • internal property AllowAlwaysSetProperties is true or accountNumber equals the previous value of AccountNumber.
      Specified by:
      setAccountNumber in interface PINPadInterface
      Parameters:
      accountNumber - Account number to be used for the current EFT transaction.
      Throws:
      jpos.JposException - If an error occurs.
    • setAmount

      public void setAmount(long amount) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting Amount. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • amount is not negative,
      • internal property AllowAlwaysSetProperties is true or amount equals the previous value of Amount.
      Specified by:
      setAmount in interface PINPadInterface
      Parameters:
      amount - Amount of the current EFT transaction.
      Throws:
      jpos.JposException - If an error occurs.
    • setMaximumPINLength

      public void setMaximumPINLength(int maximumPINLength) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting MaximumPINLength. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • Property PINEntryEnabled is false,
      • maximumPINLength is greater than zero,
      • internal property AllowAlwaysSetProperties is true or maximumPINLength equals the previous value of MaximumPINLength.
      Specified by:
      setMaximumPINLength in interface PINPadInterface
      Parameters:
      maximumPINLength - Maximum acceptable number of digits in a PIN.
      Throws:
      jpos.JposException - If an error occurs.
    • setMerchantID

      public void setMerchantID(String merchantID) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting MerchantID. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • internal property AllowAlwaysSetProperties is true or merchantID equals the previous value of MerchantID.
      Specified by:
      setMerchantID in interface PINPadInterface
      Parameters:
      merchantID - Merchant ID, as known by the EFT Transaction Host.
      Throws:
      jpos.JposException - If an error occurs.
    • setMinimumPINLength

      public void setMinimumPINLength(int minimumPINLength) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting MinimumPINLength. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • Property PINEntryEnabled is false,
      • minimumPINLength is a positive value,
      • internal property AllowAlwaysSetProperties is true or minimumPINLength equals the previous value of MinimumPINLength.
      Specified by:
      setMinimumPINLength in interface PINPadInterface
      Parameters:
      minimumPINLength - Minimum acceptable number of digits in a PIN.
      Throws:
      jpos.JposException - If an error occurs.
    • setPrompt

      public void setPrompt(int prompt) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting Prompt. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • CapDisplay is one of DISP_PINRESTRICTED, DISP_RESTRICTED_LIST or DISP_RESTRICTED_ORDER,
      • If CapDisplay is DISP_PINRESTRICTED, PINEntryEnabled is true,
      • prompt equals one of the values specified in property AvailablePromptsList,
      • internal property AllowAlwaysSetProperties is true or prompt equals the previous value of Prompt.
      Specified by:
      setPrompt in interface PINPadInterface
      Parameters:
      prompt - Identifies a predefined message to be displayed on the PIN Pad.
      Throws:
      jpos.JposException - If an error occurs.
    • setPromptLanguage

      public void setPromptLanguage(String promptLanguage) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting PromptLanguage. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • CapLanguage is not LANG_NONE,
      • If CapLanguage is LANG_ONE, promptLanguage equals the default value of PromptLanguage,
      • If CapLanguage is LANG_PINRESTRICTED, PINEntryEnabled is false,
      • promptLanguage specifies one of the languages specified in property AvailableLanguagesList,
      • internal property AllowAlwaysSetProperties is true or promptLanguage equals the previous value of PromptLanguage.
      For example, if AvailableLanguagesList contains the language specification "EN,US", both, "EN,US" and "EN" would be valid language specifications, but "US" would be invalid because "US" specifies a country, not a language. However, if the service supports multiple English variants, e.eg "EN,US" and "EN,UK", it is up to the service which variant will be used if only "EN" will be specified.
      Specified by:
      setPromptLanguage in interface PINPadInterface
      Parameters:
      promptLanguage - Holds the "language definition" for the message to be displayed.
      Throws:
      jpos.JposException - If an error occurs.
    • setTerminalID

      public void setTerminalID(String terminalID) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting TerminalID. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • internal property AllowAlwaysSetProperties is true or terminalID equals the previous value of TerminalID.
      Specified by:
      setTerminalID in interface PINPadInterface
      Parameters:
      terminalID - Terminal ID, as known by the EFT Transaction Host.
      Throws:
      jpos.JposException - If an error occurs.
    • setTrack1Data

      public void setTrack1Data(byte[] track1Data) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting Track1Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • internal property AllowAlwaysSetProperties is true or track1Data equals the previous value of Track1Data.
      Specified by:
      setTrack1Data in interface PINPadInterface
      Parameters:
      track1Data - Decoded track 1 data from the previous card swipe or an empty array.
      Throws:
      jpos.JposException - If an error occurs.
    • setTrack2Data

      public void setTrack2Data(byte[] track2Data) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting Track2Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • internal property AllowAlwaysSetProperties is true or track2Data equals the previous value of Track2Data.
      Specified by:
      setTrack2Data in interface PINPadInterface
      Parameters:
      track2Data - Decoded track 2 data from the previous card swipe or an empty array.
      Throws:
      jpos.JposException - If an error occurs.
    • setTrack3Data

      public void setTrack3Data(byte[] track3Data) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting Track3Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • internal property AllowAlwaysSetProperties is true or track3Data equals the previous value of Track3Data.
      Specified by:
      setTrack3Data in interface PINPadInterface
      Parameters:
      track3Data - Decoded track 3 data from the previous card swipe or an empty array.
      Throws:
      jpos.JposException - If an error occurs.
    • setTrack4Data

      public void setTrack4Data(byte[] track4Data) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting Track4Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • internal property AllowAlwaysSetProperties is true or track4Data equals the previous value of Track4Data.
      Specified by:
      setTrack4Data in interface PINPadInterface
      Parameters:
      track4Data - Decoded track 4 (JIS-II) data from the previous card swipe or an empty array.
      Throws:
      jpos.JposException - If an error occurs.
    • setTransactionType

      public void setTransactionType(int transactionType) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of setting TransactionType. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is opened,
      • EFT transaction has not been started,
      • transactionType is one of TRANS_DEBIT, TRANS_CREDIT, TRANS_INQ, TRANS_RECONCILE or TRANS_ADMIN,
      • internal property AllowAlwaysSetProperties is true or transactionType equals the previous value of TransactionType.
      Specified by:
      setTransactionType in interface PINPadInterface
      Parameters:
      transactionType - Type of the current EFT Transaction.
      Throws:
      jpos.JposException - If an error occurs.
    • beginEFTTransaction

      public void beginEFTTransaction(String pinPadSystem, int transactionHost) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of BeginEFTTransaction method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • EFT transaction has not been started,
      • pinPadSystem equals one of the predefined values, see PINPadProperties, property SupportedPINPadSystems.
      Specified by:
      beginEFTTransaction in interface PINPadInterface
      Parameters:
      pinPadSystem - Name of the desired PIN Pad Management System.
      transactionHost - Identifier of an EFT transaction host to be used for this transaction.
      Throws:
      jpos.JposException - If an error occurs.
    • computeMAC

      public void computeMAC(String inMsg, String[] outMsg) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of ComputeMAC method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • EFT transaction has been started,
      • CapMACCalculation is true,
      • PINEntryEnabled is false,
      • inMsg is not null,
      • outMsg is a String array with length 1.
      Specified by:
      computeMAC in interface PINPadInterface
      Parameters:
      inMsg - The message that the application intends to send to an EFT Transaction.
      outMsg - Reformatted message that may actually be transmitted to an EFT Transaction Host.
      Throws:
      jpos.JposException - If an error occurs.
    • enablePINEntry

      public void enablePINEntry() throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of EnablePINEntry method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • EFT transaction has been started,
      • PINEntryEnabled is false,
      • MaximumPINLength ≥ MinimumPINLength.
      Specified by:
      enablePINEntry in interface PINPadInterface
      Throws:
      jpos.JposException - If an error occurs.
    • endEFTTransaction

      public void endEFTTransaction(int completionCode) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of EndEFTTransaction method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • EFT transaction has been started,
      • completionCode is EFT_NORMAL or EFT_ABNORMAL.
      The default implementation should be called within derived methods to ensure that the property PINEntryEnabled is updated as expected.
      Specified by:
      endEFTTransaction in interface PINPadInterface
      Parameters:
      completionCode - The completion code.
      Throws:
      jpos.JposException - If an error occurs.
    • updateKey

      public void updateKey(int keyNum, String key) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of UpdateKey method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • EFT transaction has been started,
      • key consists of an even number of hexadecimal digits (0-9 and A-F).
      Specified by:
      updateKey in interface PINPadInterface
      Parameters:
      keyNum - A key number.
      key - A Hex-ASCII value for a new key.
      Throws:
      jpos.JposException - If an error occurs.
    • verifyMAC

      public void verifyMAC(String message) throws jpos.JposException
      Description copied from interface: PINPadInterface
      Final part of VerifyMAC method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapMACCalculation is true,
      • EFT transaction has been started,
      • PINEntryEnabled is false,
      • message is not null.
      Specified by:
      verifyMAC in interface PINPadInterface
      Parameters:
      message - A message received from an EFT Transaction Host.
      Throws:
      jpos.JposException - If an error occurs.
    • getDataEventList

      protected List<jpos.events.JposEvent> getDataEventList()
      Getter for DataEventList for clean synchronization between firing data or error events and setting property PINEntryEnabled to the correct value.
      Returns:
      The DataEventList instance used by the service.