Пример #1
0
        public ActionResult PayWithCreditCard(PaymentWithCreditCardViewModel vm)
        {
            if (ModelState.IsValid)
            {
                Payment payment = null;
                if (Request.QueryString["order[amount]"] != null && Request.QueryString["order[description]"] != null)
                {
                    vm.Amount = Request.QueryString["order[amount]"];
                    vm.Description = Request.QueryString["order[description]"];
                    payment = CreatePaymentCreditCard();
                }
                string dredirectUrl = "Index";
                if (payment != null)
                {
                    var pymntID = payment.id;
                    var state = payment.state;

                    dredirectUrl = "About";
                }
                return new RedirectResult(dredirectUrl);
            }
            else
            {
                return View(vm);
            }
        }
Пример #2
0
        public ActionResult PayWithCreditCard()
        {
            var vm = new PaymentWithCreditCardViewModel();
            if (Request.QueryString["order[amount]"] != null && Request.QueryString["order[description]"] != null)
            {
                vm.Amount = Request.QueryString["order[amount]"];
                vm.Description = Request.QueryString["order[description]"];

            }
            vm.PaymentType = "credit_card";
            return View(vm);
        }