diff --git a/webapp/controller/KefuController.class.php b/webapp/controller/KefuController.class.php index dda56bc..e42d80c 100644 --- a/webapp/controller/KefuController.class.php +++ b/webapp/controller/KefuController.class.php @@ -464,15 +464,13 @@ class KefuController { private function responseMsg() { $postStr_key = $GLOBALS["HTTP_RAW_POST_DATA"]; - $pc = new WXBizMsgCrypt(WEIXIN_TOKEN, WEIXIN_MSG_KEY, WEIXIN_APP_ID); $gameid = $_REQUEST['gameid']; - - $msg = ''; $msg_sign = $_REQUEST['msg_signature']; $timeStamp = $_REQUEST['timestamp']; $nonce = $_REQUEST['nonce']; + + $pc = new WXBizMsgCrypt(WEIXIN_TOKEN, WEIXIN_MSG_KEY, WEIXIN_APP_ID); $errcode = $pc->decryptJsonMsg($msg_sign, $timeStamp, $nonce, $postStr_key, $postStr); - #error_log('#error_log:' . json_encode($errcode)); if ($errcode == 0) { #error_log("解密后: " . $postStr . "\n"); if (!empty( $postStr ) && is_string( $postStr )){