Exemplo n.º 1
0
        public void NotifyAboutPayment(string yvok, string vergitipi, string mebleg, string receiptNumber, DateTime paydate)
        {
            //var soapRequest = TraceExtension.XmlRequest.OuterXml;
            //System.IO.File.AppendAllText(Settings.Default.LogFileDirectory + "log" + DateTime.Now.ToString() + ".txt", "Request : " + DateTime.Now + soapRequest + Environment.NewLine);

            //SqlConnection sqlcon = new SqlConnection();
            string TaxpayerID;

            //try
            //{
            //sqlcon.ConnectionString = SQLConnectionstring;
            //sqlcon.Open();
            TaxpayerID = klas.getdatacell(@"select TaxpayerID from Taxpayer where YVOK=N'" + yvok + "'");
            if (TaxpayerID != null && TaxpayerID != "")
            {
                municipal.InserTaxes(TaxpayerID, vergitipi, mebleg, receiptNumber, paydate);
            }
            //}
            //catch (Exception ex)
            //{
            //    throw ;
            //}


            //sqlcon.Close();

            //var soapResponse = TraceExtension.XmlResponse.OuterXml;
            //System.IO.File.AppendAllText(Settings.Default.LogFileDirectory + "log" + DateTime.Now.ToString() + ".txt",
            //    "INFO : " + DateTime.Now + soapResponse + Environment.NewLine);

            return;
        }
Exemplo n.º 2
0
    public bool SendPayForInsert(string OdeyiciID, string VergiTipi, string Mebleg, string passwordbld)
    {
        MethotAll municipal = new MethotAll();

        try
        {
            if (passwordbld == "=Bld2016dlB+")
            {
                municipal.InserTaxes(OdeyiciID, VergiTipi, Mebleg);
                return(true);
            }
            else
            {
                return(false);
            }
        }
        catch
        {
            return(false);
        }
    }
Exemplo n.º 3
0
        public void NotifyAboutPayment(onlinePaymentResultRequest OnlinePaymentResultRequest)
        {
            //var soapRequest = TraceExtension.XmlRequest.OuterXml;
            //System.IO.File.AppendAllText(Settings.Default.LogFileDirectory + "log" + DateTime.Now.ToString() + ".txt", "Request : " + DateTime.Now + soapRequest + Environment.NewLine);

            //SqlConnection sqlcon = new SqlConnection();
            string TaxpayerID;

            try
            {
                //sqlcon.ConnectionString = SQLConnectionstring;
                //sqlcon.Open();
                TaxpayerID = klas.getdatacell(@"select TaxpayerID from Taxpayer 
where YVOK=N'" + OnlinePaymentResultRequest.serviceAccount.abonCode + "' and Fordelete=1");
            }
            catch (Exception ex)
            {
                System.IO.File.AppendAllText(Settings.Default.LogFileDirectory + "log" + DateTime.Now.ToString("yyyyMMdd") + ".txt",
                                             DateTimeOffset.Now.ToString("yyyy-MM-ddTHH:mm:sszzz") + " - yvok=" + OnlinePaymentResultRequest.serviceAccount.abonCode + ",Error notify TaxpayerID tapilmadi : " + ex.Message.ToString() + Environment.NewLine);
                errorType ert = new errorType();
                ert.errorCode       = errorCode.SYSTEM_ERROR;
                ert.errorDateTime   = DateTime.Now;
                ert.errorData       = new object[1];
                ert.errorData[0]    = OnlinePaymentResultRequest.serviceAccount.scCode;
                ert.errorObjectType = objectType.SYSTEM;
                CustomSOAPException myexp = new CustomSOAPException("NotifyAboutPayment", ert);
                throw myexp;
            }



            try
            {
                for (int i = 0; i < OnlinePaymentResultRequest.paymentList.Length; i++)
                {
                    municipal.InserTaxes(TaxpayerID,
                                         OnlinePaymentResultRequest.paymentList[i].serviceCode.ToString(),
                                         OnlinePaymentResultRequest.paymentList[i].amount.ToString(),
                                         OnlinePaymentResultRequest.paymentList[i].receiptNumber);
                }
            }
            catch (Exception ex)
            {
                System.IO.File.AppendAllText(Settings.Default.LogFileDirectory + "log" + DateTime.Now.ToString("yyyyMMdd") + ".txt",
                                             DateTimeOffset.Now.ToString("yyyy-MM-ddTHH:mm:sszzz") + " tapayerid=" + TaxpayerID +
                                             " yvok=" + OnlinePaymentResultRequest.serviceAccount.abonCode +
                                             " - NotifyAboutPayment Error : " + ex.Message.ToString() + Environment.NewLine);
                errorType ert = new errorType();
                ert.errorCode       = errorCode.SYSTEM_ERROR;
                ert.errorDateTime   = DateTime.Now;
                ert.errorData       = new object[1];
                ert.errorData[0]    = messageHeaderValue.receiverID;
                ert.errorObjectType = objectType.SYSTEM;
                CustomSOAPException myexp = new CustomSOAPException("NotifyAboutPayment", ert, "Ödəniş keçmədi!");
                throw myexp;
            }


            //sqlcon.Close();

            //var soapResponse = TraceExtension.XmlResponse.OuterXml;
            //System.IO.File.AppendAllText(Settings.Default.LogFileDirectory + "log" + DateTime.Now.ToString() + ".txt",
            //    "INFO : " + DateTime.Now + soapResponse + Environment.NewLine);

            return;
        }