$msg_signature = $_GET['msg_signature'];
$timestamp = $_GET['timestamp'];
$nonce = $_GET['nonce'];
$postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
$encrypt_type = $_GET['encrypt_type'];
if (!empty($postStr)) {
//如果是加密模式
if($encrypt_type == "aes"){
$wxcpt = new WXBizMsgCrypt(TOKEN, EncodingAESKey, AppID);
$sMsg = ""; //解析之后的明文
$errCode = $wxcpt->decryptMsg($msg_signature, $timestamp, $nonce, urlencode($postStr), $sMsg);
之前postStr没有urlencode时,decryptMsg函数没有返回值。现在加了urlencode,errCode为40001(不合法的调用凭证)。可是TOKEN、EncodingAESKey和AppID已经核对过了没有错。求助!