From 728f78db093a2b0c752662065c2f0a6cca2389f3 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Thu, 28 Nov 2019 08:01:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?OA=E5=85=B3=E8=81=94=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=AD=A3=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Conf/config.php | 5 +++++ Application/Admin/Controller/PromoteController.class.php | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Conf/config.php b/Application/Admin/Conf/config.php index 62f5a797c..18e03bdb6 100644 --- a/Application/Admin/Conf/config.php +++ b/Application/Admin/Conf/config.php @@ -19,6 +19,11 @@ return array( 'GET_INFO_KEY' => 'wmkjtx_kj213', + 'OA' => array( + 'testUrl' => 'http://test.oa.76ba.com', + 'formalUrl' => 'http://test.oa.76ba.com', + ), + /* 文件上传相关配置 */ 'DOWNLOAD_UPLOAD' => array( 'mimes' => '', //允许上传的文件MiMe类型 diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index c77b8df1f..27234fe1a 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -110,9 +110,9 @@ class PromoteController extends ThinkController $arr['pageSize'] = 1000; ksort($arr); reset($arr); - $sign = md5(http_build_query($arr) . 'wmkjtx_kj213'); + $sign = md5(http_build_query($arr) . C('GET_INFO_KEY')); $arr['sign'] = $sign; - $re_data = curl_post('http://test.oa.76ba.com/api/wanmeng/platformAccount', $arr); + $re_data = curl_post(C('OA.formalUrl') . '/api/wanmeng/platformAccount', $arr); $re_data = json_decode($re_data, true); if ($re_data['code'] == 1) { $oa = $re_data['data']; @@ -151,7 +151,7 @@ class PromoteController extends ThinkController reset($arr); $sign = md5(http_build_query($arr) . 'wmkjtx_kj213'); $arr['sign'] = $sign; - $re_data = curl_post('http://test.oa.76ba.com/api/wanmeng/verifyBind', $arr); + $re_data = curl_post(C('OA.formalUrl') . '/api/wanmeng/verifyBind', $arr); $re_data = json_decode($re_data, true)['data']; foreach ($list_data as $k => $v) { $oa_val = $re_data[trim($v['account'])]; From db6558bc764d4c6508297eefd5bd480a38b3a448 Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Thu, 28 Nov 2019 08:20:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ssg=E6=89=93=E5=8D=B0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Mobile/Controller/SsgController.class.php | 3 ++- ThinkPHP/Library/Think/Pay.class.php | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index bd1a466c1..8684daf05 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -3,6 +3,7 @@ namespace Mobile\Controller; use Org\Ipa365SDK\Ipa365; use Org\WeixinSDK\Weixin; use User\Api\MemberApi; +use Think\Log; class SsgController extends BaseController { const USER_NOT_ILLEGAL = -1; //用户名不合法 @@ -591,7 +592,7 @@ class SsgController extends BaseController { $param['callback'] = "https://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}"; //$param['notifyurl'] = "https://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay"; } - + Log::write(serialize($param), Log::DEBUG); $ali_pay = $this->alipay($param); redirect($ali_pay['url']); }else{ diff --git a/ThinkPHP/Library/Think/Pay.class.php b/ThinkPHP/Library/Think/Pay.class.php index af718417e..5583aecf0 100644 --- a/ThinkPHP/Library/Think/Pay.class.php +++ b/ThinkPHP/Library/Think/Pay.class.php @@ -8,6 +8,7 @@ namespace Think; use Org\UcenterSDK\Ucservice; +use Think\Log; class Pay { @@ -167,8 +168,10 @@ class Pay break; } $notifyurl = $vo->getNotifyUrl(); - if (!$notifyurl) - $notifyurl = 'http://' . $_SERVER ['HTTP_HOST'] . '/callback.php/Notify2/notify/apitype/alipay/methodtype/notify'; + if (!$notifyurl){ + $notifyurl = 'http://' . $_SERVER ['HTTP_HOST'] . '/callback.php/Notify2/notify/apitype/alipay/methodtype/notify'; + } + Log::write($notifyurl, Log::DEBUG); $request->setNotifyUrl($notifyurl); switch ($type) {