public ActionResult EmptyCart() { carthelper.EmptyCart(); return(RedirectToAction("Index", "Home")); }
//public ActionResult Confirm(int id) //{ // var order = db.Orders.Find(id); // return View(order); //} public async Task <ActionResult> Pay(int id) { var order = db.Orders.Find(id); order.IsPaid = true; db.SaveChanges(); carthelper.EmptyCart(); await emailhelper.EmailtoAdmin(order); await emailhelper.EmailtoBuyer(order); return(View(order)); }