Download the PHP package geekybones/fraud-defense-bundle without Composer

On this page you can find all versions of the php package geekybones/fraud-defense-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fraud-defense-bundle

Fraud Defense Bundle

Symfony integration for Google reCAPTCHA Enterprise with support for standard bot protection, Transaction Defense, and SMS toll-fraud Defense. By GeekyBones.

Package geekybones/fraud-defense-bundle
PHP ^8.2
Symfony ^7.0 or ^8.0
License MIT

Installation

If Symfony Flex did not register the bundle automatically, add it to config/bundles.php:


Google Cloud setup

  1. Enable the reCAPTCHA Enterprise API in your GCP project.
  2. Create one or more site keys for your domain (score key for invisible checks, checkbox key for the "I'm not a robot" widget).
  3. Create an API key restricted to the reCAPTCHA Enterprise API.

For Transaction Defense and SMS Defense, additional console steps are required — see their dedicated guides.


Configuration

Add environment variables:

Create config/packages/fraud_defense.yaml:

Standard reCAPTCHA (RecaptchaType) works with this minimal config. Enable transaction_defense or sms_defense only when you need those flows.

See configuration.md for all options.


Usage

Standard form protection

Validation runs automatically on form submit. No controller changes needed.

Programmatic

Inject the interface and call assess() directly — useful in APIs and controllers without forms:


Form types

Form type When to use Requires
RecaptchaType Login, registration, contact — bot detection Default config
TransactionRecaptchaType Checkout, payment — fraud risk scoring transaction_defense.enabled: true
SmsRecaptchaType SMS OTP — toll-fraud detection sms_defense.enabled: true

All three share the same Twig widget ({{ form_row(form.captcha) }}).


Documentation

Guide Contents
configuration.md All YAML options, environment variables, per-case examples
recaptcha.md Standard reCAPTCHA: form setup, script loading, programmatic usage
transaction-defense.md Transaction Defense: GCP setup, form, context reference, troubleshooting
sms-defense.md SMS Defense: GCP setup, form, programmatic usage
architecture.md Internal code structure and request flow

All versions of fraud-defense-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
google/cloud-recaptcha-enterprise Version ^2.0
psr/log Version ^3.0
symfony/config Version ^7.0|^8.0
symfony/dependency-injection Version ^7.0|^8.0
symfony/form Version ^7.0|^8.0
symfony/http-foundation Version ^7.0|^8.0
symfony/http-kernel Version ^7.0|^8.0
twig/twig Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package geekybones/fraud-defense-bundle contains the following files

Loading the files please wait ...