-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
预支付下单 response body 为空 #488
Comments
@Hitmanv 最好贴出你的代码,支付这部分相关的参数和配置本来就多,引起错误的因素也多。光一个报错截图很难确定问题。 |
@tianyong90 嗯 谢谢 因为用的是实例的代码 依赖的代码页都看了 参数方面没什么问题 所以就没贴 主要是请求结果空没办法分析比较麻烦 我先自己请求试试 |
@Hitmanv ,我也遇到这个问题了,debug 日志和你的一模一样,状态码
$wechat = new EasyWeChat\Foundation\Application($wechatConfig);
$payOrder = new EasyWeChat\Payment\Order([
'trade_type' => 'JSAPI',
'out_trade_no' => $order['id'],
'body' => $order['category']['name'],
'detail' => $order['category']['name'],
'total_fee' => $order['price'] * 100,
'time_start' => date('YmdHis'),
'time_expire' => date('YmdHis', time() + $this->setting['paymentTimeout']),
'openid' => $_SESSION['oauth']['userId']
]);
$result = $wechat->payment->prepare($payOrder);
log_message('debug', json_encode($result)); // 这里出来的结果是 [false] Debug 日志:
|
问题解决了,发送的请求里少了 另外还有个问题,当我单独写一个文件测试 SDK 时,发现由于请求超时设置回影响返回结果。具体在 |
我用的环境
laravel 5.2
PHP 版本:
overtrue/wechat 版本:3.1
问题及现象
调用 $payment->prepare() 打断点发现请求的response里面的body为空,get body dump出来的是stream, 跟这个有关系吗
描述你的问题现象,报错贴截图粘贴或者贴具体信息,提供必要的代码段
The text was updated successfully, but these errors were encountered: