...
|
...
|
@@ -35,7 +35,7 @@ class Wechat extends Controller |
|
|
* 微信支付配置
|
|
|
*/
|
|
|
public static function payment(){
|
|
|
$http = $this->isHttps() ? 'https://' : 'http://';
|
|
|
$http = self::isHttps() ? 'https://' : 'http://';
|
|
|
$config = [
|
|
|
'app_id' => config('site.app_id'),
|
|
|
'mch_id' => config('site.mch_id'),
|
...
|
...
|
@@ -74,7 +74,7 @@ class Wechat extends Controller |
|
|
/**
|
|
|
* 判断是否是https
|
|
|
*/
|
|
|
public function isHttps() {
|
|
|
public static function isHttps() {
|
|
|
if ( !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
|
|
|
return true;
|
|
|
} elseif ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) {
|
...
|
...
|
|