Beispiel #1
0
        /// <summary>
        /// Request tan medium name
        /// </summary>
        /// <param name="connectionDetails">ConnectionDetails object must atleast contain the fields: Url, HBCIVersion, UserId, Pin, Blz</param>
        /// <returns>
        /// TAN Medium Name
        /// </returns>
        public async Task <HBCIDialogResult <List <string> > > RequestTANMediumName()
        {
            HKTAN.SegmentId = "HKTAB";

            HBCIDialogResult result = await InitializeConnection();

            if (!result.IsSuccess)
            {
                return(result.TypedResult <List <string> >());
            }

            // Should not be needed when processing HKTAB
            //result = ProcessSCA(connectionDetails, result, tanDialog);
            //if (!result.IsSuccess)
            //    return result.TypedResult<List<string>>();

            string BankCode = await Transaction.HKTAB(this);

            result = new HBCIDialogResult <List <string> >(Helper.Parse_BankCode(BankCode), BankCode);
            if (!result.IsSuccess)
            {
                return(result.TypedResult <List <string> >());
            }

            // Should not be needed when processing HKTAB
            //result = ProcessSCA(connectionDetails, result, tanDialog);
            //if (!result.IsSuccess)
            //    return result.TypedResult<List<string>>();

            BankCode = result.RawData;
            string BankCode_ = "HITAB" + Helper.Parse_String(BankCode, "'HITAB", "'");

            return(result.TypedResult(Helper.Parse_TANMedium(BankCode_)));
        }