flux-se / sylius-hcaptcha-plugin
Plugin adding the hCaptcha field to some frontend FormType of Sylius
Installs: 2 484
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- meteo-concept/hcaptcha-bundle: ^2|^3
- sylius/sylius: ^1.4
Requires (Dev)
- behat/behat: ^3.7
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- friendsofsymfony/oauth-server-bundle: ^1.6 || >2.0.0-alpha.0 ^2.0@dev
- matthiasnoback/symfony-config-test: ^4.1
- nyholm/psr7: ^1.4
- phpspec/phpspec: ^7.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-doctrine: ^0.12.33
- phpstan/phpstan-strict-rules: ^0.12.0
- phpstan/phpstan-webmozart-assert: ^0.12.12
- phpunit/phpunit: ^9.5
- sylius-labs/coding-standard: ^4.1.1
- symfony/browser-kit: ^4.4 || ^5.2
- symfony/debug-bundle: ^4.4 || ^5.2
- symfony/dotenv: ^4.4 || ^5.2
- symfony/http-client: ^4.4 || ^5.2
- symfony/intl: ^4.4 || ^5.2
- symfony/web-profiler-bundle: ^4.4 || ^5.2
- vimeo/psalm: ^4.6.4
Suggests
- nyholm/psr7: A library that implements PSR-7 HTTP client interface
- symfony/http-client: A Symfony component that implements PSR-18 HTTP client interface
This package is auto-updated.
Last update: 2024-04-20 18:23:39 UTC
README
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], // ... ];
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 ###