Class EbicsTransaction
Manages a client side EBICS transaction.
public class EbicsTransaction : EbicsTrace
- Inheritance
-
EbicsTransaction
- Inherited Members
Remarks
An EbicsTransaction instance creates EBICS requests and processes EBICS reponses for a single EBICS transaction that sends an EbicsOrder on behalf of an EbicsContact. It implements a state machine that builds and processes all the EBICS XML messages that are sent and received during the EBICS transaction.
After creating a new EbicsTransaction instance, its method BuildRequest() must be called in order to build the next EBICS request message to be sent to the EBICS host. The XML response received from the EBICS host must then be passed to the ProcessResponse(XmlDocument) method. This must be repeated until the transaction is completed, or failed unrecoverably.
Constructors
EbicsTransaction(EbicsContact, EbicsOrder, IEbicsSecurityOperations)
public EbicsTransaction(EbicsContact aContact, EbicsOrder aOrder, IEbicsSecurityOperations aSecurityMedium)
Parameters
aContact
EbicsContactThe EBICS contact (user) that will conduct this transaction. This must not be
null
.aOrder
EbicsOrderThe order to be sent in a EBICS transaction. This must not be
null
.aSecurityMedium
IEbicsSecurityOperationsAuthenticated security medium of the user that will be used to create the authentication signature and to decrypt received data.
Exceptions
- ArgumentNullException
One of the required parameters was
null
.
Fields
MAXPRODUCTINSTITUTEIDLENGTH
Maximum length of ProductInstituteID name property (=64).
public const int MAXPRODUCTINSTITUTEIDLENGTH = 64
Field Value
MAXPRODUCTLENGTH
Maximum length of Product name property (=64).
public const int MAXPRODUCTLENGTH = 64
Field Value
Properties
Product
The product information to be sent in the request header.
public string Product { get; set; }
Property Value
- string
The product description may contain up to MAXPRODUCTLENGTH characters. If it is
null
, then no Product XML element will be included in the request header.
Remarks
The default value for this property is "Subsembly EBICS" and the full version number of the Subsembly EBICS API.
ProductInstituteID
The product institute ID information to be sent in the request header.
public string ProductInstituteID { get; set; }
Property Value
- string
The product institute ID may contain up to MAXPRODUCTINSTITUTEIDLENGTH characters. If it is
null
, then no InstituteID XML attribute will be included in the Product XML element.
Remarks
The default value for this property is "Subsembly GmbH".
ProductLanguage
The product language information to be sent in the request header.
public string ProductLanguage { get; set; }
Property Value
Remarks
The default value of this property is "de".
TimestampBankParameter
public DateTime TimestampBankParameter { get; }
Property Value
TransactionID
public string TransactionID { get; }
Property Value
TransactionState
public EbicsTransactionState TransactionState { get; }
Property Value
Methods
BuildRequest()
Builds the next EBICS request XML document to be sent for this transaction.
public XmlDocument BuildRequest()
Returns
- XmlDocument
Returns a newly created XmlDocument that represents the complete EBICS request to send. If this transaction was already completed, then
null
is returned.
Execute(IEbicsTransport)
Executes this transaction online.
public EbicsErrorClass Execute(IEbicsTransport aTransport)
Parameters
aTransport
IEbicsTransport
Returns
- EbicsErrorClass
Returns the worse error class from the technical and business return codes (if any). If the transaction failed completely without ever receiving a return code, then an exception is thrown.
ProcessResponse(XmlDocument)
public bool ProcessResponse(XmlDocument xmlDocument)
Parameters
xmlDocument
XmlDocument
Returns
- bool
If this was the final response of a transaction, then
false
is returned. If further request are required in order to complete the transaction, thentrue
is returned.
Exceptions
- EbicsException
The structure or content of the response message was no valid EBICS XML.