com.bankframe.services.devices.MTPinPad
Class MagTekIntelliPIN

java.lang.Object
  extended bycom.bankframe.services.devices.MCASerialPort
      extended bycom.bankframe.services.devices.MTPinPad.MagTekIntelliPIN
All Implemented Interfaces:
javax.comm.CommPortOwnershipListener, java.util.EventListener, MCADevice, java.io.Serializable

public class MagTekIntelliPIN
extends MCASerialPort
implements java.io.Serializable

This class provides support for a MagTek IntelliPIN Plus card-swipe device

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bankframe.services.devices.MCASerialPort
SERIALPORT_BAUD, SERIALPORT_COMMDRIVER, SERIALPORT_DATABITS, SERIALPORT_FLOWCONTROL, SERIALPORT_NAME, SERIALPORT_PARITY, SERIALPORT_STOPBITS
 
Fields inherited from interface javax.comm.CommPortOwnershipListener
PORT_OWNED, PORT_OWNERSHIP_REQUESTED, PORT_UNOWNED
 
Constructor Summary
MagTekIntelliPIN(java.lang.String deviceName)
          MagTekIntelliPIN constructor
MagTekIntelliPIN(java.lang.String deviceName, boolean decryptPinData)
          MagTekIntelliPIN constructor
 
Method Summary
 void addPinPadListener(PinPadListener ppl)
          This method adds a PinPad listener to this object to be notified when a card has been swiped.
 void cancelSessionRequest()
          This method generates cancel Session Request message
 boolean cardDataEntryRequest(java.lang.String firstMessage, java.lang.String secondMessage, long timeOut)
          This method generates a card data entry request message and waits for a card to be swiped.
 void displaySingleString(java.lang.String firstMessage, java.lang.String secondMessage)
          This method shows two strings on IntelliPIN display
 void enableDefaultDisplay()
          This method enables default display messages removing any made with replaceDefaultDisplay
 void loadMasterKey(byte[] masterKey)
          This method sends the PinPad the Master Encryption Key This is always the first request sent to IntelliPIN pinpad.
 void open(byte[] theMasterKey, long masterKeyResponseTimeout)
          This method opens the IntelliPIN device It calls the base MCASerialPort open() method which connects to the serial port and which calls setup() This method then passes the specified Master Key to the opened IntelliPIN device.
 void open(long masterKeyResponseTimeout)
          This method opens the IntelliPIN device It calls the base MCASerialPort open() method which connects to the serial port and which calls setup() A Master Encryption Key is created and passed to the opened IntelliPIN device.
 boolean pinEntryRequest(java.lang.String accountNumber, char keyNumber, java.lang.String transactionAmount, long timeOut)
          This method shows pin entry request and waits for a pin to be entered.
 void removePinPadListener(PinPadListener ppl)
          This method removes a PinPad listener
 void replaceDefaultDisplay(java.lang.String displayNumber, java.lang.String lineOneText, java.lang.String lineTwoText)
          This method replaces default display message
 java.lang.String requestSoftSwitch(char switchNumber, long timeOut)
          This method generates a Requests Soft Switch.
 boolean setSoftSwitch(char switchNumber, byte theSettingData, long timeOut)
          This method generates a Set Soft Switch.
 boolean waitConditionCardData(long timeOut)
          This method blocks until card data is available or the timout expires It waits in one second intervals until the timeout value is passed or data becomes available.
 boolean waitConditionKeyLoaded(long timeOut)
          This method waits for Key loaded condition It waits in one second intervals until the timeout value is passed or the condition is met.
 boolean waitConditionPinData(long timeOut)
          This method waits until PIN data is available It waits in one second intervals until the timeout value is passed or the condition is met.
 boolean waitConditionRequestSettings(long timeOut)
          This method waits for the Request Soft Switch response.
 
Methods inherited from class com.bankframe.services.devices.MCASerialPort
available, close, disableNotifications, disableReceiveFraming, disableReceiveThreshold, disableReceiveTimeout, enableNotifications, enableReceiveFraming, enableReceiveThreshold, enableReceiveTimeout, getBaudRate, getBufferedInputStream, getDataBits, getDeviceName, getFlowControlMode, getInputStream, getOutputStream, getParity, getReceivedData, getReceiveFramingByte, getReceiveThreshold, getReceiveTimeout, getStopBits, isCD, isCTS, isDSR, isDTR, isReceiveFramingEnabled, isReceiveThresholdEnabled, isReceiveTimeoutEnabled, isRI, isRTS, open, ownershipChange, read, read, restartInputThread, sendBreak, setDeviceName, setDTR, setFlowControlMode, setRcvFifoTrigger, setRTS, setSerialPortParams, toString, waitforDataAvailable, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MagTekIntelliPIN

public MagTekIntelliPIN(java.lang.String deviceName)
                 throws DeviceException
MagTekIntelliPIN constructor

Parameters:
deviceName - The device name

MagTekIntelliPIN

public MagTekIntelliPIN(java.lang.String deviceName,
                        boolean decryptPinData)
                 throws DeviceException
MagTekIntelliPIN constructor

Parameters:
deviceName - The device name
decryptPinData - specifies if the pin data from the physical device is to be decrypted immediately by the client (true) or left encrypted for later use (false)
Method Detail

open

public void open(long masterKeyResponseTimeout)
          throws DeviceException
This method opens the IntelliPIN device It calls the base MCASerialPort open() method which connects to the serial port and which calls setup() A Master Encryption Key is created and passed to the opened IntelliPIN device.

Parameters:
masterKeyResponseTimeout - time-out in milliseconds to wait for response from device after loading Master key.
Throws:
DeviceException - if an error occurs

