public async Task <IActionResult> Index(ContactViewModel contactViewModel, [FromServices] IRecaptchaService recaptchaService) { var isRecaptchaSuccessful = await recaptchaService.ReCaptchaPassed(Request.Form["g-recaptcha-response"]); if (!isRecaptchaSuccessful) { Response.StatusCode = 403; return(View(contactViewModel)); } return(View(contactViewModel)); }