定制 flux-se/sylius-hcaptcha-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

flux-se/sylius-hcaptcha-plugin

最新稳定版本:v1.0.2

Composer 安装命令:

composer require flux-se/sylius-hcaptcha-plugin

包简介

Plugin adding the hCaptcha field to some frontend FormType of Sylius

README 文档

README

Latest Version on Packagist Software License Build Status

Sylius Plugin adding hCaptcha integration

This plugin is adding hCaptcha to the following forms :

  • Contact form
  • Registration form

But an abstract class is available to add the captcha field to any other Form\Extension

Installation

composer require flux-se/sylius-hcaptcha-plugin symfony/http-client nyholm/psr7

Configuration

Enable this plugin :

<?php

# config/bundles.php

return [
    // ...
    FluxSE\SyliusHCaptchaPlugin\FluxSESyliusHCaptchaPlugin::class => ['all' => true],
    // ...
];

Import global configuration, by creating a new file config/packages/fluxse_sylius_hcaptcha.yaml :

imports:
  - { resource: "@FluxSESyliusHCaptchaPlugin/config/config.yaml" } 

Meteo Concept hCaptcha Bundle configuration

This plugin is using the meteo-concept/hcaptcha-bundle to handle the validation of the hCaptcha, so a little configuration have to be made. Add or modify the meteo-concept/hcaptcha-bundle configuration :

# config/packages/meteo_concept_hcaptcha.yaml

meteo_concept_h_captcha:
  hcaptcha:
    site_key: '%env(resolve:HCAPTCHA_SITE_KEY)%'
    secret: '%env(resolve:HCAPTCHA_SECRET)%'
  validation: 'strict'

Finally, add your site key and secret to your .env.local file :

###> meteo-concept/hcaptcha-bundle ###
HCAPTCHA_SITE_KEY=10000000-ffff-ffff-ffff-000000000001
HCAPTCHA_SECRET=0x0000000000000000000000000000000000000000
###< meteo-concept/hcaptcha-bundle ###

统计信息

  • 总下载量: 4.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-16