Class FinBanking
Derives and extends FinDialog to provide an optional user interface for all online banking activities.
Implements
Inherited Members
Namespace: Subsembly.FinTS.Online
Assembly: Subsembly.FinTS.Core.dll
Syntax
public class FinBanking : FinDialog, IDisposable
Remarks
This class can be configured with implementations of the interfaces IFinDocket, IFinTanProcForm and IFinTanMediaForm which provide an interactive user interface for all online banking activites. This is a convenient alternative to using the basic FinDialog and handling all user interaction in your own code.
Like any FinDialog instance, a FinBanking must be properly Disposed, if it is no longer needed. Otherwise an attached security media might never be released.
Constructors
FinBanking(FinContact, FinCredentialManager, IFinDocket)
Creates a new FinBanking instance for the given contact.
Declaration
public FinBanking(FinContact aContact, FinCredentialManager aCredentialManager, IFinDocket aDocket = null)
Parameters
Type | Name | Description |
---|---|---|
FinContact | aContact | The FinContact for the finTS dialog. This must not be |
FinCredentialManager | aCredentialManager | The credential manager that will be used to prompt the user for any required
credentials such as a PIN or TAN. Must not be |
IFinDocket | aDocket | Optional IFinDocket implementation that will receive all
progress information from this FinBanking instance. If this is
|
FinBanking(FinCredentialManager, IFinDocket)
Creates a new FinBanking instance that has not been initialized.
Declaration
public FinBanking(FinCredentialManager aCredentialManager, IFinDocket aDocket = null)
Parameters
Type | Name | Description |
---|---|---|
FinCredentialManager | aCredentialManager | The credential manager that will be used to prompt the user for any required
credentials such as a PIN or TAN. Must not be |
IFinDocket | aDocket | Optional IFinDocket implementation that will receive all
progress information from this FinBanking instance. If this is
|
Remarks
Apart from the given parameters, the FinBanking object is left completely uninitialized. In order to initialize object one of the FinPersist base class methods that load the object state must be called.
Properties
Docket
Declaration
public IFinDocket Docket { get; }
Property Value
Type | Description |
---|---|
IFinDocket |
Methods
_SendConfirmOrder(String, Boolean)
Sends a posponed order confirmation that consists of a single HKTAN process step 3 segment.
Declaration
public FinDialogResult _SendConfirmOrder(string sOrderRef, bool fMoreTansFollow = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | sOrderRef | |
System.Boolean | fMoreTansFollow |
Returns
Type | Description |
---|---|
FinDialogResult |
_SendOrder(FinOrder)
Starts sending a prepared FinOrder.
Declaration
public FinDialogResult _SendOrder(FinOrder aOrder)
Parameters
Type | Name | Description |
---|---|---|
FinOrder | aOrder | An order, usually built by a special Builder class, that shall be sent in the context of the current dialog. |
Returns
Type | Description |
---|---|
FinDialogResult |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter |
System.InvalidOperationException | This dialog is not in the Online state. |
BeginDialog(String)
Begins a new FinTS dialog with help from the user.
Declaration
public FinDialogResult BeginDialog(string sCustID = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sCustID | Optionally provides the customer ID for the dialog initialisation. If null, then the customer ID will be determined as described in the remarks section. |
Returns
Type | Description |
---|---|
FinDialogResult |
Remarks
A successfully opened dialog must be closed by calling TermDialog(), or aborted by calling CancelDialog().
This method determines the customer ID for the dialog initialisation as follows.
If an explixit non-null customer ID is given in the sCustID
parameter, it is used. If not, then the dialog type is checked. For anonymous
dialogs the special customer ID "9999999999" will be used. For non-anonymous
dialogs the FinContact of this FinDialog is queried for a
DefaultCustID. If it was set, then it will be used.
If no DefaultCustID is provided by the FinContact then
the UserID will be used as the CustID for the dialog.
CancelDialog()
Declaration
public override void CancelDialog()
Overrides
ChangePin()
Declaration
public FinDialogResult ChangePin()
Returns
Type | Description |
---|---|
FinDialogResult |
ChooseTanMedia()
Gets list of available TAN medias and tries to automatically choose one.
Declaration
public FinDialogResult ChooseTanMedia()
Returns
Type | Description |
---|---|
FinDialogResult | If no TAN media is needed, or if a valid TAN media was already chosen, then Success is returned. If there is only a single active TAN media available to the user, then it is automatically selected and Success is returned. If there are multiple possible TAN medias at the users disposal, then SelectTanMedia is returned. |
Remarks
If not already done within this session, this method starts by downloading the list of available TAN medias from the FinTS server. Thus, after any successful call to this method, the list of available TAN medias can be accessed through the TanMedias property, if it was provided by the server.
It is recommended to call this method before the first call to SendOrder(FinOrder) within a dialog.
ConfirmOrder(String, Boolean)
Starts a postponed order confirmation.
Declaration
public FinDialogResult ConfirmOrder(string sOrderRef, bool fMoreTansFollow = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | sOrderRef | The order reference of the order that shall be confirmed. This must not be
|
System.Boolean | fMoreTansFollow | If another postponed order confirmation is needed after this confirmation, then this
must be |
Returns
Type | Description |
---|---|
FinDialogResult |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | |
System.ArgumentNullException |
Dispose(Boolean)
Declaration
protected override void Dispose(bool fDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fDisposing |
Overrides
InitBankKeys()
Declaration
public FinDialogResult InitBankKeys()
Returns
Type | Description |
---|---|
FinDialogResult |
InitUserKeys()
Declaration
public FinDialogResult InitUserKeys()
Returns
Type | Description |
---|---|
FinDialogResult |
KeyBlockDialog()
Declaration
public FinDialogResult KeyBlockDialog()
Returns
Type | Description |
---|---|
FinDialogResult |
KeyChangeDialog()
Declaration
public FinDialogResult KeyChangeDialog()
Returns
Type | Description |
---|---|
FinDialogResult |
KeyUpgradeDialog(FinContact)
Declaration
public FinDialogResult KeyUpgradeDialog(FinContact aNewContact)
Parameters
Type | Name | Description |
---|---|---|
FinContact | aNewContact |
Returns
Type | Description |
---|---|
FinDialogResult |
ReadXml(XmlReader)
Declaration
public override void ReadXml(XmlReader aXmlReader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | aXmlReader |
Overrides
RevokePinBlock()
Performs a complete Revoke PIN dialog.
Declaration
public FinDialogResult RevokePinBlock()
Returns
Type | Description |
---|---|
FinDialogResult |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This dialog was not in the Idle state, or the base FinContact is not based on PIN/TAN security. |
SendDecoupled(String)
Sends a Decoupled status request (HKTAN with TAN step "S"),
Declaration
public FinDialogResult SendDecoupled(string sOrderRef)
Parameters
Type | Name | Description |
---|---|---|
System.String | sOrderRef | The order reference that was received for the actual order. This is provided through OrderRef, when the result code is NeedDecoupled. This must be provided. |
Returns
Type | Description |
---|---|
FinDialogResult |
Remarks
This call may lead to the actual execution of the order, or it may still return NeedDecoupled, if the order was not confirmed, yet. Hence, you must be prepared to call this method repeatedly until it succeeds, was cancelled, or fails.
SendOrder(FinOrder)
Declaration
public FinDialogResult SendOrder(FinOrder aOrder)
Parameters
Type | Name | Description |
---|---|---|
FinOrder | aOrder |
Returns
Type | Description |
---|---|
FinDialogResult |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | |
System.InvalidOperationException | |
System.ArgumentNullException |
SendTan(String, String, FinResponseHHDUC)
Declaration
public FinDialogResult SendTan(string sTan, string sOrderRef, FinResponseHHDUC aResponseHHDUC)
Parameters
Type | Name | Description |
---|---|---|
System.String | sTan | The transaction authentication code (TAN) that authorizes the pending dialog initialization or order. |
System.String | sOrderRef | The order reference that was received for the actual order. This is provided through OrderRef, when the result code is NeedTan. This must be provided, if TAN procedure 2 is in effect. |
FinResponseHHDUC | aResponseHHDUC | Conditional response data from HHDUC. This must be supplied if
ResponseHHDUCReqd is |
Returns
Type | Description |
---|---|
FinDialogResult | In addition to the usual FinDialogResult properties, this method always sets the PendingOrder in the returned result. A caller may use this in order to retrieve the actual order results. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter |
System.InvalidOperationException | There was no pending order waiting for a TAN. |
SyncContact()
Fully resets and re-synchronizes this Contact.
Declaration
public FinDialogResult SyncContact()
Returns
Type | Description |
---|---|
FinDialogResult | If this method returns one of the recoverable results SelectTanProc, or SelectTanMedia, then the method BeginDialog(String) shall be called in order to resume the synchronization. Calling SyncContact() again would reset the FinContact again and thus return exactly the same result. |
Remarks
This method erases all dynamically obtained data from the FinContact, such as BPD, UPD, and AllowedSecurityFunctions, and then performs all synchronization and initialization necessary for a clean setup.
TanGeneratorSync()
Performs a complete TAN generator synchronization dialog.
Declaration
public FinDialogResult TanGeneratorSync()
Returns
Type | Description |
---|---|
FinDialogResult |
TermDialog()
Declaration
public override FinDialogResult TermDialog()
Returns
Type | Description |
---|---|
FinDialogResult |
Overrides
WriteXml(XmlWriter)
Declaration
public override void WriteXml(XmlWriter aXmlWriter)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | aXmlWriter |