Class FinBanking
Derives and extends FinDialog to provide an optional user interface for all online banking activities.
public class FinBanking : FinDialog, IDisposable
- Inheritance
-
FinBanking
- Implements
- Inherited Members
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.
public FinBanking(FinContact aContact, FinCredentialManager aCredentialManager, IFinDocket aDocket = null)
Parameters
aContactFinContactThe FinContact for the finTS dialog. This must not be
null.aCredentialManagerFinCredentialManagerThe credential manager that will be used to prompt the user for any required credentials such as a PIN or TAN. Must not be
null.aDocketIFinDocketOptional IFinDocket implementation that will receive all progress information from this FinBanking instance. If this is
null, then the default FinDocket implementation will be used.
FinBanking(FinCredentialManager, IFinDocket)
Creates a new FinBanking instance that has not been initialized.
public FinBanking(FinCredentialManager aCredentialManager, IFinDocket aDocket = null)
Parameters
aCredentialManagerFinCredentialManagerThe credential manager that will be used to prompt the user for any required credentials such as a PIN or TAN. Must not be
null.aDocketIFinDocketOptional IFinDocket implementation that will receive all progress information from this FinBanking instance. If this is
null, then the default FinDocket implementation will be used.
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
public IFinDocket Docket { get; }
Property Value
Methods
BeginDialog(string)
Begins a new FinTS dialog with help from the user.
public FinDialogResult BeginDialog(string sCustID = null)
Parameters
sCustIDstringOptionally provides the customer ID for the dialog initialisation. If null, then the customer ID will be determined as described in the remarks section.
Returns
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()
public override void CancelDialog()
ChangePin()
public FinDialogResult ChangePin()
Returns
ChooseTanMedia()
Gets list of available TAN medias and tries to automatically choose one.
public FinDialogResult ChooseTanMedia()
Returns
- 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, bool)
Starts a postponed order confirmation.
public FinDialogResult ConfirmOrder(string sOrderRef, bool fMoreTansFollow = false)
Parameters
sOrderRefstringThe order reference of the order that shall be confirmed. This must not be
null.fMoreTansFollowboolIf another postponed order confirmation is needed after this confirmation, then this must be
true>. However, in basically all cases there is only a single additional confirmation and thus this is usuallyfalse.
Returns
Exceptions
Dispose(bool)
protected override void Dispose(bool fDisposing)
Parameters
fDisposingbool
InitBankKeys()
public FinDialogResult InitBankKeys()
Returns
InitUserKeys()
public FinDialogResult InitUserKeys()
Returns
KeyBlockDialog()
public FinDialogResult KeyBlockDialog()
Returns
KeyChangeDialog()
public FinDialogResult KeyChangeDialog()
Returns
KeyUpgradeDialog(FinContact)
public FinDialogResult KeyUpgradeDialog(FinContact aNewContact)
Parameters
aNewContactFinContact
Returns
ReadXml(XmlReader)
public override void ReadXml(XmlReader aXmlReader)
Parameters
aXmlReaderXmlReader
RevokePinBlock()
Performs a complete Revoke PIN dialog.
public FinDialogResult RevokePinBlock()
Returns
Exceptions
- InvalidOperationException
This dialog was not in the Idle state, or the base FinContact is not based on PIN/TAN security.
SendConfirmationOfPayee(FinByteBuffer)
After getting a positive confirmation from the user, this method shall be called in order to finally execute the pending order.
public FinDialogResult SendConfirmationOfPayee(FinByteBuffer vbVopID)
Parameters
vbVopIDFinByteBufferThe VOP-ID of the Verification of Payee operation. This is needed to properly associate the confirmation with the actual order. This must not be
null.
Returns
SendContinue()
public FinDialogResult SendContinue()
Returns
SendDecoupled(string)
Sends a Decoupled status request (HKTAN with TAN step "S"),
public FinDialogResult SendDecoupled(string sOrderRef)
Parameters
sOrderRefstringThe 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
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)
Sends the given order to the FinTS server.
public FinDialogResult SendOrder(FinOrder aOrder)
Parameters
aOrderFinOrderAn order, usually built by a special FinOrderBuilder class, that shall be sent in the context of the current dialog.
Returns
Remarks
This invokes SendOrder(FinOrder, bool) passing the value true
as the second parameter, indicating that VoP Opt-Out is preferred.
SendOrder(FinOrder, bool)
Sends the given order to the FinTS server.
public FinDialogResult SendOrder(FinOrder aOrder, bool fVopOptOutPreferred)
Parameters
aOrderFinOrderAn order, usually built by a special FinOrderBuilder class, that shall be sent in the context of the current dialog.
fVopOptOutPreferredboolIf
true, then the user prefers to Opt-Out from Verification of Payee, if this is possible.
Returns
Remarks
This is just the first step in submitting an order to the FinTS server. Usually additional steps are needed, such as sending a TAN via SendTan(string, string, FinResponseHHDUC), or confirmation of a Verification of Payee result. Only after the last step was completed successfully, the actual result of the order is known.
The FinDialogResult that is returned describes the next step that is necessary (or just indicates a failure or success).
Exceptions
SendTan(string, string, FinResponseHHDUC)
public FinDialogResult SendTan(string sTan, string sOrderRef, FinResponseHHDUC aResponseHHDUC)
Parameters
sTanstringThe transaction authentication code (TAN) that authorizes the pending dialog initialization or order.
sOrderRefstringThe 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.
aResponseHHDUCFinResponseHHDUCConditional response data from HHDUC. This must be supplied if ResponseHHDUCReqd is
true.
Returns
- 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
- ArgumentNullException
The parameter
sTanwasnull, orsOrderRefwasnulland TAN procedure 2 was in use.- InvalidOperationException
There was no pending order waiting for a TAN.
SyncContact()
Fully resets and re-synchronizes this Contact.
public FinDialogResult SyncContact()
Returns
- 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.
public FinDialogResult TanGeneratorSync()
Returns
TermDialog()
public override FinDialogResult TermDialog()
Returns
WriteXml(XmlWriter)
public override void WriteXml(XmlWriter aXmlWriter)
Parameters
aXmlWriterXmlWriter