`小程序` —> `客服消息` —> `接入指引`
我是按照官方给出的文档操作的, 其中 `checkSignature` 方法 返回为 `true`
然而我无法获取 `
$echoStr
=
$_GET
[
"echostr"
];
`的值请问是否我的代码或是操作有什么问题吗?
public function valid() {
exit ; } } public function checkSignature() { $signature = $_GET [ "signature" ]; $timestamp = $_GET [ "timestamp" ]; $nonce = $_GET [ "nonce" ]; $token = TOKEN; $tmpArr = array ( $token , $timestamp , $nonce ); sort( $tmpArr , SORT_STRING); $tmpStr = implode( $tmpArr ); $tmpStr = sha1( $tmpStr ); if ( $tmpStr == $signature ){ return true; } else { return false; } } |