title: ReCaptcha returning null values randomly when calling siteverify
body: <p>I have two php files, the first has a form that gathers payment data then posts to the other file to format a SOAP call to send the payment information to the payment service.  The reCaptcha is called in the first file and the returned token is passed to the second file in the post where I call the Google siteverify funtion.</p>
  
  <p>Before processing the payment, I check for the value of success to equal true and for the score to meet my threshold.</p>
  
  <p>For some reason, it will fail some legitimate users, most pass successfully. When they retry, they are successful.</p>
  
  <p>Is this common? Are there any techniques I should consider to avoid this or to make it more seamless to the user?</p>
  
  <p>Verified that this was due to return of nulls not and issue with returning FALSE or a score issue.</p>
  
  <p>Initial file with payment form</p>
  
  <p>….</p>
  
  <pre><code>
      &lt;script&gt;
      grecaptcha.ready(function() {
          console.log("function");
          grecaptcha.execute('************************', {action: 'usaepayform'}).then(function(token) {
             console.log(token);
             document.getElementById("token").value = token;
          });
      });
    &lt;/script&gt;
  
  ……
  &lt;form id="epayform" name="epayform" action="./transaction_soap.php" method="POST" autocomplete="off"&gt;
  
  ….
  &lt;input type="hidden" id="token" name="token"&gt;
  
  &lt;/form&gt;
  
                              &lt;input type="button" id="submitbutton" name="submitbutton" data-plus-as-tab="false" value="Process Payment &amp;gt;&amp;gt;"&gt;
  </code></pre>
  
  <p>…..</p>
  
  <hr>
  
  <p>then in transaction_soap.php</p>
  
  <pre><code>       $tokenn = $_POST['token'];
         $ip = $_SERVER['REMOTE_ADDR'];
  
  
  
  if(isset($_POST["TotalAmount"])) {
  
  
  
     $url = "https://www.google.com/recaptcha/api/siteverify";
     $data = array(
                 'secret' =&gt; "##################",
                 'response' =&gt; $_POST['token'],
                 'remoteip' =&gt; $ip
                 );
  
  $verify = curl_init();
  curl_setopt($verify,   CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify");
  curl_setopt($verify, CURLOPT_POST, true);
  curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
  curl_setopt($verify, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
  $res = curl_exec($verify);
  $responseKeys = json_decode($res, true);
  
  
  
  
     //get response along side with all results
  
     if($responseKeys['success'] == true) {
  
  
  
           if ($responseKeys['score'] &gt;= 0.3){
  ……...
  
      } else {
      echo "Recaptcha Score Not Met";
      }
     } else {
      echo "Recaptcha not successfully validated. Please, try again before reporting as an error.";
  
     }
     }```
  
  
  
  I would expect a return of true from real uesers.
  </code></pre>