private function captchaResponse($response)
    {
        $errors = ['g-recaptcha-response' => ['Oops, something went wrong']];
        foreach ($response->getErrorCodes() as $k => $code) {
            if ($code == 'missing-input-response') {
                $code = 'Please confirm you are not a robot.';
            }
            $errors['g-recaptcha-response'][$k] = $code;
        }

        return new JsonResponse($errors, 422);
    }
private function captchaResponse($response)
    {
        $errors = ['g-recaptcha-response' => ['Oops, something went wrong']];
        foreach ($response->getErrorCodes() as $k => $code) {
            if ($code == 'missing-input-response') {
                $code = 'Please confirm you are not a robot.';
            }
            $errors['g-recaptcha-response'][$k] = $code;
        }

        return new JsonResponse($errors, 422);
    }
private function captchaResponse ( $ response ) { $ errors = [ 'g-recaptcha-response' => [ 'Oops, something went wrong' ] ] ; foreach ( $ response -> getErrorCodes ( ) as $ k => $ code ) { if ( $ code == 'missing-input-response' ) { $ code = 'Please confirm you are not a robot.' ; } $ errors [ 'g-recaptcha-response' ] [ $ k ] = $ code ; } return new JsonResponse ( $ errors , 422 ) ; }
Get the captcha json responses
@param $response
@return JsonResponse
Get the captcha json responses