open

public void open(byte[] theMasterKey,
                 long masterKeyResponseTimeout)
          throws DeviceException
This method opens the IntelliPIN device It calls the base MCASerialPort open() method which connects to the serial port and which calls setup() This method then passes the specified Master Key to the opened IntelliPIN device.

Parameters:
theMasterKey - Master Key, a DES standard encryption key, 8 bytes in length.
masterKeyResponseTimeout - time-out in milliseconds to wait for response from device after loading Master key.
Throws:
DeviceException - if an error occurs

addPinPadListener

public void addPinPadListener(PinPadListener ppl)
                       throws DeviceException
This method adds a PinPad listener to this object to be notified when a card has been swiped.

Throws:
DeviceException - if an error occurs

removePinPadListener

public void removePinPadListener(PinPadListener ppl)
This method removes a PinPad listener

Parameters:
ppl - The PinPad listener

waitConditionCardData

public boolean waitConditionCardData(long timeOut)
This method blocks until card data is available or the timout expires It waits in one second intervals until the timeout value is passed or data becomes available. If timeout = 0 then the wait cycle is infinite.

Returns:
true if the card data becomes available, false otherwise

waitConditionKeyLoaded

public boolean waitConditionKeyLoaded(long timeOut)
This method waits for Key loaded condition It waits in one second intervals until the timeout value is passed or the condition is met. If timeout = 0 then the wait cycle is infinite.

Parameters:
timeOut - timeout value in milliseconds
Returns:
true if the Master Key was loaded in the time period.

waitConditionPinData

public boolean waitConditionPinData(long timeOut)
This method waits until PIN data is available It waits in one second intervals until the timeout value is passed or the condition is met. If timeout = 0 then the wait cycle is infinite.

Parameters:
timeOut - timeout period in milliseconds
Returns:
true if pin data was received in the time period, false otherwise

waitConditionRequestSettings

public boolean waitConditionRequestSettings(long timeOut)
This method waits for the Request Soft Switch response. This is the physical MagTek device settings. It waits in one second intervals until the timeout value is passed or the condition is met. If timeout = 0 then the wait cycle is infinite.

Parameters:
timeOut - The timeout period in milliseconds
Returns:
true if the Request Soft Switch response was received in the time period, false otherwise

setSoftSwitch

public boolean setSoftSwitch(char switchNumber,
                             byte theSettingData,
                             long timeOut)
                      throws DeviceException
This method generates a Set Soft Switch. This sets the physical MagTek devices settings.

Parameters:
switchNumber - 'A'-'G'
theSettingData - The setting to set
timeOut - The time-out period for a response from IntelliPIN physical device.
Returns:
true if IntelliPIN physical device accepted the specified settings, false otherwise
Throws:
DeviceException - if an error occurs

requestSoftSwitch

public java.lang.String requestSoftSwitch(char switchNumber,
                                          long timeOut)
                                   throws DeviceException
This method generates a Requests Soft Switch. This gets the physical MagTek devices settings. The method waits the timeOut period for a reponse from the device.

Parameters:
switchNumber - The switch number: 'A'-'G'
timeOut - The timeout period in milliseconds
Returns:
String retrieved settings data.
Throws:
DeviceException - if an error occurs

cancelSessionRequest

public void cancelSessionRequest()
                          throws DeviceException
This method generates cancel Session Request message

Throws:
DeviceException - if an error occurs

cardDataEntryRequest

public boolean cardDataEntryRequest(java.lang.String firstMessage,
                                    java.lang.String secondMessage,
                                    long timeOut)
                             throws DeviceException
This method generates a card data entry request message and waits for a card to be swiped.

Parameters:
firstMessage - The first message to display
secondMessage - The second message to display
timeOut - The time-out period in milliseconds
Returns:
true if the card was swiped.
Throws:
DeviceException - if an error occurs

loadMasterKey

public void loadMasterKey(byte[] masterKey)
                   throws DeviceException
This method sends the PinPad the Master Encryption Key This is always the first request sent to IntelliPIN pinpad.

Parameters:
masterKey - the master key
Throws:
DeviceException - if an error occurs

pinEntryRequest

public boolean pinEntryRequest(java.lang.String accountNumber,
                               char keyNumber,
                               java.lang.String transactionAmount,
                               long timeOut)
                        throws DeviceException
This method shows pin entry request and waits for a pin to be entered.

Parameters:
accountNumber - account number used during encryption.(optional)
keyNumber - the key number
transactionAmount - The transaction decimal amount (to two decimal places, e.g., 123 = 1.23, omit the decimal point and commas) (optional)
timeOut - timeout period for pin to be entered.
Returns:
true if a card was swiped, false otherwise
Throws:
DeviceException

replaceDefaultDisplay

public void replaceDefaultDisplay(java.lang.String displayNumber,
                                  java.lang.String lineOneText,
                                  java.lang.String lineTwoText)
                           throws DeviceException
This method replaces default display message

Parameters:
displayNumber - display number "00" - "11"
lineOneText - first message
lineTwoText - second message
Throws:
DeviceException - on error

enableDefaultDisplay

public void enableDefaultDisplay()
                          throws DeviceException
This method enables default display messages removing any made with replaceDefaultDisplay

Throws:
DeviceException - if an error occurs

displaySingleString

public void displaySingleString(java.lang.String firstMessage,
                                java.lang.String secondMessage)
                         throws DeviceException
This method shows two strings on IntelliPIN display

Parameters:
firstMessage - The first message to display
secondMessage - The second message to display
Throws:
DeviceException - on error


Copyright © 2004 Siebel Systems, Inc. All rights reserved.