在框架里面使用easywechat时候使用$response->send();微信无法获取到回调成功的提示该怎么处理嘞,微信一直在回调,每个订单都回调满次
public function wechatWebNotify(Request $request)
{
$config = [
'app_id' => ,
'mch_id' => ,
'key' => ,
];
$app = Factory::payment($config);
$symfony_request = new SymfonyRequest($request->get(), $request->post(), [], $request->cookie(), [], [], $request->rawBody());
$symfony_request->headers = new HeaderBag($request->header());
$app->rebind('request', $symfony_request);
$response = $app->handlePaidNotify(function ($message, $fail) {
// 业务逻辑
return true;
});
$response->send();
}
https://www.workerman.net/doc/webman/components/wechat.html
按照手册,
$response->send();
应该改成return $response->getContent();
吧可以了,谢谢