Esempio n. 1
0
        /// <summary>
        /// Submit bankers order
        /// </summary>
        /// <param name="connectionDetails">ConnectionDetails object must atleast contain the fields: Url, HBCIVersion, UserId, Pin, Blz, IBAN, BIC, AccountHolder</param>
        /// <param name="mobileServiceProvider"></param>
        /// <param name="phoneNumber"></param>
        /// <param name="amount"></param>
        /// <param name="receiverName"></param>
        /// <param name="receiverIBAN"></param>
        /// <param name="receiverBIC"></param>
        /// <param name="amount">Amount to transfer</param>
        /// <param name="purpose">Short description of the transfer (dt. Verwendungszweck)</param>
        /// <param name="firstTimeExecutionDay"></param>
        /// <param name="timeUnit"></param>
        /// <param name="rota"></param>
        /// <param name="executionDay"></param>
        /// <param name="HIRMS">Numerical SecurityMode; e.g. 972 for "Sparkasse chipTan optisch"</param>
        /// <param name="pictureBox">Picturebox which shows the TAN</param>
        /// <param name="anonymous"></param>
        /// <returns>
        /// Bank return codes
        /// </returns>
        public static string SubmitBankersOrder(ConnectionDetails connectionDetails, string receiverName, string receiverIBAN, string receiverBIC, decimal amount, string purpose, DateTime firstTimeExecutionDay,
                                                HKCDE.TimeUnit timeUnit, string rota, int executionDay, string HIRMS, PictureBox pictureBox, bool anonymous)
        {
            if (Transaction.INI(connectionDetails, anonymous) == true)
            {
                TransactionConsole.Output = string.Empty;

                if (!String.IsNullOrEmpty(HIRMS))
                {
                    Segment.HIRMS = HIRMS;
                }

                var BankCode = Transaction.HKCDE(connectionDetails, receiverName, receiverIBAN, receiverBIC, amount, purpose, firstTimeExecutionDay, timeUnit, rota, executionDay);

                if (BankCode.Contains("+0030::"))
                {
                    Helper.Parse_BankCode(BankCode, pictureBox);

                    return("OK");
                }
                else
                {
                    var msg = Helper.Parse_BankCode_Error(BankCode);

                    Log.Write(msg);

                    return(msg);
                }
            }
            else
            {
                return("Error");
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Load mobile phone prepaid card
        /// </summary>
        /// <param name="connectionDetails">ConnectionDetails object must atleast contain the fields: Url, HBCIVersion, UserId, Pin, Blz, IBAN, BIC</param>
        /// <param name="mobileServiceProvider"></param>
        /// <param name="phoneNumber"></param>
        /// <param name="amount">Amount to transfer</param>
        /// <param name="HIRMS">Numerical SecurityMode; e.g. 972 for "Sparkasse chipTan optisch"</param>
        /// <param name="pictureBox">Picturebox which shows the TAN</param>
        /// <param name="anonymous"></param>
        /// <returns>
        /// Bank return codes
        /// </returns>
        public static string Prepaid(ConnectionDetails connectionDetails, int mobileServiceProvider, string phoneNumber, int amount, string HIRMS, PictureBox pictureBox, bool anonymous)
        {
            if (Transaction.INI(connectionDetails, anonymous) == true)
            {
                TransactionConsole.Output = string.Empty;

                if (!String.IsNullOrEmpty(HIRMS))
                {
                    Segment.HIRMS = HIRMS;
                }

                var BankCode = Transaction.HKPPD(connectionDetails, mobileServiceProvider, phoneNumber, amount);

                if (BankCode.Contains("+0030::"))
                {
                    Helper.Parse_BankCode(BankCode, pictureBox);

                    return("OK");
                }
                else
                {
                    var msg = Helper.Parse_BankCode_Error(BankCode);

                    Log.Write(msg);

                    return(msg);
                }
            }
            else
            {
                return("Error");
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Collective collect money from other accounts
        /// </summary>
        /// <param name="connectionDetails">ConnectionDetails object must atleast contain the fields: Url, HBCIVersion, UserId, Pin, Blz, IBAN, BIC, AccountHolder</param>
        /// <param name="settlementDate"></param>
        /// <param name="painData"></param>
        /// <param name="numberOfTransactions"></param>
        /// <param name="totalAmount"></param>
        /// <param name="HIRMS">Numerical SecurityMode; e.g. 972 for "Sparkasse chipTan optisch"</param>
        /// <param name="pictureBox">Picturebox which shows the TAN</param>
        /// <param name="anonymous"></param>
        /// <returns>
        /// Bank return codes
        /// </returns>
        public static string CollectiveCollect(ConnectionDetails connectionDetails, DateTime settlementDate, List <pain00800202_cc_data> painData,
                                               string numberOfTransactions, decimal totalAmount, string HIRMS, PictureBox pictureBox, bool anonymous)
        {
            if (Transaction.INI(connectionDetails, anonymous) == true)
            {
                TransactionConsole.Output = string.Empty;

                if (!String.IsNullOrEmpty(HIRMS))
                {
                    Segment.HIRMS = HIRMS;
                }

                var BankCode = Transaction.HKDME(connectionDetails, settlementDate, painData, numberOfTransactions, totalAmount);

                if (BankCode.Contains("+0030::"))
                {
                    Helper.Parse_BankCode(BankCode, pictureBox);

                    return("OK");
                }
                else
                {
                    var msg = Helper.Parse_BankCode_Error(BankCode);

                    Log.Write(msg);

                    return(msg);
                }
            }
            else
            {
                return("Error");
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Collect money from another account
        /// </summary>
        /// <param name="connectionDetails">ConnectionDetails object must atleast contain the fields: Url, HBCIVersion, UserId, Pin, Blz, IBAN, BIC, AccountHolder</param>
        /// <param name="payerName">Name of the payer</param>
        /// <param name="payerIBAN">IBAN of the payer</param>
        /// <param name="payerBIC">BIC of the payer</param>
        /// <param name="amount">Amount to transfer</param>
        /// <param name="purpose">Short description of the transfer (dt. Verwendungszweck)</param>
        /// <param name="settlementDate"></param>
        /// <param name="mandateNumber"></param>
        /// <param name="mandateDate"></param>
        /// <param name="creditorIdNumber"></param>
        /// <param name="HIRMS">Numerical SecurityMode; e.g. 972 for "Sparkasse chipTan optisch"</param>
        /// <param name="pictureBox">Picturebox which shows the TAN</param>
        /// <param name="anonymous"></param>
        /// <returns>
        /// Bank return codes
        /// </returns>
        public static string Collect(ConnectionDetails connectionDetails, string payerName, string payerIBAN, string payerBIC, decimal amount, string purpose, DateTime settlementDate,
                                     string mandateNumber, DateTime mandateDate, string creditorIdNumber, string HIRMS, PictureBox pictureBox, bool anonymous)
        {
            if (Transaction.INI(connectionDetails, anonymous) == true)
            {
                TransactionConsole.Output = string.Empty;

                if (!String.IsNullOrEmpty(HIRMS))
                {
                    Segment.HIRMS = HIRMS;
                }

                var BankCode = Transaction.HKDSE(connectionDetails, payerName, payerIBAN, payerBIC, amount, purpose, settlementDate, mandateNumber, mandateDate, creditorIdNumber);

                if (BankCode.Contains("+0030::"))
                {
                    Helper.Parse_BankCode(BankCode, pictureBox);

                    return("OK");
                }
                else
                {
                    var msg = Helper.Parse_BankCode_Error(BankCode);

                    Log.Write(msg);

                    return(msg);
                }
            }
            else
            {
                return("Error");
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Rebook money from one to another account
        /// </summary>
        /// <param name="connectionDetails">ConnectionDetails object must atleast contain the fields: Url, HBCIVersion, UserId, Pin, Blz, IBAN, BIC, AccountHolder</param>
        /// <param name="receiverName">Name of the recipient</param>
        /// <param name="receiverIBAN">IBAN of the recipient</param>
        /// <param name="receiverBIC">BIC of the recipient</param>
        /// <param name="amount">Amount to transfer</param>
        /// <param name="purpose">Short description of the transfer (dt. Verwendungszweck)</param>
        /// <param name="HIRMS">Numerical SecurityMode; e.g. 972 for "Sparkasse chipTan optisch"</param>
        /// <param name="pictureBox">Picturebox which shows the TAN</param>
        /// <param name="anonymous"></param>
        /// <returns>
        /// Bank return codes
        /// </returns>
        public static string Rebooking(ConnectionDetails connectionDetails, string receiverName, string receiverIBAN, string receiverBIC, decimal amount, string purpose, string HIRMS, PictureBox pictureBox, bool anonymous)
        {
            if (Transaction.INI(connectionDetails, anonymous) == true)
            {
                TransactionConsole.Output = string.Empty;

                if (!String.IsNullOrEmpty(HIRMS))
                {
                    Segment.HIRMS = HIRMS;
                }

                var BankCode = Transaction.HKCUM(connectionDetails, receiverName, receiverIBAN, receiverBIC, amount, purpose);

                if (BankCode.Contains("+0030::"))
                {
                    Helper.Parse_BankCode(BankCode, pictureBox);

                    return("OK");
                }
                else
                {
                    var msg = Helper.Parse_BankCode_Error(BankCode);

                    Log.Write(msg);

                    return(msg);
                }
            }
            else
            {
                return("Error");
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Transfer money - General method
        /// </summary>
        /// <param name="connectionDetails">ConnectionDetails object must atleast contain the fields: Url, HBCIVersion, UserId, Pin, Blz, IBAN, BIC, AccountHolder</param>
        /// <param name="receiverName">Name of the recipient</param>
        /// <param name="receiverIBAN">IBAN of the recipient</param>
        /// <param name="receiverBIC">BIC of the recipient</param>
        /// <param name="amount">Amount to transfer</param>
        /// <param name="purpose">Short description of the transfer (dt. Verwendungszweck)</param>
        /// <param name="HIRMS">Numerical SecurityMode; e.g. 911 for "Sparkasse chipTan optisch"</param>
        /// <param name="pictureBox">Picturebox which shows the TAN</param>
        /// <param name="anonymous"></param>
        /// <param name="flickerImage">(Out) reference to an image object that shall receive the FlickerCode as GIF image</param>
        /// <param name="flickerWidth">Width of the flicker code</param>
        /// <param name="flickerHeight">Height of the flicker code</param>
        /// <param name="renderFlickerCodeAsGif">Renders flicker code as GIF, if 'true'</param>
        /// <returns>
        /// Bank return codes
        /// </returns>
        public static string Transfer(ConnectionDetails connectionDetails, string receiverName, string receiverIBAN, string receiverBIC,
                                      decimal amount, string purpose, string HIRMS, PictureBox pictureBox, bool anonymous, out Image flickerImage, int flickerWidth = 320, int flickerHeight = 120, bool renderFlickerCodeAsGif = false)
        {
            flickerImage = null;
            if (Transaction.INI(connectionDetails, anonymous) == true)
            {
                TransactionConsole.Output = string.Empty;

                if (!String.IsNullOrEmpty(HIRMS))
                {
                    Segment.HIRMS = HIRMS;
                }

                var BankCode = Transaction.HKCCS(connectionDetails, receiverName, receiverIBAN, receiverBIC, amount, purpose);

                if (BankCode.Contains("+0030::"))
                {
                    // Gif image instead of picture box
                    Helper.Parse_BankCode(BankCode, pictureBox, out flickerImage, flickerWidth, flickerHeight, renderFlickerCodeAsGif);

                    return("OK");
                }
                else
                {
                    var msg = Helper.Parse_BankCode_Error(BankCode);

                    Log.Write(msg);

                    return(msg);
                }
            }
            else
            {
                return("Error");
            }
        }