RecaptchaHelper
in package
Class RecaptchaHelper
This class is used to validate the reCAPTCHA response from the user
Table of Contents
Methods
- validate() : mixed
- validateToken() : bool
- Validates the reCAPTCHA response with the given secret key
Methods
validate()
public
static validate(mixed $secretKey) : mixed
Parameters
- $secretKey : mixed
validateToken()
Validates the reCAPTCHA response with the given secret key
public
static validateToken(string $secretKey, mixed $recaptchaToken) : bool
Parameters
- $secretKey : string
-
The secret key to use for validation
- $recaptchaToken : mixed
Return values
bool —True if the validation is successful, False otherwise