getDto(); $expires = now()->addSeconds(config('captcha.waiting_for_captcha_verification_in_seconds')); $result = $this->captchaService->createKeyWithCaptcha($captchaPublicToken, $expires); if (!$result->isSuccess()) { return response()->json($result->getData())->setStatusCode($result->getCode()); } return response()->json(new Captcha($result)); } }