public function api_verify_captcha() { $response = new JSendResponse(); if (!($verified = $this->_verify($this->request))) { die('Failed to verify.'); } if ($this->request->data['entity'] === 'mail.security') { $response->success(['email' => '*****@*****.**']); } $this->render(array('type' => $this->request->accepts(), 'data' => $response->to('array'))); }