应用设置优化

This commit is contained in:
liu
2026-09-04 20:37:34 +08:00
parent c986c86ed5
commit 52e339cdd3
10 changed files with 127 additions and 33 deletions
+5 -2
View File
@@ -15,7 +15,7 @@ use Throwable;
* - 交易查询:GET /v3/pay/transactions/out-trade-no/{商户订单号}
* - 支付通知:Wechatpay-Signature 验签(配置平台证书/公钥时)+ APIv3 密钥 AES-256-GCM 解密报文
*
* 配置优先级:后台「系统设置 → 支付配置」(site_config pay.wxpay_*) > config/services.phpenv
* 配置优先级:后台「系统设置 → 微信官方支付」(site_config wxpay.*) > config/services.phpenv
*/
class WechatPayService
{
@@ -212,6 +212,9 @@ class WechatPayService
protected function appid(): string
{
$appid = $this->config('appid');
if ($appid === '') {
$appid = (string) site_config('wechat.mini_appid', '');
}
if ($appid === '') {
$appid = (string) config('services.wechat.mini.appid', '');
}
@@ -246,7 +249,7 @@ class WechatPayService
*/
protected function config(string $key): string
{
$value = site_config('pay.wxpay_' . $key, '');
$value = site_config('wxpay.' . $key, '');
if ($value === null || $value === '') {
$value = config('services.wxpay.' . $key, '');
}