<?php
include "../libs/weixin/WXBizMsgCrypt.php";
//---------------------------------------接口验证-----------------------------------------//
// 参数设置
$encodingAesKey = "2NakyiOvqqTIDW8GPUVnVxnCBO2mQIRsBQXuWsQWLCN";
$token = "iuk83T8ejUzJLmADW6C4";
$corpId = "wx661c1bed18ad67c4";
// 获取GET
$signature = $_GET['msg_signature'];
$timestamp = $_GET['timestamp'];
$nonce = $_GET['nonce'];
$echostr = $_GET['echostr'];
// 返回的明文
$returnString;
$wxcpt = new WXBizMsgCrypt($token, $encodingAesKey, $corpId);
$errCode = $wxcpt->VerifyURL($signature, $timestamp, $nonce, $echostr, $returnString);
if ($errCode == 0) {
echo $returnString;
} else {
echo "Weixin Connect Error Code: " . $errCode;
}
?>