Knowledge about DUKPT is required to use this command.
The command pinpad.getpindukpt captures a PIN and encrypts it using the standard DUKPT in the internal or external PIN-Pad, while displaying a message on the PIN-Pad or device display.
- maxlen [integer] Maximum number of characters typed in the PIN.
- message [string] Message that will be displayed on the external PIN-Pad's display (or internal in the case of a POS terminal).
- pan [string] Card primary account number.
- type [integer] Type of algorithm used in the encryption, which can be:
- variablereturnksn [string] Variable that will store the KSN returned by the encryption process.
- variablereturnpin [string] Variable that will store the encrypted PIN.
- variablereturn [integer] Variable that will store the return code, where:
- 0: OK
- -1: COMM Error
- -2: Canceled
- -3: PIN Error
In the example above, a connection is opened with the internal PIN-Pad using the command pinpad.open, and then the command pinpad.getpindukpt is executed.
The user is requested to type the PIN (password); the PIN is then encrypted and stored in the variable sEncriptedPIN, and the KSN is stored in the variable sKSN. Since the return value is an integer, the return is converted to stringvariable with the command inttostring
The PIN-Pad is disconnected using the command pinpad.close and then the values of the variables are displayed using the command display