set Dsp Callback
Configures display callbacks for EMV transaction user interface interactions.
This method registers an implementation of INexusDspCallbacks that will handle all display-related events during EMV transaction processing. The callbacks are essential for managing user interactions such as PIN entry prompts, application selection menus, cardholder verification confirmations, and other UI elements required during the transaction flow.
Prerequisites:
There is no prerequisites for setting display callbacks.
Usage requirement: This method must be called before invoking startTransaction. Failure to set display callbacks will result in transaction failures when user interaction is required.
Callback events typically handled:
Clear (Clear display)
Text (Handle almost all events during transaction processing).
MenuShow (Starts menu screens presentation.)
Menu (Handle any menu operation).
Thread safety: The provided callback implementation should be thread-safe as it may be invoked from different threads during transaction processing.
Exceptions: This function MUST NOT throw any exception. Any error must be indicated through NexusRet Any unexpected error must be mapped as NexusRet.INTERR
Return
NexusRet indicating the callback configuration result:
NexusRet.OK: Display callbacks configured successfully
NexusRet.INTERR: Internal error during callback configuration
Other values: Specific configuration errors as defined by the implementation
Example usage:
val displayCallbacks = object : INexusDspCallbacks.Stub() {
override fun Clear() {
// Handle Clear callback here
}
override fun Text(lFlags: Long, sTxt1: String?, sTxt2: String?) {
// Handle Text callback here
}
override fun MenuStart(sTitle: String?, lFlags: Long?): Int {
// Handle MenuStart callback here
}
override fun MenuShow(lFlags: Long, saOpts: List<String?>?, iOptSel: Int): Int {
// Handle MenuShow callback here
}
}
emvPort.setDspCallback(displayCallbacks)
// Now ready to start transaction
val cardType = emvPort.startTransaction()Parameters
An implementation of INexusDspCallbacks that will handle all display and user interaction events during EMV transactions. Must not be null and should provide implementations for all required callback methods.