Javascript recaptcha Google的流星问题:verifyCaptcha不是一个功能
我使用一个包(appshore:recaptcha)来使用Google recaptcha系统,但我在使用它时遇到了问题。我有一个错误说,Javascript recaptcha Google的流星问题:verifyCaptcha不是一个功能,javascript,meteor,recaptcha,Javascript,Meteor,Recaptcha,我使用一个包(appshore:recaptcha)来使用Google recaptcha系统,但我在使用它时遇到了问题。我有一个错误说,verifyCaptcha不是一个函数 我从客户端调用我的方法: //get the captcha data var captchaData = $('#g-recaptcha-response').val(); var resultCaptcha = Utils.captchaCheck(captchaData); 我在服务器端的Utils部分定义了它
verifyCaptcha不是一个函数
我从客户端调用我的方法:
//get the captcha data
var captchaData = $('#g-recaptcha-response').val();
var resultCaptcha = Utils.captchaCheck(captchaData);
我在服务器端的Utils部分定义了它:
captchaCheck: function (captchaData) {
var ip = "0.0.0.0";
if(Meteor.isServer) {
if(!this.connection.clientAddress)
throw new Meteor.Error(403, "Server Error: You must be connected.");
else
ip = this.connection.clientAddress;
}
var verifyCaptchaResponse = reCAPTCHA.verifyCaptcha(ip, captchaData);
if (!verifyCaptchaResponse.success) {
throw new Meteor.Error('422', 'reCAPTCHA Failed: ' + verifyCaptchaResponse.error);
}
else {
return true;
}
}
但是当我提交我的表格时,我有上面提到的错误…你验证过你的
reCAPTCHA
对象有那个方法吗?是的,对象有这个方法,我遵循包的文档…你验证过你的reCAPTCHA
对象有那个方法吗?是的,对象有这个方法,我遵循包的文档。。。