Ejemplo n.º 1
0
        public static void Test_Flicker()
        {
            connectionDetails = _conn ?? new ConnectionDetails()
            {
                AccountHolder = "Torsten Klinger",
                Blz           = 76061482,
                BIC           = "GENODEF1HSB",
                IBAN          = "xxx",
                Url           = "https://hbci11.fiducia.de/cgi-bin/hbciservlet",
                HBCIVersion   = 300,
                UserId        = "xxx",
                Pin           = "xxx"
            };

            receiver     = "Klinger";
            receiverIBAN = "xxx";
            receiverBIC  = "SSKNDE77XXX";
            amount       = 1.0m;
            usage        = "TEST";

            HBCI.Assembly("libfintx", "1");

            HBCI.Tracing(true);

            if (HBCI.Synchronization(connectionDetails, anonymous))
            {
                Segment.HIRMS = "972"; // -> chip-TAN

                Image flickerImage = null;
                Console.WriteLine(EncodingHelper.ConvertToUTF8(HBCI.Transfer(connectionDetails, receiver, receiverIBAN, receiverBIC, amount, usage, Segment.HIRMS, anonymous, out flickerImage, 220, 160)));

                Form frm = new Form();
                frm.Size = new Size(flickerImage.Width + 5, flickerImage.Height + 5);
                PictureBox pb = new PictureBox();
                pb.Dock = DockStyle.Fill;
                frm.Controls.Add(pb);
                pb.Image = flickerImage;
                Application.Run(frm);
            }

            var timer = new System.Threading.Timer(
                e => Output(),
                null,
                TimeSpan.Zero,
                TimeSpan.FromSeconds(10));

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        public void Test_Balance()
        {
            var connectionDetails = new ConnectionDetails()
            {
                Account     = "xxx",
                Blz         = 76061482,
                BIC         = "GENODEF1HSB",
                IBAN        = "xxx",
                Url         = "https://hbci11.fiducia.de/cgi-bin/hbciservlet",
                HBCIVersion = 300,
                UserId      = "xxx",
                Pin         = "xxx"
            };

            Anonymous = false;

            #region Sync

            /* Sync */

            libfintx.Main.Assembly("libfintx", "0.1");
            libfintx.Main.Tracing(true);

            #endregion

            #region balance

            /* Balance */

            var balance = HBCI.Balance(connectionDetails, new TANDialog(WaitForTAN), false);

            Console.WriteLine("[ Balance ]");
            Console.WriteLine();
            Console.WriteLine(balance.Data.Balance);
            Console.WriteLine();

            #endregion

            Console.ReadLine();
        }
Ejemplo n.º 3
0
 static void Output()
 {
     Console.WriteLine(HBCI.Transaction_Output());
 }
Ejemplo n.º 4
0
 void Output()
 {
     output.WriteLine(HBCI.Transaction_Output());
 }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            connectionDetails = new ConnectionDetails()
            {
                AccountHolder = "Torsten Klinger",
                Blz           = 76061482,
                BIC           = "GENODEF1HSB",
                IBAN          = "xxx",
                Url           = "https://hbci11.fiducia.de/cgi-bin/hbciservlet",
                HBCIVersion   = 300,
                UserId        = "xxx",
                Pin           = "xxx"
            };

            receiver     = "Klinger";
            receiverIBAN = "xxx";
            receiverBIC  = "SSKNDE77XXX";
            amount       = 1.0m;
            usage        = "TEST";

            HBCI.Assembly("libfintx", "1");

            HBCI.Tracing(true);

            //Transfer with chipTan based on WindowsForms rendering

            /*
             * if (HBCI.Synchronization(connectionDetails, anonymous))
             * {
             *  Task oFlicker = new Task(() => openFlickerWindow());
             *  oFlicker.Start();
             *
             *  Task oTAN = new Task(() => openTANWindow());
             *  oTAN.Start();
             *
             *  Segment.HIRMS = "911"; // -> chip-TAN
             *
             *  System.Threading.Thread.Sleep(5000);
             *
             *  Console.WriteLine(EncodingHelper.ConvertToUTF8(HBCI.Transfer(connectionDetails, receiver, receiverIBAN, receiverBIC, amount, usage, Segment.HIRMS, pictureBox, anonymous)));
             * }
             *
             * var timer = new System.Threading.Timer(
             *  e => Output(),
             *  null,
             *  TimeSpan.Zero,
             *  TimeSpan.FromSeconds(10));
             *
             * Console.ReadLine();
             */

            //Transfer with chipTan based on GIF-rendering
            if (HBCI.Synchronization(connectionDetails, anonymous))
            {
                Segment.HIRMS = "972"; // -> chip-TAN

                Image flickerImage = null;
                Console.WriteLine(EncodingHelper.ConvertToUTF8(HBCI.Transfer(connectionDetails, receiver, receiverIBAN, receiverBIC, amount, usage, Segment.HIRMS, anonymous, out flickerImage, 220, 160)));

                Form frm = new Form();
                frm.Size = new Size(flickerImage.Width + 5, flickerImage.Height + 5);
                PictureBox pb = new PictureBox();
                pb.Dock = DockStyle.Fill;
                frm.Controls.Add(pb);
                pb.Image = flickerImage;
                Application.Run(frm);
            }

            var timer = new System.Threading.Timer(
                e => Output(),
                null,
                TimeSpan.Zero,
                TimeSpan.FromSeconds(10));

            Console.ReadLine();
        }