Closed javalaw closed 3 years ago
订单实际上应该已经关闭成功了对吧?
麻烦试下最新 dev-master 的代码
或直接 composer update 即可,使用现在最新的 v3.0.1 版本
感谢支持
3.0.1并没有完全解决这个问题,更新之后报错如下:
Yansongda\Pay\Provider\Wechat::close(): Return value must be of type Yansongda\Supports\Collection, GuzzleHttp\Psr7\Response returned {"exception":"[object] (TypeError(code: 0): Yansongda\\Pay\\Provider\\Wechat::close(): Return value must be of type Yansongda\\Supports\\Collection, GuzzleHttp\\Psr7\\Response returned at /data/wwwroot/xxxxxx/releases/456/vendor/yansongda/pay/src/Provider/Wechat.php:99)
close()方法声明的返回类型是Collection,而实际上返回的是一个Response对象
我加下测试用例
麻烦稍等
麻烦再试下 @javalaw
麻烦再试下 @javalaw
3.0.2 现在已经可以了。感谢。
包版本号
3.0.0-rc2
问题描述
调用微信关闭订单方法抛异常
你的代码
报错详情
Call to undefined method GuzzleHttp\Psr7\Response::get() {"exception":"[object] (Error(code: 0): Call to undefined method GuzzleHttp\Psr7\Response::get() at /data/wwwroot/xxx/releases/450/vendor/yansongda/pay/src/Plugin/Wechat/LaunchPlugin.php:49)
sdk 日志
2021-08-18T17:28:04.240761+08:00 > yansongda.pay.INFO > [wechat][LaunchPlugin] 插件开始装载 {"rocket":{"Yansongda\Pay\Rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/订单号/close","method":"POST","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3.0.0"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"nonce\",timestamp=\"\",serial_no=\"\",signature=\"\""]},"body":""},"params":{"out_trade_no":""},"payload":{"mchid":""},"direction":"Yansongda\Pay\Parser\OriginResponseParser","destination":{},"destination_origin":{}}}}
nginx/apache 日志