示例#1
0
        public ActionResult GetDataPaypal()
        {
            var getData = new GetDataPaypal();
            var order   = getData.InformationOrder(getData.GetPayPalResponse(Request.QueryString["tx"]));

            ViewBag.tx = Request.QueryString["tx"];
            return(View());
        }
示例#2
0
        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());
        }
示例#3
0
        //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));
        }