Fix recaptcha api request (#891)

This commit is contained in:
RainLoop Team 2017-04-15 23:54:56 +03:00
parent 18b39315e7
commit 509f81d2c8
2 changed files with 152 additions and 149 deletions

View file

@ -1 +1 @@
2.1
2.2

View file

@ -85,10 +85,13 @@ class RecaptchaPlugin extends \RainLoop\Plugins\AbstractPlugin
{
$bResult = false;
$sResult = $this->Manager()->Actions()->Http()->GetUrlAsString(
'https://www.google.com/recaptcha/api/siteverify?secret='.
\urlencode($this->Config()->Get('plugin', 'private_key', '')).'&response='.
\urlencode($this->Manager()->Actions()->GetActionParam('RecaptchaResponse', '')));
$sResult = $this->Manager()->Actions()->Http()->SendPostRequest(
'https://www.google.com/recaptcha/api/siteverify',
array(
'secret' => $this->Config()->Get('plugin', 'private_key', ''),
'response' => $this->Manager()->Actions()->GetActionParam('RecaptchaResponse', '')
)
);
if ($sResult)
{