setConfig($data, '微信支付配置', 1, [['site_id', '=', $site_id], ['app_module', '=', $app_module], ['config_key', '=', 'WECHAT_PAY_CONFIG']]); return $res; } /** * 获取支付配置 */ public function getPayConfig($site_id = 0, $app_module = 'shop') { $config = new ConfigModel(); $res = $config->getConfig([['site_id', '=', $site_id], ['app_module', '=', $app_module], ['config_key', '=', 'WECHAT_PAY_CONFIG']]); if (!empty($res['data']['value'])) { $res['data']['value']['api_type'] = $res['data']['value']['api_type'] ?? 'v2'; $res['data']['value']['transfer_type'] = $res['data']['value']['transfer_type'] ?? 'v2'; } return $res; } }