o3-shop/google-recaptcha-module 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 requires php >= 8)
  • O3-Shop with the core pluggable CAPTCHA layer (CaptchaProviderInterface + the oxid.captcha.provider tag)

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:

  1. Select Google reCAPTCHA v2 (checkbox) or Google reCAPTCHA v3 (invisible/score) as the active provider.
  2. Enter your Site key and Secret key (from the Google reCAPTCHA admin console).
  3. 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
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2026-07-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固