mirror of
https://gitee.com/technical-laohu/mpay_v2_webman.git
synced 2026-05-17 06:20:25 +08:00
feat: 完善支付通道和收款监听链路
新增 ChannelNotifyPayloadInterface 等支付插件通知契约,规范 pay_no 定位和插件返回校验。 新增微信、支付宝、收钱吧、Postar 个人收款插件适配,支持余额识别与备注识别。 新增 receipt-watcher 后端进程、Redis 队列 job 和平台事件监听,覆盖收款流水通知、商户通知、退款派发、转账派发与清算完成。 补齐个人收款监听相关系统配置、仓储、服务费冻结明细、订单后台操作和通道测试能力。 重构支付单创建、回调、费用、风控、结算和通道统计链路,统一状态流转与幂等处理。
This commit is contained in:
@@ -19,9 +19,41 @@ class SystemConfigRepository extends BaseRepository
|
||||
{
|
||||
parent::__construct(new SystemConfig());
|
||||
}
|
||||
|
||||
/**
|
||||
* 按配置键批量查询配置值。
|
||||
*
|
||||
* @param array<int, mixed> $keys 配置键列表
|
||||
* @return array<string, string> 配置键到配置值的映射
|
||||
*/
|
||||
public function valueMapByKeys(array $keys): array
|
||||
{
|
||||
$normalizedKeys = [];
|
||||
foreach ($keys as $key) {
|
||||
$configKey = strtolower(trim((string) $key));
|
||||
if ($configKey !== '') {
|
||||
$normalizedKeys[$configKey] = true;
|
||||
}
|
||||
}
|
||||
|
||||
$keys = array_keys($normalizedKeys);
|
||||
if ($keys === []) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$rows = $this->query()
|
||||
->whereIn('config_key', $keys)
|
||||
->get(['config_key', 'config_value']);
|
||||
|
||||
$values = [];
|
||||
foreach ($rows as $row) {
|
||||
$values[strtolower((string) $row->config_key)] = (string) ($row->config_value ?? '');
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user