Cridem el codi de Google amb el header…
<script src='https://www.google.com/recaptcha/api.js'></script>
A la funció postProcess, hi afegim la validació (linies 54 i 55)…
$this->errors[] = Tools::displayError('Bad file extension');
} elseif (!($gcaptcha = (int)(Tools::getValue('g-recaptcha-response')))) {
$this->errors[] = Tools::displayError('Captcha no verificat');
} else {
$customer = $this->context->customer;
if (!$customer->id) {
$customer->getByEmail($from);
}
Posem el CAPTCHA a on convingui del formuari…
<div class="g-recaptcha" data-sitekey="CLAU_DE_GOOGLE"></div>