ConfigEntity config = getBusiness().getConfigBusiness().getConfig();
ReCaptchaResponse recaptchaResponse = RecaptchaUtil.check(
config.getRecaptchaPublicKey(),
config.getRecaptchaPrivateKey(),
challenge, response, request);
ServiceResponse result = new ServiceResponse();
if (recaptchaResponse.isValid()) {
return send(name, params);
}
else {
result.setResult("error");
result.setMessage(recaptchaResponse.getErrorMessage());
}
return result;
}