yansongda / pay

可能是我用过的最优雅的 Alipay/WeChat/Douyin/Unipay/江苏银行 的支付 SDK 扩展包了
http://pay.yansongda.cn
MIT License
5k stars 1.03k forks source link

微信查单文档错误 #931

Closed bref0 closed 7 months ago

bref0 commented 7 months ago

包版本号

"yansongda/pay": "~3.5.0",

问题描述

文档上是

$order = [ 'transaction_id' => '1217752501201407033233368018', ]; // $order = '1217752501201407033233368018';

$result = Pay::wechat()->find($order);

你的代码

$order = '1217752501201407033233368018'; $result = Pay::wechat()->find($order); 改成 $order = [ 'out_trade_no' => '1217752501201407033233368018', ]; 就没问题了

报错详情

微信订单号非法

sdk 日志

nginx/apache 日志

涉及到 异步通知、同步通知 的问题,请贴出来

yansongda commented 7 months ago

https://github.com/yansongda/pay/blob/v3.5.3/src/Provider/Wechat.php#L69

传递 string 的情况下,默认使用微信的 transaction_id,并非 out_trade_no