-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
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
服务器token验证 #32
Comments
public function serve()
{
Log::info('request arrived.');
$server = app('wechat')->server;
$server->setMessageHandler(function($message){
return "欢迎关注 overtrue!";
});
Log::info('return response.');
return $server->serve();
} 然后看日志。 |
感谢!原来是routes.php的<?php前面多了个空格,谢谢! |
我的也是这个问题,日志 是这样的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我的控制器:
public function serve()
{
Log::info('request arrived.'); # 注意:Log 为 Laravel 组件,所以它记的日志去 Laravel 日志看,而不是 EasyWeChat 日志
$wechat = app('wechat');
//return $wechat;
app('wechat')->server->setMessageHandler(function($message){
return "欢迎关注 overtrue!";
});
Log::info('return response.');
return app('wechat')->server->serve();
}
我的route:Route::any('/weixin', 'WeixinController@serve');
我的middle:
protected $except = [
'weixin',
];
我的报告:BadRequestException in Guard.php line 317:
Invalid request.
我的日记:所有参数key,id等传输正确
腾讯验证:token验证错误
The text was updated successfully, but these errors were encountered: