Skip to content

Commit

Permalink
Merge pull request #17 from phuclh/master
Browse files Browse the repository at this point in the history
Fix the namespace of RuntimeException
  • Loading branch information
Scyllaly authored Oct 21, 2023
2 parents 4f37913 + 8c3e07b commit 741e0c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/HCaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Scyllaly\HCaptcha;

use http\Exception\RuntimeException;
use Symfony\Component\HttpFoundation\Request;
use GuzzleHttp\Client;

Expand Down Expand Up @@ -145,7 +144,7 @@ public function verifyResponse($response, $clientIp = null)
$isScoreVerificationEnabled = config('HCaptcha.score_verification_enabled', false);

if ($isScoreVerificationEnabled && !array_key_exists('score', $verifyResponse)) {
throw new RuntimeException('Score Verification is an exclusive Enterprise feature! Moreover, make sure you are sending the remoteip in your request payload!');
throw new \RuntimeException('Score Verification is an exclusive Enterprise feature! Moreover, make sure you are sending the remoteip in your request payload!');
}

if ($isScoreVerificationEnabled && $verifyResponse['score'] > config('HCaptcha.score_threshold', 0.7)) {
Expand Down

0 comments on commit 741e0c0

Please sign in to comment.