PinPad Class (POS for .NET v1.12 SDK Documentation)
2/27/2008
Defines the programmatic interface for a UPOS PIN pad device.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustInherit Class PinPad
Inherits PosCommon
public abstract class PinPad : PosCommon
public ref class PinPad abstract : public PosCommon
public abstract class PinPad extends PosCommon
public abstract class PinPad extends PosCommon
Remarks
PIN pad devices in POS for .NET support two types of operations:
Entering personal identification numbers (PINs), and
Communicating with an Electronic Funds Transfer (EFT) Transaction Host, using encrypted data.
PIN pads perform these operations by using one or more PIN Pad Management Systems, which define how the PIN pad performs tasks such as PIN encryption. For example, a PIN pad service object might include PIN Pad Management System implementations for any of the following: Master-Session, DUKPT, APACS40, HGEPOS, AS2805, and JDEBIT2.
The POS for .NET provides methods for implementing the following features:
PIN entry at the PIN pad keyboard, which can be encrypted and transferred to the application;
Message Authentication Code computations;
Key updates in accordance with the parameters of the selected PIN Pad Management System;
Support of multiple PIN Pad Management Systems for each PIN pad object; and
Use of the PIN pad keyboard, line display, and tone generator devices in conjunction with the PIN pad device.
Programming Model
PIN pads are exclusive-use devices. Therefore, to access and use a PIN pad, the application must:
Claim the PIN pad before enabling it; and
Claim and enable the PIN pad before it begins reading input, or before the application calls methods that manipulate it.
A PIN pad performs encryption operations under the control of a PIN Pad Management System, which the PIN pad’s service object implements. Depending on the capabilities of the PIN pad, the service object may implement multiple PIN Pad Management Systems, as well as support for multiple key sets within the PIN Pad Management Systems, based on the number and variety of EFT Transaction Hosts. Therefore, for each EFT transaction, the application must select the PIN Pad Management System and EFT Transaction Host to be used.
One or more EFT transaction parameters typically must be provided to the PIN pad for use in encryption operations. To facilitate migration to an EFT Transaction Host that requires a different PIN Pad Management System, it is best to set all EFT Transaction properties.
After claiming and enabling the PIN pad, the application should do the following for each EFT Transaction:
Set the PinPad AccountNumber, Amount, MerchantID, TerminalID, Track1Data, Track2Data, Track3Data, Track4Data and TransactionType properties. Call the BeginEftTransaction method, which initializes the service object and PinPad for performing the encryption functions for the EFT transaction.
If PIN entry is required, call the EnablePinEntry method, then set the DataEventEnabled property and wait for the DataEvent event.
If Message Authentication Codes (MAC) are required, use the ComputeMac and VerifyMac methods.
Call the EndEftTransaction method, which notifies the service object that all operations for the EFT transaction have been completed.
POS for .NET supports two programming models for how to use the display on the PIN pad. The CapDisplay property, set by the service object and initialized when the application calls the Open method, indicates which of the following models the PIN pad supports:
In the first model, if the CapDisplay property is set to either PinPadDisplay.Unrestricted or PinPadDisplay.PinRestricted, the application controls the displayed text. The application uses the POS for .NET LineDisplay class to display messages.
In the second model, if the CapDisplay property is set to either PinPadDisplay.RestrictedList or PinPadDisplay.RestrictedOrder, the application must select from a list of pre-defined and possibly pre-ordered messages to be displayed. For this model, there is a set of PIN pad properties that are used to control the display.
All methods for the PinPadBase Class do basic validation and then call their associated [MethodName]Impl methods, which the underlying Service Object implements. For example, the BeginEftTransaction method sets an internal variable that keeps track of whether or not the transaction is an EFT transaction, prior to calling the underlying service object implementation. Calling the EndEftTransaction method resets this variable.
Inheritance Hierarchy
System.Object
Microsoft.PointOfService.PosDevice
Microsoft.PointOfService.PosCommon
Microsoft.PointOfService.PinPad
Microsoft.PointOfService.BasicServiceObjects.PinPadBasic
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.