Ejemplo n.º 1
0
        public async Task <ActionResult> Login(CheckoutMethodViewModel viewModel)
        {
            var result = await _applicationSignInManager.PasswordSignInAsync(viewModel.LoginViewModel.Email, viewModel.LoginViewModel.Password, true, true);

            switch (result)
            {
            case SignInStatus.Success:
                break;

            default:
                ModelState.AddModelError("LoginViewModel.Password", _localizationService.GetString("/Login/Form/Error/WrongPasswordOrEmail"));
                return(View("CheckoutMethod", viewModel));
            }

            return(RedirectToAction("Index", "Checkout"));
        }
Ejemplo n.º 2
0
        public ActionResult CheckoutMethod(CheckoutPage currentPage)
        {
            var viewModel = new CheckoutMethodViewModel(currentPage, _urlHelper.Action("Index", "Checkout"));

            return(View("CheckoutMethod", viewModel));
        }