Skip to content

Commit

Permalink
Update frc-sdk header (#4)
Browse files Browse the repository at this point in the history
* Update `frc-sdk` header

* Bump SDK version in example
  • Loading branch information
gzuidhof authored Oct 21, 2024
1 parent 9ec7315 commit 4c517a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/form/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
$siteverifyEndpoint = getenv('FRC_SITEVERIFY_ENDPOINT');
$widgetEndpoint = getenv('FRC_WIDGET_ENDPOINT');

const MODULE_SCRIPT_URL = "https://cdn.jsdelivr.net/npm/@friendlycaptcha/[email protected].7/site.min.js";
const NOMODULE_SCRIPT_URL = "https://cdn.jsdelivr.net/npm/@friendlycaptcha/[email protected].7/site.compat.min.js";; // Compatibility fallback for old browsers.
const MODULE_SCRIPT_URL = "https://cdn.jsdelivr.net/npm/@friendlycaptcha/[email protected].8/site.min.js";
const NOMODULE_SCRIPT_URL = "https://cdn.jsdelivr.net/npm/@friendlycaptcha/[email protected].8/site.compat.min.js";; // Compatibility fallback for old browsers.

if (empty($sitekey) || empty($apikey)) {
die("Please set the FRC_SITEKEY and FRC_APIKEY environment values before running this example.");
Expand Down
4 changes: 2 additions & 2 deletions src/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use FriendlyCaptcha\SDK\{ClientConfig, VerifyResult, ErrorCodes};

const VERSION = "0.1.0";
const VERSION = "0.1.1";
const EU_API_ENDPOINT = "https://eu.frcapi.com/api/v2/captcha/siteverify";
const GLOBAL_API_ENDPOINT = "https://global.frcapi.com/api/v2/captcha/siteverify";

Expand Down Expand Up @@ -76,7 +76,7 @@ public function verifyCaptchaResponse(?string $response): VerifyResult
'Content-Type: application/json',
'Content-Length: ' . strlen($payload),
'X-Api-Key: ' . $this->config->apiKey,
'X-Frc-Sdk: ' . 'friendly-captcha-php-sdk@' . VERSION
'Frc-Sdk: ' . 'friendly-captcha-php@' . VERSION
)
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
Expand Down

0 comments on commit 4c517a2

Please sign in to comment.