public ActionResult GetDataPaypal() { var getData = new GetDataPaypal(); var order = getData.InformationOrder(getData.GetPayPalResponse(Request.QueryString["tx"])); ViewBag.tx = Request.QueryString["tx"]; return(View()); }
public ActionResult GetDataPaypal() { var getData = new GetDataPaypal(); var order = getData.InformationOrder(getData.GetPayPalResponse(Request.QueryString["tx"])); ViewBag.tx = Request.QueryString["tx"]; Credit cr = new Credit(); cr.CreditMoney = 50; db.credit.Add(cr); db.SaveChanges(); return(View()); }
//retrieve data and save in database public ActionResult GetDataPaypal() { var getData = new GetDataPaypal(); var order = getData.InformationOrder(getData.GetPayPalResponse(Request.QueryString["tx"])); ViewBag.tx = Request.QueryString["tx"]; var payment = new Payment(); payment.Amount = order.GrossTotal; payment.Date = DateTime.Now; payment.EventId = 1; db.Payments.Add(payment); db.SaveChanges(); Session["cart"] = null; return(View(order)); }