UserInputEvent

public class UserInputEvent

Either contains the information requested from the customer, or enables sending a response to collect information from the cashier.

Fields

INPUT_MASK_CAPABILITY

public static final String INPUT_MASK_CAPABILITY

Enables querying if the device supports masking the input.

RECEIVED_TYPE

public static final String RECEIVED_TYPE

The type when responding to the TransactionManager.requestUserInput(String,String,String) or the TransactionManager.presentUserOptions(String,String[]) methods.

REQUEST_TYPE

public static final String REQUEST_TYPE

The type when the terminal/POI is requesting input from the cashier.

TYPE

public static final String TYPE

Methods

generateUserInputEventResponse

public UserInputEventResponse generateUserInputEventResponse()

Generates response for UserInputEvent

getDefaultValue

public String getDefaultValue()

If getType() is TYPE, returns the default value from the original request, otherwise this returns the requested default value.

getEventId

public String getEventId()

Returns the event ID associated with this event. Useful for matching the event received by the listener to the original status returned when issuing the call, for example, calling com.verifone.commerce.payment.TransactionManager.reprintReceipt(Payment) returns a CommerceEvent containing an event ID, which will match the event ID received by the CommerceListener when the receipt reprint is complete.

getInputSubcommand

public InputSubcommand getInputSubcommand()

Return the input subcommand that is being requested

getInputType

public InputType getInputType()

If getType() is TYPE, returns the requested input type, else if this is the REQUEST_TYPE, returns the input type that is being requested.

getInternalData

public String getInternalData()

Get InternalData - mainly for legacy POS support

getInvoiceId

public String getInvoiceId()

The invoice ID for the transaction as a reference.

getMessage

public String getMessage()

A user-readable message. This message may not be localized, in which case the type field should be used for determining a localized message.

getRequestParameters

public RequestParameters getRequestParameters()

Returns the current RequestParameters if this is of type REQUEST_TYPE.

getSessionId

public String getSessionId()

Get the session ID for the session which triggered this event.

getSignature

public Image getSignature()

Returns the signature image. When getType() is REQUEST_TYPE, then this will only have a value if the InputSubcommand is SIGNATURE_PROVIDED. When getType() is RECEIVED_TYPE, this will only have a value if the InputType is SIGNATURE.

getStatus

public int getStatus()

Get the status for this particular event. A status of 0 means success, any other status is a failure.

getTransaction

public Transaction getTransaction()

The transaction associated with this event.

getType

public String getType()

The event type, either RECEIVED_TYPE or REQUEST_TYPE.

getValues

public Values getValues()

If getType() is TYPE, returns the values as collected by the terminal, otherwise this will be null.