发新话题
打印

开始代开发应用配置开发信息验证CallBackUrl失败?

开始代开发应用配置开发信息验证CallBackUrl失败?

$receiveid 换成代开发企业的id
$receiveid = "ww4e0f0e1fa2dca2e8";   //corpid
$wxcpt = new WXBizMsgCrypt($token, $encodingAesKey, $receiveid);

// get the paramters
$sVerifyMsgSig = $_GET['msg_signature'];
$sVerifyTimeStamp = $_GET['timestamp'];
$sVerifyNonce = $_GET['nonce'];
$sVerifyEchoStr = $_GET['echostr'];

$sEchoStr = "";
// call verify function
$errCode = $wxcpt->VerifyURL($sVerifyMsgSig, $sVerifyTimeStamp, $sVerifyNonce, $sVerifyEchoStr, $sEchoStr);
if ($errCode == 0) {
echo $sEchoStr . "\n";
} else {
print("ERR: " . $errCode . "\n\n");
}


GitHub中PHP加解密项目中的pkcs7Encoder.php文件中有个业务逻辑在服务商代开发中的判断是属于多余的,去掉即可。
if ($from_receiveId != $receiveId) {
        //return array(ErrorCode::$ValidateCorpidError, null);   //服务商代开发中的判断是属于多余的
}

TOP

发新话题