Ejemplo n.º 1
0
 public static void UpdatePaymentStatus(string TranID, string ErrorDesc, String status, String payuMoneyID, string mode, string ID)
 {
     try
     {
         string sqlconn = ConfigurationManager.ConnectionStrings["DBCONN"].ConnectionString;
         string query   = "update tbl_Payment_info set TranId = '" + TranID + "', payUMoneyId = '" + payuMoneyID + "', Status = '" + status + "', Mode = '" + mode + "', ErrorMsg = '" + ErrorDesc + "' where ID = '" + ID + "'";
         SqlHelper.ExecuteNonQuery(sqlconn, CommandType.Text, query);
     }
     catch (Exception ex)
     {
         ExceptionHandling.WriteException(ex);
         throw;
     }
 }
Ejemplo n.º 2
0
 public static void SendEmail(string mailBodyHtml, string mailSubject, string toMail)
 {
     try
     {
         var mail = new MailMessage(ConfigurationManager.AppSettings["FromMail"], ConfigurationManager.AppSettings["ToMail"], mailSubject, mailBodyHtml);
         mail.To.Add(toMail);
         mail.IsBodyHtml = true;
         var smtpClient = new SmtpClient("smtp.gmail.com", 587); //if your from email address is "*****@*****.**" then host should be "smtp.hotmail.com"**
         smtpClient.UseDefaultCredentials = true;
         smtpClient.Credentials           = new NetworkCredential("*****@*****.**", "Terex@2018");
         mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess | DeliveryNotificationOptions.OnFailure;
         mail.Priority        = MailPriority.Normal;
         smtpClient.EnableSsl = true;
         smtpClient.Send(mail);
     }
     catch (Exception ex)
     {
         ExceptionHandling.WriteException(ex);
     }
 }
Ejemplo n.º 3
0
 public static int SavePaymentOut(string amount, string firstname, string email, string phone, string productinfo)
 {
     try
     {
         string         sqlconn      = ConfigurationManager.ConnectionStrings["DBCONN"].ConnectionString;
         SqlParameter[] sqlParameter = new SqlParameter[5];
         sqlParameter[0]           = new SqlParameter("@Amount", amount);
         sqlParameter[1]           = new SqlParameter("@Name", firstname);
         sqlParameter[2]           = new SqlParameter("@Email", email);
         sqlParameter[3]           = new SqlParameter("@Phone", phone);
         sqlParameter[4]           = new SqlParameter("@ID", SqlDbType.Int);
         sqlParameter[4].Direction = ParameterDirection.Output;
         SqlHelper.ExecuteNonQuery(sqlconn, CommandType.StoredProcedure, "sp_Insert_Payment_Info", sqlParameter);
         int identity = Convert.ToInt32(sqlParameter[4].Value);
         return(identity);
     }
     catch (Exception ex)
     {
         ExceptionHandling.WriteException(ex);
         return(-1);
     }
 }