微信支付回调问题

七点

在框架里面使用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();
    }
1913 1 0
1个回答

智佳思远

https://www.workerman.net/doc/webman/components/wechat.html

按照手册,$response->send(); 应该改成 return $response->getContent();

年代过于久远,无法发表回答
×
🔝