Interface IFinDecoupledForm
Asynchronous UI for showing and hiding modeless prompts for decoupled transaction confirmation.
public interface IFinDecoupledForm
Remarks
At any one time there can always be only one Decoupled Prompt showing. If StartDecoupledPrompt(FinContact, FinCredential, Action) is invoked, while there is already a Prompt showing, then the new Prompt shall replace the old Prompt. This could be done in order to update the prompt text. Also, be prepared that FinishDecoupledPrompt(FinContact, FinDialogResultCode) may be invoked with any prompt currently showing.
An asynchronous modeless prompt only works when it is shown from a background worker thread. Hence the methods of this interface must never be called from the main UI thread. In order to ensure this, an implementation of IFinDecoupledForm must only be provided to the FinCredentialManager, when it will be solely used from a worker thread.
Methods
FinishDecoupledPrompt(FinContact, FinDialogResultCode)
Remove the prompt previously shown by StartDecoupledPrompt(FinContact, FinCredential, Action).
void FinishDecoupledPrompt(FinContact aContact, FinDialogResultCode nResult)
Parameters
aContact
FinContactnResult
FinDialogResultCodeThe actual result from the decoupled confirmation. Possible result values are: Success, Cancelled, Error, or any FinTS status error code with a value between 9000 and 9999.
StartDecoupledPrompt(FinContact, FinCredential, Action)
Invoked in order to show a modeless prompt to instruct the user to perform a decoupled transaction confirmation. The method must show the prompt and return.
bool StartDecoupledPrompt(FinContact aContact, FinCredential aCredential, Action fnOnCancel)
Parameters
aContact
FinContactIdentifies the contact for which to complete the decoupled transaction confirmation. This is used to provide as much information to the user as possible.
aCredential
FinCredentialProvides the information to be shown on the prompt. Not all properties of this instance shall actually be used when constructing the prompt. Only the following properties are of concern: Heading, Prompt, TanProcessParameters, and TanMediaName. All other properties must be ignored.
fnOnCancel
ActionOptional callback that shall be invoked when the user clicks on a CANCEL button located on the prompt, or otherwise dismisses the prompt. If this is
null
, then no CANCEL button shall be present.
Returns
- bool
If the prompt was created successfully, and it is now shown, then
true
shall be returned. If the prompt could not be created, thenfalse
shall be returned. Only when this method returnstrue
, then FinishDecoupledPrompt(FinContact, FinDialogResultCode) must be returned to finally remove the prompt.
Remarks