You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
3.1 KiB
113 lines
3.1 KiB
<?php
|
|
|
|
namespace UnifyPayment;
|
|
|
|
use Monolog\Formatter\LineFormatter;
|
|
use Monolog\Handler\RotatingFileHandler;
|
|
use Monolog\Logger;
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Request Platform Config
|
|
|--------------------------------------------------------------------------
|
|
| domain:支付平台地址。
|
|
| apiSecret: 应用秘钥
|
|
|
|
|
*/
|
|
'domain' => 'http://fangding.picp.vip:5025',
|
|
|
|
'apiSecret' => '123456',
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Payment Channels Config
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| 统一支付平台支付渠道配置参数
|
|
| merchantId: 商户号
|
|
| secret: 秘钥
|
|
| channelId: 支付渠道
|
|
| operatorId: [ 操作员1 , 操作员2 ]
|
|
|
|
|
*/
|
|
|
|
'channels' => [
|
|
|
|
'default' => [
|
|
'merchantId' => 'QY2Y20230301',
|
|
'secret' => 'af4d32227ed4d63e1bb8726ebd0b6110',
|
|
'channelId' => 'FD001',
|
|
'operatorId' => [
|
|
'wx001',
|
|
],
|
|
]
|
|
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Logger Config
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| 详细使用方式见 MonoLog 文档:https://github.com/Seldaek/monolog/blob/2.x/README.md
|
|
| format:
|
|
| LineFormatter 字符串
|
|
| JsonFormatter Json
|
|
| ...
|
|
| handler:
|
|
| StreamHandler 单个文件
|
|
| RotatingFileHandler 每日记录一次
|
|
| RedisHandler Redis
|
|
| ...
|
|
| handler_with:
|
|
| RotatingFileHandler:
|
|
| file 文件名称
|
|
| max_files 最大记录日志文件数量,0为无限制
|
|
| level 日志记录等级
|
|
| OtherHandler详见MonoLog文档
|
|
| ...
|
|
|
|
|
*/
|
|
|
|
'log' => [
|
|
// 时区
|
|
'timezone' => 'Asia/Shanghai',
|
|
// 日期格式
|
|
'date_format' => 'Y-m-d H:i:s',
|
|
// 格式化器
|
|
'formatter' => LineFormatter::class,
|
|
// 对应格式化器构造参数
|
|
'formatter_with' => [
|
|
// 输出格式字符串
|
|
'output' => "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n\n"
|
|
],
|
|
// 处理器
|
|
'handler' => RotatingFileHandler::class,
|
|
// 对应处理器构造参数
|
|
'handler_with' => [
|
|
// 文件
|
|
'file' => storage_path('logs/UnifyLog/payment.log'),
|
|
// 最大文件 0 无限制
|
|
'max_files' => 0,
|
|
// 记录等级
|
|
'level' => Logger::DEBUG
|
|
]
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Http Client Config
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| 详细使用方式见 Guzzle 文档:https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html
|
|
|
|
|
*/
|
|
'http' => [
|
|
'verify' => false,
|
|
'timeout' => 20,
|
|
'connect_timeout' => 5.0,
|
|
]
|
|
];
|
|
|
|
|