public function build($msg) { parent::build($msg); if ($this->xml) { $this->ScanType = $this->ScanCodeInfo->ScanType; $this->ScanResult = $this->ScanCodeInfo->ScanResult; } }
sort($tmpArr, SORT_STRING); $tmpStr = implode($tmpArr); $tmpStr = sha1($tmpStr); if ($tmpStr == $signature) { echo $echostr; } } die; } //微信通知处理 $from_xml = @$GLOBALS["HTTP_RAW_POST_DATA"]; $msg_sign = $_GET["msg_signature"]; $timeStamp = $_GET["timestamp"]; $nonce = $_GET["nonce"]; if (YDWX_WEIXIN_COMPONENT_APP_ID) { $crypt = new WXBizMsgCrypt(YDWX_WEIXIN_COMPONENT_TOKEN, YDWX_WEIXIN_COMPONENT_ENCODING_AES_KEY, YDWX_WEIXIN_COMPONENT_APP_ID); } else { $crypt = new WXBizMsgCrypt(YDWX_WEIXIN_TOKEN, YDWX_WEIXIN_ENCODING_AES_KEY, YDWX_WEIXIN_APP_ID); } $msg = ''; $errCode = $crypt->decryptMsg($msg_sign, $timeStamp, $nonce, $from_xml, $msg); if (!$msg) { die("success"); } YDWXHook::do_hook(YDWXHook::YDWX_LOG, $msg . $APPID); //微信事件指派 $wxevent = YDWXEvent::CreateEventMsg($msg); if (@$APPID) { $wxevent->APPID = $APPID; } YDWXHook::do_hook($wxevent->HookName(), $wxevent);