public static void Test_PushTAN() { string receiver = string.Empty; string receiverIBAN = string.Empty; string receiverBIC = string.Empty; decimal amount = 0; string usage = string.Empty; bool anonymous = false; ConnectionDetails connectionDetails = _conn ?? new ConnectionDetails() { AccountHolder = "Torsten Klinger", Blz = 76050101, BIC = "SSKNDE77XXX", IBAN = "xxx", Url = "https://banking-by1.s-fints-pt-by.de/fints30", HBCIVersion = 300, UserId = "xxx", Pin = "xxx" }; receiver = "Klinger"; receiverIBAN = "xxx"; receiverBIC = "GENODEF1HSB"; amount = 1.0m; usage = "TEST"; HBCI.Assembly("libfintx", "1"); HBCI.Tracing(true); if (HBCI.Synchronization(connectionDetails).IsSuccess) { Segment.HIRMS = "921"; // -> pushTAN var tanmediumname = libfintx.Main.RequestTANMediumName(connectionDetails); Segment.HITAB = tanmediumname.Data; System.Threading.Thread.Sleep(5000); Console.WriteLine(HBCI.Transfer(connectionDetails, receiver, receiverIBAN, receiverBIC, amount, usage, Segment.HIRMS, null, anonymous)); Console.WriteLine(Segment.HITANS); } var timer = new System.Threading.Timer( e => HBCI.Transaction_Output(), null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); Console.ReadLine(); }
static void Main(string[] args) { connectionDetails = new ConnectionDetails() { AccountHolder = "Torsten Klinger", Blz = 76050101, BIC = "SSKNDE77XXX", IBAN = "xxx", Url = "https://banking-by1.s-fints-pt-by.de/fints30", HBCIVersion = 300, UserId = "xxx", Pin = "xxx" }; receiver = "Klinger"; receiverIBAN = "xxx"; receiverBIC = "GENODEF1HSB"; amount = 1.0m; usage = "TEST"; HBCI.Assembly("libfintx", "1"); HBCI.Tracing(true); if (HBCI.Synchronization(connectionDetails, anonymous)) { Task oTAN = new Task(() => openTANWindow()); oTAN.Start(); Segment.HIRMS = "921"; // -> pushTAN var tanmediumname = libfintx.Main.RequestTANMediumName(connectionDetails); Segment.HITAB = tanmediumname; System.Threading.Thread.Sleep(5000); Console.WriteLine(EncodingHelper.ConvertToUTF8(HBCI.Transfer(connectionDetails, receiver, receiverIBAN, receiverBIC, amount, usage, Segment.HIRMS, pictureBox, anonymous))); Console.WriteLine(Segment.HITANS); } var timer = new System.Threading.Timer( e => Output(), null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); Console.ReadLine(); }
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(); }
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(); }