Cómo habilitar el modo de devolución de llamada en PHP para el desarrollo de microsoftware empresarial
include_once?"WXBizMsgCrypt.php";
$qy=?new?Qy_wechat();
$qy-gt;test1( );
$qy-gt;valid();
$qy-gt;valid();
clase?Qy_wechat{
¿privado? $token;
privado?$encodingAesKey;
privado?$corpId;
función?__construct()
{
$this-gt;token='heTIurA65In';
$this-gt;encodingAesKey='k8UmbddUc83SC3sGEyafepiycJNBj6Iw0JGXmkp1weh';
$this-gt;corpId='WW4e37698eeb6f73c5' ;
}
public?function?valid(){
$sVerifyMsgSig?=$_GET["msg_signature"];
$sVerifyTimeStamp?=$_GET["marca de tiempo"];
$sVerifyNonce?=?$_GET["nonce"];
$sVerifyEchoStr?=?$_GET["echostr" ];//?Texto sin formato que se devolverá
$wxcpt?=?new?WXBizMsgCrypt($this-gt; token,?$this-gt;encodingAesKey,?$this-gt;corpId);
$errCode?=?$wxcpt?-gt;?VerifyURL($sVerifyMsgSig,?$sVerifyTimeStamp,?$sVerifyNonce,?$sVerifyEchoStr,?$sEchoStr);
If ( $errCode?==?0)?{
//
/?Verifique la URL correctamente, devuelva sEchoStr
echo?$sEchoStr;
} else?{
print("ERR:?" ?..? $errCode?..?"\n\n");
}
}
}
}
}
}