src/Eccube/Form/Validator/RecaptchaV3.php line 20

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Eccube\Form\Validator;
  13. /**
  14.  * @Annotation
  15.  * @Target({"PROPERTY", "METHOD", "ANNOTATION"})
  16.  */
  17. class RecaptchaV3 extends \Symfony\Component\Validator\Constraint
  18. {
  19.     const INVALID_SECRETKEY_ERROR '7d79c0ab-ddba-46cc-a703-a7a4b08de310';
  20.     const INVALID_SCORE_THRESHOLD_ERROR '7f447c1c-0266-4e10-9c6c-573df282e413';
  21.     const SCORE_ERROR '79819696-02ac-4a99-9ff0-14e127c4d1bc';
  22.     protected static $errorNames = [
  23.         self::INVALID_SECRETKEY_ERROR => 'INVALID_SECRETKEY_ERROR',
  24.         self::INVALID_SCORE_THRESHOLD_ERROR => 'INVALID_SCORE_THRESHOLD_ERROR',
  25.         self::SCORE_ERROR => 'SCORE_ERROR',
  26.     ];
  27.     private $secretkey;
  28.     private $score_threshold;
  29.     
  30.     public function getSecretkey()
  31.     {
  32.         return $this->secretkey;
  33.     }
  34.     
  35.     public function getScoreThreshold()
  36.     {
  37.         return $this->score_threshold;
  38.     }
  39.     
  40.     public function __construct($secretkey$score_threshold, array $groups null$payload null)
  41.     {
  42.         parent::__construct([], $groups$payload);
  43.         $this->secretkey $secretkey;
  44.         $this->score_threshold $score_threshold;
  45.     }
  46. }