You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
664 B
28 lines
664 B
5 years ago
|
<?php
|
||
|
/**
|
||
|
* @copyright ©2018 浙江禾匠信息科技
|
||
|
* @author Lu Wei
|
||
|
* @link http://www.zjhejiang.com/
|
||
|
* Created by IntelliJ IDEA
|
||
|
* Date Time: 2018/7/5 10:32
|
||
|
*/
|
||
|
|
||
|
|
||
|
namespace app\extensions;
|
||
|
|
||
|
|
||
|
class PayNotify
|
||
|
{
|
||
|
public static function getHostInfo()
|
||
|
{
|
||
|
$host_info = \Yii::$app->request->hostInfo;
|
||
|
$protocol = env('PAY_NOTIFY_PROTOCOL', false);
|
||
|
if ($protocol === 'http') {
|
||
|
$host_info = str_replace('https:', 'http:', $host_info);
|
||
|
}
|
||
|
if ($protocol === 'https') {
|
||
|
$host_info = str_replace('http:', 'https:', $host_info);
|
||
|
}
|
||
|
return $host_info;
|
||
|
}
|
||
|
}
|