Example #1
0
        public ActionResult PayBankTransfer(int?approve)
        {
            if (approve.HasValue && approve.Value == 1)
            {
                BankTransferPayment p1 = new BankTransferPayment();
                p1.IsApproved  = false;
                p1.NameSurname = User.Identity.GetNameSurname();
                p1.TC          = User.Identity.GetTC();

                BankTransferService service = new BankTransferService();

                bool isPaid = service.MakePayment(p1);


                if (isPaid)
                {
                    CreateOrder(isPaid);
                    ResetShoppingCart();
                }


                return(RedirectToAction("Index", "Home"));
            }

            return(RedirectToAction("Checkout"));
        }
Example #2
0
        protected override IPayment CreateConcretePayment()
        {
            IPayment product = new BankTransferPayment();

            // Here is the place for some additional object creation logic.
            return(product);
        }