<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\CaptchaTecmz\Provider; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\View; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Response; use Module\Vendor\Provider\Captcha\AbstractCaptchaProvider; use Module\Vendor\Support\ResponseCodes; use Module\Vendor\Tecmz\TecmzUtil; class TecmzCaptchaProvider extends AbstractCaptchaProvider { public function name() { return 'tecmz'; } public function title() { return '魔众智能验证码'; } public function render() { return View::make('module::CaptchaTecmz.View.captcha', array('param' => $this->param)); } public function validate() { goto Ilial; d0zTL: $Tbn6c = TecmzUtil::instance('CaptchaTecmz_')->captchaValidate($z51ZF); goto ShObt; Ilial: $WZ8dY = InputPackage::buildFromInput(); goto b4GY1; TsZMU: if ($Tbn6c['code']) { return Response::generate(ResponseCodes::CAPTCHA_ERROR, '请重新进行安全验证'); } goto n9tba; eNkSP: if (empty($z51ZF)) { return Response::generate(-1, '请进行安全验证'); } goto d0zTL; ShObt: Log::info('TecmzCaptcha.Validate - ' . json_encode($Tbn6c, JSON_UNESCAPED_UNICODE)); goto TsZMU; b4GY1: $z51ZF = $WZ8dY->getTrimString('captchaKey'); goto eNkSP; n9tba: return Response::generateSuccess(); goto cfDO_; cfDO_: } }