<?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 ModStart\Core\Util\SerializeUtil; 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 e1RX5; JT_cP: Log::info('TecmzCaptcha.Validate - ' . SerializeUtil::jsonEncode($rhLXE)); goto Y39Av; vxFVs: $rhLXE = TecmzUtil::instance('CaptchaTecmz_')->captchaValidate($NRefc); goto JT_cP; Y39Av: if ($rhLXE['code']) { return Response::generate(ResponseCodes::CAPTCHA_ERROR, '请重新进行安全验证'); } goto AlUuN; e1RX5: $Km8YS = InputPackage::buildFromInput(); goto lUPxg; a5u3r: if (empty($NRefc)) { return Response::generate(-1, '请进行安全验证'); } goto vxFVs; AlUuN: return Response::generateSuccess(); goto XPN_B; lUPxg: $NRefc = $Km8YS->getTrimString('captchaKey'); goto a5u3r; XPN_B: } }