客服消息推送配置:Token校验失败,请检查确认?
public function automaticRecovery(Request $request) {
$timestamp = $request ->param( 'timestamp' ); $nonce = $request ->param( 'nonce' ); $echostr = $request ->param( 'echostr' ); $token = TOKEN; $tmpArr = array ( $token , $timestamp , $nonce ); sort( $tmpArr , SORT_STRING); $tmpStr = implode( $tmpArr ); $tmpStr = sha1( $tmpStr ); if ( $tmpStr == $signature ) { echo $echostr ; exit;
|
[signature]:0c777946cdb3c5a285d71e2800eec14d66b73aeb
[timestamp]:1569317661
[nonce]:639796845
[tmpStr]:0c777946cdb3c5a285d71e2800eec14d66b73aeb
微信请求正常,代码执行正常。返回数据无法验证!