public ActionResult VnResponse(VnPayResponse vnPayResponse) { var inforOrder = (InforOrder)Session["InforOrder"]; ViewBag.infor = inforOrder; ViewBag.phi = vnPayResponse; Pay pay = new Pay(); var user = (CheckUser)Session["Account"]; if (inforOrder.id_order != 0) { if (vnPayResponse.vnp_ResponseCode != "00") { return(RedirectToAction("HistoryDeal", "User")); } pay.UpdateOrder(vnPayResponse, inforOrder); } else { pay.AddOrder(vnPayResponse, user, inforOrder); } Session.Remove("InforOrder"); return(View(vnPayResponse)); }