Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update frc-sdk header #4

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading