User Selection
METHOD NAME userSelection
This method is Cancelable.
Requires state
IDLE
and during process moves toPROMPT
Description
This method creates a custom menu with client customization. Once the request is processed, it waits for the user's selection, a cancel event, or a timeout and responds accordingly.
Parameters
object
-
commandId
string
REQUIRED
Id that is used as a reference to cancel the command -
options
MenuSelectionOption[]
REQUIRED
The option to select from. Non non-empty array is required. -
title
string
The title at the top of the screen is displayed to the user -
body
string
The message body on the screen displayed to the user -
timeout
int
Time in seconds until a response with aTIMEOUT
result is returned.
Default: 60 seconds. The value must be greater than zero -
cancelable
boolean
A flag indicates if the user can cancel the operation from the selection screen. Defaulttrue
Result
object
when a request is valid and the device is prompted with the menu.
-
commandId
string
Echo back the id from the request -
result
Result
Possible results are:OK
,CANCELED
,TIMEOUT
(1) Show values-
Result
Result of new request. Each command has possible values in the field.
OK
Request is okGENERAL_ERROR
An error occurredCANCELED
Command was canceled either by the user (on-screen) or throughcancel
command,TIMEOUT
Operation was timed out.HOST_ERROR
Host returned an error regarding the request.SMART_READER_ERROR
An error occurred with the smart-readerSMART_CARD_ERROR
An error occurred with the smart card, or the reader couldn't communicate with the card.NONE_CREDIT_CARD
Industrial card was detected when performing a transaction.CARD_NOT_ALLOWED
When the detected card is not allowed to be processed
-
-
selectedId
string
The id of the selected item, as defined in theoptions
. This value is populated only if theresult
isOK
.
Errors
MissingParams
InvalidParams
on incorrect OTPIllegalState