We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 版本:5.6 7 overtrue/wechat 版本:3.2
开发平台代码里接受微信服务器推送的ticket或其他信息时报Invalid request signature bug 处理信息代码: $openPlatform->server->serve(); 在 serve方法里有个验证前面的方法validate public function validate($token) { $params = [ $token, $this->request->get('timestamp'), $this->request->get('nonce'), ]; if (!$this->debug && $this->request->get('signature') !== $this->signature($params)) { throw new FaultException('Invalid request signature.', 400); } } 参与签名的参数缺少 encrypt_type msg_signature 正确的是 public function validate($token) { $params = [ $token, $this->request->get('timestamp'), $this->request->get('nonce'), $this->request->get('encrypt_type'), $this->request->get('msg_signature'), ]; if (!$this->debug && $this->request->get('signature') !== $this->signature($params)) { throw new FaultException('Invalid request signature.', 400); } }
The text was updated successfully, but these errors were encountered:
请问这个问题后来怎么解决的?我碰到了同样的问题
Sorry, something went wrong.
这个问题我今天又遇到了。
No branches or pull requests
我用的环境
PHP 版本:5.6 7
overtrue/wechat 版本:3.2
问题及现象
开发平台代码里接受微信服务器推送的ticket或其他信息时报Invalid request signature bug
处理信息代码:
$openPlatform->server->serve();
在
serve方法里有个验证前面的方法validate
public function validate($token)
{
$params = [
$token,
$this->request->get('timestamp'),
$this->request->get('nonce'),
];
if (!$this->debug && $this->request->get('signature') !== $this->signature($params)) {
throw new FaultException('Invalid request signature.', 400);
}
}
参与签名的参数缺少
encrypt_type
msg_signature
正确的是
public function validate($token)
{
$params = [
$token,
$this->request->get('timestamp'),
$this->request->get('nonce'),
$this->request->get('encrypt_type'),
$this->request->get('msg_signature'),
];
if (!$this->debug && $this->request->get('signature') !== $this->signature($params)) {
throw new FaultException('Invalid request signature.', 400);
}
}
The text was updated successfully, but these errors were encountered: