public async Task <ActionResult> Checkout(CheckOutViewModel model) { if (!ModelState.IsValid) { return(View(model)); } var result = await _services.CheckoutAsync(model); if (result.Succeeded) { TempData["transactionId"] = result.TransactionId; return(RedirectToAction("Complete")); } ModelState.AddModelError(String.Empty, result.Message); return(View(model)); }