diff --git a/application/common.php b/application/common.php index 21f7920f9..56f25c4b6 100755 --- a/application/common.php +++ b/application/common.php @@ -261,6 +261,12 @@ function PluginsHomeUrl($plugins_name, $plugins_control, $plugins_action, $param $url = str_replace('public/', '', $url); } + // tp框架url方法是否识别到https + if(__MY_HTTP__ == 'https' && substr($url, 0, 5) != 'https') + { + $url = 'https'.mb_substr($url, 4, null, 'utf-8'); + } + return $url; } @@ -291,6 +297,12 @@ function PluginsAdminUrl($plugins_name, $plugins_control, $plugins_action, $para $url = str_replace('public/', '', $url); } + // tp框架url方法是否识别到https + if(__MY_HTTP__ == 'https' && substr($url, 0, 5) != 'https') + { + $url = 'https'.mb_substr($url, 4, null, 'utf-8'); + } + return $url; } diff --git a/extend/payment/Weixin.php b/extend/payment/Weixin.php index ed70239a1..bfb1f4955 100755 --- a/extend/payment/Weixin.php +++ b/extend/payment/Weixin.php @@ -231,7 +231,7 @@ class Weixin 'mch_id' => $this->config['mch_id'], 'body' => $params['site_name'].'-'.$params['name'], 'nonce_str' => md5(time().rand().$params['order_no']), - 'notify_url' => str_replace('https', 'http', $params['notify_url']), + 'notify_url' => (__MY_HTTP__ == 'https') ? 'https'.mb_substr($params['notify_url'], 4, null, 'utf-8') : $params['notify_url'], 'openid' => ($trade_type == 'JSAPI') ? $params['user']['weixin_openid'] : '', 'out_trade_no' => $params['order_no'].GetNumberCode(6), 'spbill_create_ip' => GetClientIP(),