From 063ca919def57a025744146e482e09e7deccc0d7 Mon Sep 17 00:00:00 2001 From: Guido Zuidhof Date: Mon, 21 Oct 2024 16:22:07 +0200 Subject: [PATCH 1/2] Update `frc-sdk` header --- src/client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.php b/src/client.php index 6a4703b..e576939 100644 --- a/src/client.php +++ b/src/client.php @@ -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"; @@ -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); From c0158a780766b9a44567aed812bd8d9c81ae12ca Mon Sep 17 00:00:00 2001 From: Guido Zuidhof Date: Mon, 21 Oct 2024 16:26:06 +0200 Subject: [PATCH 2/2] Bump SDK version in example --- examples/form/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/form/index.php b/examples/form/index.php index 48809be..c74289f 100644 --- a/examples/form/index.php +++ b/examples/form/index.php @@ -13,8 +13,8 @@ $siteverifyEndpoint = getenv('FRC_SITEVERIFY_ENDPOINT'); $widgetEndpoint = getenv('FRC_WIDGET_ENDPOINT'); -const MODULE_SCRIPT_URL = "https://cdn.jsdelivr.net/npm/@friendlycaptcha/sdk@0.1.7/site.min.js"; -const NOMODULE_SCRIPT_URL = "https://cdn.jsdelivr.net/npm/@friendlycaptcha/sdk@0.1.7/site.compat.min.js";; // Compatibility fallback for old browsers. +const MODULE_SCRIPT_URL = "https://cdn.jsdelivr.net/npm/@friendlycaptcha/sdk@0.1.8/site.min.js"; +const NOMODULE_SCRIPT_URL = "https://cdn.jsdelivr.net/npm/@friendlycaptcha/sdk@0.1.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.");