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
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 Summary
FieldsModifier and TypeFieldDescriptionUPOS property AccountNumber.UPOS property AdditionalSecurityInformation.long
UPOS property Amount.UPOS property AvailableLanguagesList.UPOS property AvailablePromptsList.int
UPOS property CapDisplay.boolean
UPOS property CapKeyboard.int
UPOS property CapLanguage.boolean
UPOS property CapMACCalculation.boolean
UPOS property CapTone.UPOS property EncryptedPIN.UPOS property MaximumPINLength.UPOS property MerchantID.UPOS property MinimumPINLength.boolean
UPOS property PINEntryEnabled.UPOS property Prompt.UPOS property PromptLanguage.Internal property, contains all valid PINPadSystem parameters of method BeginEFTTransaction.UPOS property TerminalID.byte[]
UPOS property Track1Data.byte[]
UPOS property Track2Data.byte[]
UPOS property Track3Data.byte[]
UPOS property Track4Data.UPOS property TransactionType.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
AllowAlwaysSetProperties, AllowDeprecatedMethods, AsyncInputActive, AsyncMode, AutoDisable, CapStatisticsReporting, CapUpdateStatistics, CheckHealthText, Claimed, Claiming, ClaimWaiters, CurrentCommands, CurrentUnitID, DataCount, DataEventEnabled, DataEventList, Device, DeviceEnabled, DeviceServiceDescription, DeviceServiceVersion, DevProps, ErrorString, ErrorUnits, EventCB, EventList, EventSource, EventString, EventUnitID, EventUnits, ExclusiveAllowed, ExclusiveNo, ExclusiveUse, ExclusiveYes, FirstEnableHappened, FlagWhenIdle, FlagWhenIdleStatusValue, FreezeEvents, Index, LogicalName, MaximumConfirmationEventWaitingTime, OutputID, PowerNotify, PowerState, SerializedRequestRunner, SerializedRequests, State, StrictFIFOEventHandling, SuspendedCommands, SuspendedConcurrentCommands, UnitsOnline, UsesSubsystemUnits
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginEFTTransaction(String pinPadSystem, int transactionHost)
Final part of BeginEFTTransaction method.void
Clear data properties.void
computeMAC(String inMsg, String[] outMsg)
Final part of ComputeMAC method.void
Final part of EnablePINEntry method.void
endEFTTransaction(int completionCode)
Final part of EndEFTTransaction method.protected List<jpos.events.JposEvent>
Getter for DataEventList for clean synchronization between firing data or error events and setting property PINEntryEnabled to the correct value.void
setAccountNumber(String accountNumber)
Final part of setting AccountNumber.void
setAmount(long amount)
Final part of setting Amount.void
setMaximumPINLength(int maximumPINLength)
Final part of setting MaximumPINLength.void
setMerchantID(String merchantID)
Final part of setting MerchantID.void
setMinimumPINLength(int minimumPINLength)
Final part of setting MinimumPINLength.void
setPrompt(int prompt)
Final part of setting Prompt.void
setPromptLanguage(String promptLanguage)
Final part of setting PromptLanguage.void
setTerminalID(String terminalID)
Final part of setting TerminalID.void
setTrack1Data(byte[] track1Data)
Final part of setting Track1Data.void
setTrack2Data(byte[] track2Data)
Final part of setting Track2Data.void
setTrack3Data(byte[] track3Data)
Final part of setting Track3Data.void
setTrack4Data(byte[] track4Data)
Final part of setting Track4Data.void
setTransactionType(int transactionType)
Final part of setting TransactionType.void
Final part of UpdateKey method.void
Final part of VerifyMAC method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, checkProperties, claim, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnEnable, initOnFirstEnable, initOnOpen, newJposOutputRequest, open, powerNotify, release, releaseWaiter, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, signalWaiter, unitDataCount, updateFirmware, updateFirmware, updateStatistics, waitWaiter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.gmxhome.conrad.jpos.jpos_base.JposBaseInterface
asyncMode, autoDisable, checkHealth, claim, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Field Details
-
AccountNumber
UPOS property AccountNumber. Default: an empty string. -
AdditionalSecurityInformation
UPOS property AdditionalSecurityInformation. Default: an empty string. -
Amount
public long AmountUPOS property Amount. Default: 0. -
AvailableLanguagesList
UPOS property AvailableLanguagesList. Default: an empty string. -
AvailablePromptsList
UPOS property AvailablePromptsList. Default: an empty string. -
CapDisplay
public int CapDisplayUPOS property CapDisplay. Default: DISP_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapKeyboard
public boolean CapKeyboardUPOS property CapKeyboard. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapLanguage
public int CapLanguageUPOS property CapLanguage. Default: LANG_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapMACCalculation
public boolean CapMACCalculationUPOS property CapMACCalculation. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapTone
public boolean CapToneUPOS property CapTone. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
EncryptedPIN
UPOS property EncryptedPIN. Default: an empty string. -
MaximumPINLength
UPOS property MaximumPINLength. Must be set by objects derived from JposDevice within method changeDefaults. -
MinimumPINLength
UPOS property MinimumPINLength. Must be set by objects derived from JposDevice within method changeDefaults. -
MerchantID
UPOS property MerchantID. Default: an empty string. -
PINEntryEnabled
public boolean PINEntryEnabledUPOS property PINEntryEnabled. Default: false. -
Prompt
UPOS property Prompt. Must be set by objects derived from JposDevice within method changeDefaults if . -
PromptLanguage
UPOS property PromptLanguage. Default: an empty string. -
TerminalID
UPOS property TerminalID. Default: an empty string. -
Track1Data
public byte[] Track1DataUPOS property Track1Data. Default: an empty byte array. -
Track2Data
public byte[] Track2DataUPOS property Track2Data. Default: an empty byte array. -
Track3Data
public byte[] Track3DataUPOS property Track3Data. Default: an empty byte array. -
Track4Data
public byte[] Track4DataUPOS property Track4Data. Default: an empty byte array. -
TransactionType
UPOS property TransactionType. Default: null. Must be overwritten by application before calling BeginEFTTransaction. -
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 classJposCommonProperties
-
setAccountNumber
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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- Parameters:
amount
- Amount of the current EFT transaction.- Throws:
jpos.JposException
- If an error occurs.
-
setMaximumPINLength
public void setMaximumPINLength(int maximumPINLength) throws jpos.JposExceptionDescription 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 interfacePINPadInterface
- Parameters:
maximumPINLength
- Maximum acceptable number of digits in a PIN.- Throws:
jpos.JposException
- If an error occurs.
-
setMerchantID
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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- Parameters:
prompt
- Identifies a predefined message to be displayed on the PIN Pad.- Throws:
jpos.JposException
- If an error occurs.
-
setPromptLanguage
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.
- Specified by:
setPromptLanguage
in interfacePINPadInterface
- Parameters:
promptLanguage
- Holds the "language definition" for the message to be displayed.- Throws:
jpos.JposException
- If an error occurs.
-
setTerminalID
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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- 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
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 interfacePINPadInterface
- 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.JposExceptionDescription 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 interfacePINPadInterface
- Throws:
jpos.JposException
- If an error occurs.
-
endEFTTransaction
public void endEFTTransaction(int completionCode) throws jpos.JposExceptionDescription 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.
- Specified by:
endEFTTransaction
in interfacePINPadInterface
- Parameters:
completionCode
- The completion code.- Throws:
jpos.JposException
- If an error occurs.
-
updateKey
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 interfacePINPadInterface
- Parameters:
keyNum
- A key number.key
- A Hex-ASCII value for a new key.- Throws:
jpos.JposException
- If an error occurs.
-
verifyMAC
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 interfacePINPadInterface
- Parameters:
message
- A message received from an EFT Transaction Host.- Throws:
jpos.JposException
- If an error occurs.
-
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.
-