yansongda / pay

可能是我用过的最优雅的 Alipay/WeChat/Unipay 的支付 SDK 扩展包了

Home Page:http://pay.yansongda.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v3版本报错Config Error

mcc7178 opened this issue · comments

包版本号

现有版本是这样的,php 7.4.3
Using version ^2.1 for hyperf/pimple
Using version ^6.5 for guzzlehttp/guzzle
Using version ^3.3 for yansongda/pay

问题描述

你的代码

$order = [
'out_batch_no' => time() . '',
'batch_name' => 'subject-测试',
'batch_remark' => 'test',
'total_amount' => 1,
'total_num' => 1,
'transfer_detail_list' => [
[
'out_detail_no' => time() . '-1',
'transfer_amount' => 1,
'transfer_remark' => 'test',
'openid' => 'xxxxx',
],
],
];

Pay::config($this->config2);
$result = Pay::wechat()->transfer($order);

报错详情

[3004] InvalidConfigException in AbstractProvider.php line 110
Config Error

$http = Pay::get(HttpClientInterface::class);

if (!$http instanceof ClientInterface) {
    throw new InvalidConfigException(Exception::HTTP_CLIENT_CONFIG_ERROR);
}

sdk 日志

nginx/apache 日志

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

guzzlehttp/guzzle版本一定要7.0吗