fix: 修改小程序配置

This commit is contained in:
Gosowong 2023-05-24 09:37:23 +08:00
parent 5898eef8ff
commit c7131979da
2 changed files with 4 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class MiniProgramService
*/
public static function options()
{
$wechat = SystemConfigService::more(['wechat_app_appsecret', 'wechat_app_appid', 'site_url', 'routine_appId', 'routine_appsecret']);
$wechat = SystemConfigService::more(['wechat_app_appsecret', 'wechat_app_appid', 'site_url', 'routine_appId', 'routine_appsecret', 'wechat_token', 'wechat_encodingaeskey']);
$payment = SystemConfigService::more(['pay_weixin_mchid', 'pay_weixin_key', 'pay_weixin_client_cert', 'pay_weixin_client_key', 'pay_weixin_open', 'pay_new_weixin_open', 'pay_new_weixin_mchid']);
$config = [];
if (request()->isApp()) {

View File

@ -22,8 +22,10 @@ class MiniOrderService
*/
protected static function options(array $config = [])
{
$payment = SystemConfigService::more(['routine_appId', 'routine_appsecret', 'pay_weixin_mchid', 'pay_new_weixin_open', 'pay_new_weixin_mchid']);
$payment = SystemConfigService::more(['routine_appId', 'routine_appsecret', 'pay_weixin_mchid', 'pay_new_weixin_open', 'pay_new_weixin_mchid', 'wechat_token', 'wechat_encodingaeskey']);
return [
'token' => isset($payment['wechat_token']) ? trim($payment['wechat_token']) : '',
'aes_key' => isset($payment['wechat_encodingaeskey']) ? trim($payment['wechat_encodingaeskey']) : '',
'mini_program' => [
'app_id' => $payment['routine_appId'] ?? '',
'secret' => $payment['routine_appsecret'] ?? '',