diff --git a/ThinkPHP/Library/Vendor/WxPayPubHelper/22WxPayPubHelper.php b/ThinkPHP/Library/Vendor/WxPayPubHelper/22WxPayPubHelper.php index e0b1c0f..3cd537d 100644 --- a/ThinkPHP/Library/Vendor/WxPayPubHelper/22WxPayPubHelper.php +++ b/ThinkPHP/Library/Vendor/WxPayPubHelper/22WxPayPubHelper.php @@ -186,6 +186,10 @@ class Common_util_pub //要求结果为字符串且输出到屏幕上 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); + if ($this->mchid == '1699330320') { + curl_setopt($ch, CURLOPT_REFERER, "https://way.hexidongkeji.top"); + } + if($useCert == true){ //设置证书 //使用证书:cert 与 key 分别属于两个.pem文件 @@ -229,6 +233,11 @@ class Common_util_pub curl_setopt($ch,CURLOPT_HEADER,FALSE); //要求结果为字符串且输出到屏幕上 curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE); + + if ($this->mchid == '1699330320') { + curl_setopt($ch, CURLOPT_REFERER, "https://way.hexidongkeji.top"); + } + //设置证书 //使用证书:cert 与 key 分别属于两个.pem文件 //默认格式为PEM,可以注释 diff --git a/ThinkPHP/Library/Vendor/WxPayPubHelper/WxPayPubHelper.php b/ThinkPHP/Library/Vendor/WxPayPubHelper/WxPayPubHelper.php index 7dd6022..641c30d 100644 --- a/ThinkPHP/Library/Vendor/WxPayPubHelper/WxPayPubHelper.php +++ b/ThinkPHP/Library/Vendor/WxPayPubHelper/WxPayPubHelper.php @@ -185,6 +185,10 @@ class Common_util_pub curl_setopt($ch, CURLOPT_HEADER, FALSE); //要求结果为字符串且输出到屏幕上 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); + + if ($this->mchid == '1699330320') { + curl_setopt($ch, CURLOPT_REFERER, "https://way.hexidongkeji.top"); + } if($useCert == true){ if($tt==3){ @@ -248,6 +252,12 @@ class Common_util_pub //默认格式为PEM,可以注释 curl_setopt($ch,CURLOPT_SSLKEYTYPE,'PEM'); curl_setopt($ch,CURLOPT_SSLKEY, WxPayConf_pub::SSLKEY_PATH); + + + if ($this->mchid == '1699330320') { + curl_setopt($ch, CURLOPT_REFERER, "https://way.hexidongkeji.top"); + } + //post提交方式 curl_setopt($ch,CURLOPT_POST, true); curl_setopt($ch,CURLOPT_POSTFIELDS,$xml);