mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
fix: 统计 WechatService::getConfig 参数
This commit is contained in:
parent
58859b98cc
commit
d30d0f393b
@ -82,7 +82,7 @@ class PaymentService
|
||||
if ($oPayed + $pAmount > floatval($oAmount)) {
|
||||
return ['code' => 0, 'info' => '支付总额超出!', 'data' => [], 'params' => []];
|
||||
}
|
||||
$config = WechatService::getConfig('', true);
|
||||
$config = WechatService::getConfig(true);
|
||||
do $pCode = CodeExtend::uniqidNumber(16, 'P');
|
||||
while (WechatPaymentRecord::mk()->master()->where(['code' => $pCode])->findOrEmpty()->isExists());
|
||||
$data = [
|
||||
@ -328,7 +328,7 @@ class PaymentService
|
||||
*/
|
||||
protected static function withPayment(?array $config = null): Order
|
||||
{
|
||||
return Order::instance($config ?: WechatService::getConfig('', true));
|
||||
return Order::instance($config ?: WechatService::getConfig(true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -178,15 +178,14 @@ class WechatService extends Service
|
||||
|
||||
/**
|
||||
* 获取公众号配置参数
|
||||
* @param string $appid 指定公众号
|
||||
* @param boolean $ispay 获取支付参数
|
||||
* @return array
|
||||
* @throws \think\admin\Exception
|
||||
*/
|
||||
public static function getConfig(string $appid = '', bool $ispay = false): array
|
||||
public static function getConfig(bool $ispay = false): array
|
||||
{
|
||||
$config = [
|
||||
'appid' => $appid ?: static::getAppid(),
|
||||
'appid' => static::getAppid(),
|
||||
'token' => sysconf('wechat.token'),
|
||||
'appsecret' => sysconf('wechat.appsecret'),
|
||||
'encodingaeskey' => sysconf('wechat.encodingaeskey'),
|
||||
@ -197,7 +196,7 @@ class WechatService extends Service
|
||||
|
||||
/**
|
||||
* 获取小程序配置参数
|
||||
* @param boolean $ispay 支付参数
|
||||
* @param boolean $ispay 获取支付参数
|
||||
* @return array
|
||||
* @throws \think\admin\Exception
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user