1. 完善易支付API调用全流程

2. 确定支付插件继承基础类和接口规范
3. 引入Yansongda\Pay支付快捷工具
4. 重新整理代码和功能结构
This commit is contained in:
技术老胡
2026-03-12 19:18:21 +08:00
parent 5dae6e7174
commit fa3abdcaff
19 changed files with 1042 additions and 578 deletions

View File

@@ -36,3 +36,24 @@ if (!function_exists('container_make')) {
return Container::make($name, $parameters);
}
}
if (!function_exists('sys_config')) {
/**
* 获取系统配置项(带默认值)
*
* 读取来源ma_system_config 表,通过 SystemConfigService + 缓存。
*
* @param string $key 配置键名config_key
* @param mixed $default 默认值(未配置或为 null 时返回)
* @return mixed
*
* @example
* $siteName = sys_config('site_name', 'MyPay');
*/
function sys_config(string $key, mixed $default = null): mixed
{
/** @var \app\services\SystemConfigService $service */
$service = Container::get(\app\services\SystemConfigService::class);
return $service->getValue($key, $default);
}
}