Skip to content

Commit

Permalink
Update CurlRequestClient.php
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanDaDeng authored Aug 12, 2019
1 parent 5386074 commit 42e8fe0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core/CurlRequestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace TimeHunter\LaravelGoogleReCaptchaV3\Core;

use TimeHunter\LaravelGoogleReCaptchaV3\Interfaces\RequestClientInterface;
use Illuminate\Support\Facades\Lang;

class CurlRequestClient implements RequestClientInterface
{
Expand All @@ -25,7 +26,7 @@ public function post($url, $body, $options = [])
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

if (false === $response) {
return '{"success": false, "error-codes": ["Curl Error Code: '.GoogleReCaptchaV3Response::ERROR_TIMEOUT.'"]}';
return '{"success": false, "error-codes": ["Curl Error Code: '.Lang::get(GoogleReCaptchaV3Response::ERROR_TIMEOUT).'"]}';
}

if ($httpCode !== 200) {
Expand Down

0 comments on commit 42e8fe0

Please sign in to comment.