iamtorsten / libfintx

Moved to https://github.com/libfintx/libfintx - please use the new repository!
https://github.com/libfintx/libfintx
GNU Lesser General Public License v3.0
115 stars 40 forks source link

9130: unzulässiges Sonderzeichen #120

Open cankaya-cme opened 12 months ago

cankaya-cme commented 12 months ago

Hi, I am trying very simply to list the accounts with csharp. Here is the code I am using:

using System.Net;
using libfintx.FinTS;
using libfintx.FinTS.Data;
using System.Text.RegularExpressions;

namespace ConsoleApp1
{
    internal class Program
    {
        static async Task Main(string[] args)
        {
            var client = new FinTsClient(new ConnectionDetails()
            {
                Blz = 72160818,
                Url = "https://hbci11.fiducia.de/cgi-bin/hbciservlet",
                UserId = "tester.demo@gmx.net",
                Pin = "xxx"
            });

            var sync = await client.Synchronization();

            if (sync.IsSuccess)
            {

                var x = await client.Accounts(new TANDialog(WaitForTanAsync));

                var data = x.Data.ToList();
            }
        }

        static async Task<string> WaitForTanAsync(TANDialog tanDialog)
        {
            foreach (var msg in tanDialog.DialogResult.Messages)
                Console.WriteLine(msg);

            return await Task.FromResult(Console.ReadLine());
        }
    }
}

The exception I am getting is the following:

{9050: Die Nachricht enthält Fehler., 9800: Dialog abgebrochen, 9130: unzulässiges Sonderzeichen:}

RawData

HNHBK:1:3+000000000170+300+0+1+0:1'HIRMG:2:2+9050::Die Nachricht enthält Fehler.+9800::Dialog abgebrochen'HIRMS:3:2:998+9130:8,3:unzulässiges Sonderzeichen?:'HNHBS:4:1+1'

I really don't know what to debug here because everything looks normal.

Any help?

leo-schick commented 11 months ago

@cankaya-cme are you sure about the user id? It might be that the bank does not support @ signs in the user id. Is it possible to take the account number or a login account id which is not formatted as email as well?