应用设置优化
This commit is contained in:
@@ -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.php(env)
|
||||
* 配置优先级:后台「系统设置 → 微信官方支付」(site_config wxpay.*) > config/services.php(env)
|
||||
*/
|
||||
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, '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user