From cab819ee413b8e156e0ce41e05645ad7ba287dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 14 Apr 2017 10:01:34 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E8=B0=83=E6=95=B4=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E9=85=8D=E7=BD=AE=E5=8F=82=E6=95=B0=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E4=B8=BA=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common.php | 12 +++++++++++- application/extra/wechat.php | 29 ----------------------------- 2 files changed, 11 insertions(+), 30 deletions(-) delete mode 100644 application/extra/wechat.php diff --git a/application/common.php b/application/common.php index 2230e6684..7e3ef51ea 100644 --- a/application/common.php +++ b/application/common.php @@ -39,7 +39,17 @@ function & load_wechat($type = '') { static $wechat = array(); $index = md5(strtolower($type)); if (!isset($wechat[$index])) { - $config = Config::get('wechat'); + $config = [ + 'token' => sysconf('wechat_token'), + 'appid' => sysconf('wechat_appid'), + 'appsecret' => sysconf('wechat_appsecret'), + 'encodingaeskey' => sysconf('wechat_encodingaeskey'), + 'mch_id' => sysconf('wechat_mch_id'), + 'partnerkey' => sysconf('wechat_partnerkey'), + 'ssl_cer' => sysconf('wechat_cert_cert'), + 'ssl_key' => sysconf('wechat_cert_key'), + 'cachepath' => CACHE_PATH . 'wxpay' . DS, + ]; $config['cachepath'] = CACHE_PATH . 'wechat' . DS; $wechat[$index] = &Loader::get($type, $config); } diff --git a/application/extra/wechat.php b/application/extra/wechat.php deleted file mode 100644 index 5f5a9e12c..000000000 --- a/application/extra/wechat.php +++ /dev/null @@ -1,29 +0,0 @@ - sysconf('wechat_token'), - 'appid' => sysconf('wechat_appid'), - 'appsecret' => sysconf('wechat_appsecret'), - 'encodingaeskey' => sysconf('wechat_encodingaeskey'), - 'mch_id' => sysconf('wechat_mch_id'), - 'partnerkey' => sysconf('wechat_partnerkey'), - 'ssl_cer' => sysconf('wechat_cert_cert'), - 'ssl_key' => sysconf('wechat_cert_key'), - 'cachepath' => CACHE_PATH . 'wxpay' . DS, -]; \ No newline at end of file