mirror of
https://gitee.com/technical-laohu/mpay_v2_webman.git
synced 2026-04-05 01:24:25 +08:00
1. 完善易支付API调用全流程
2. 确定支付插件继承基础类和接口规范 3. 引入Yansongda\Pay支付快捷工具 4. 重新整理代码和功能结构
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user