コード例 #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
ファイル: PaymentController.cs プロジェクト: nuyu/Zealous
        //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));
        }