o3-shop/google-recaptcha-module
Composer 安装命令:
composer require o3-shop/google-recaptcha-module
包简介
Google reCAPTCHA v2/v3 provider for the O3-Shop core CAPTCHA layer
README 文档
README
Google reCAPTCHA v2 (checkbox) and v3 (invisible/score) providers for the O3-Shop core CAPTCHA layer.
The module ships no controllers, templates or blocks of its own — the storefront
widget rendering and the admin CAPTCHA configuration screen already live in the
O3-Shop core. This module only contributes two CAPTCHA providers, which plug
into the core via the oxid.captcha.provider DI tag. Once activated, the two
Google providers appear in Admin → CAPTCHA and can be configured there.
Requirements
- PHP 8.0+ (the module depends on
google/recaptcha, which requiresphp >= 8) - O3-Shop with the core pluggable CAPTCHA layer (
CaptchaProviderInterface+ theoxid.captcha.providertag)
Install
composer require o3-shop/google-recaptcha-module
This pulls in google/recaptcha and copies the module into
source/modules/o3-shop/google-recaptcha.
Activate
./vendor/bin/oe-console oe:module:activate google-recaptcha
(or activate it from the admin module list).
On activation, the core's CaptchaProviderLocator collects every service tagged
oxid.captcha.provider — including this module's two providers — so they become
selectable immediately. No further wiring is required.
Configure
In Admin → CAPTCHA:
- Select Google reCAPTCHA v2 (checkbox) or Google reCAPTCHA v3 (invisible/score) as the active provider.
- Enter your Site key and Secret key (from the Google reCAPTCHA admin console).
- For v3, optionally set the Minimum score to pass (0.0–1.0) (default
0.5).
How it works
| Class | Role |
|---|---|
O3Shop\ReCaptcha\Provider\GoogleReCaptchaV2Provider |
v2 checkbox provider (google_recaptcha_v2) |
O3Shop\ReCaptcha\Provider\GoogleReCaptchaV3Provider |
v3 invisible/score provider (google_recaptcha_v3) |
O3Shop\ReCaptcha\Verifier\GoogleReCaptchaVerifier |
server-side token verification via google/recaptcha |
O3Shop\ReCaptcha\Verifier\VerificationResult |
immutable verification outcome (success/score/action/errors) |
The providers read their credentials through the core
CaptchaConfigurationInterface (keys namespaced as sCaptcha_<providerId>_<fieldKey>)
and delegate verification to the module's CaptchaVerifierInterface.
License
GPL-3.0
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2026-07-01