Parcourir la source

move some thirid notify files to notify dir

stanley-king il y a 1 an
Parent
commit
6ec8ea1bb0

+ 1 - 1
capi/wxauthor.php

@@ -59,7 +59,7 @@ elseif(wechat_helper::has_origin_url())
 else
 {
     $host = urldecode($state);
-    $url = "{$host}/mobile/wxauthor.php?code={$code}";
+    $url = "{$host}/mobile/notify/wxauthor.php?code={$code}";
     Log::record("redirect url={$url}",Log::DEBUG);
     $html = "<!DOCTYPE html>
                     <html lang=\"en\">

+ 1 - 1
data/api/pub_wxpay/lib/WxPay.Config.php

@@ -28,7 +28,7 @@ class WxPayConfig
 	const MCHID = MINIPAY_WXPAY_MCHID;
 	const KEY   = MINIPAY_WXPAY_KEY; //'0f86a4a9b1edb51b1a7d110fa223a157';
 	const APPSECRET = PUB_APPSECRET; //'ee64233b3144d76217161666f8cb4c86';
-    const NOTIFY_URL  = BASE_SITE_URL . '/mobile/pub_wxnotify.php';
+    const NOTIFY_URL  = BASE_SITE_URL . '/mobile/notify/pub_wxnotify.php';
 	//=======【证书路径设置】=====================================
 	/**
 	 * TODO:设置商户证书路径

+ 5 - 6
helper/fcgisrv/BaseServer.php

@@ -37,19 +37,18 @@ abstract class BaseServer
         $_COOKIE = [];
         $_POST = [];
         $_GET = [];
-//        $_SERVER = [];
     }
 
     public function handle_error($level, $message, $file, $line)
     {
         if($level == E_NOTICE) return;
-        $trace = "handle_error: level={$level},msg={$message} file={$file},line={$line}\n";
+        $trace = "handle_error: level=$level,msg=$message file=$file,line=$line\n";
         $backtrace = debug_backtrace();
         foreach ($backtrace as $item) {
             $trace .= "{$item['file']}\t{$item['line']}\t{$item['function']}\n";
         }
 
-        Log::record($trace,Log::ERR);
+        Log::record($trace, Log::ERR);
     }
 
     protected function preLooper()
@@ -65,7 +64,7 @@ abstract class BaseServer
         Log::record('Waiting......',Log::DEBUG);
         $i = 0;
         fcgi_init();
-        while(($ret = fcgi_accept()) >= 0)
+        while(fcgi_accept() >= 0)
         {
             $mem = memory_get_usage();
             Log::record("index = $i memory=$mem ",Log::DEBUG);
@@ -93,11 +92,11 @@ abstract class BaseServer
             $perlog = perfor_log();
 
             $mem = memory_get_usage();
-            Log::record("memory={$mem} perlog = {$perlog}" ,Log::DEBUG);
+            Log::record("memory=$mem perlog = $perlog" ,Log::DEBUG);
             $ret = fcgi_fini();
 
             $mem = memory_get_usage();
-            $msg = sprintf("memory={$mem} isCgi = {$ret} request time=%.6f\r\n\r\n",microtime(true) - $start);
+            $msg = sprintf("memory=$mem isCgi=$ret request time=%.6f\r\n\r\n", microtime(true) - $start);
             Log::record($msg ,Log::DEBUG);
         }
 

+ 1 - 1
helper/pay/alipay.php

@@ -14,7 +14,7 @@ require_once (ALIPAY_PATH . '/lib/alipay_submit.class.php');
 class alipay implements IPay
 {
     const pri_key_path = ALIPAY_PATH.'/key/lrlz_private_key.pem';
-    const ali_notifyurl = BASE_SITE_URL . '/mobile/alipay_notify_url.php';
+    const ali_notifyurl = BASE_SITE_URL . '/mobile/notify/alipay_notify_url.php';
 
     public function gen_pay($pay_sn, $fee,$order_sn,$subject)
     {

+ 1 - 1
helper/pay/aopay.php

@@ -16,7 +16,7 @@ require_once(ALIPAY_PATHEX . '/request/AlipayTradeAppPayRequest.php');
 
 class aopay implements IPay
 {
-    const ali_notifyurl = BASE_SITE_URL . '/mobile/alipay_notify_url.php';
+    const ali_notifyurl = BASE_SITE_URL . '/mobile/notify/alipay_notify_url.php';
 
     public function gen_pay($pay_sn, $fee,$order_sn,$subject)
     {

+ 4 - 4
helper/pay/cmbpay.php

@@ -133,12 +133,12 @@ class NotifyData
 
 class cmbpay implements IPay
 {
-    const notify_signurl = BASE_SITE_URL . '/mobile/cmbpay_sign.php';
-    const notify_payurl  = BASE_SITE_URL . '/mobile/cmbpay_notify.php';
+    const notify_signurl = BASE_SITE_URL . '/mobile/notify/cmbpay_sign.php';
+    const notify_payurl  = BASE_SITE_URL . '/mobile/notify/cmbpay_notify.php';
     const app_returl     = BASE_SITE_URL . '/mobile/index.php';
 
-    const debug_notify_signurl = 'http://121.43.114.153/mobile/cmbpay_sign.php';
-    const debug_notify_payurl  = 'http://121.43.114.153/mobile/cmbpay_notify.php';
+    const debug_notify_signurl = 'http://121.43.114.153/mobile/notify/cmbpay_sign.php';
+    const debug_notify_payurl  = 'http://121.43.114.153/mobile/notify/cmbpay_notify.php';
     const debug_app_returl     = 'http://121.43.114.153/mobile/index.php';
 
     static public function config()

+ 1 - 1
helper/pay/jspay.php

@@ -28,7 +28,7 @@ use Log;
 
 class jspay implements IPay
 {
-    const wx_notifyurl  = BASE_SITE_URL . '/mobile/pub_wxnotify.php';
+    const wx_notifyurl  = BASE_SITE_URL . '/mobile/notify/pub_wxnotify.php';
     const wx_orderquery = 'https://api.mch.weixin.qq.com/pay/orderquery';
 
     private $mOpenId;

+ 1 - 1
helper/pay/minipay.php

@@ -21,7 +21,7 @@ use util;
 
 class minipay implements IPay
 {
-    const wx_notifyurl = BASE_SITE_URL . '/mobile/pub_wxnotify.php';
+    const wx_notifyurl = BASE_SITE_URL . '/mobile/notify/pub_wxnotify.php';
     const wx_orderquery = 'https://api.mch.weixin.qq.com/pay/orderquery';
 
     private $mOpenId;

+ 1 - 1
helper/pay/webpay.php

@@ -27,7 +27,7 @@ use util;
 
 class webpay implements IPay
 {
-    const wx_notifyurl  = BASE_SITE_URL . '/mobile/web_wxnotify.php';
+    const wx_notifyurl  = BASE_SITE_URL . '/mobile/notify/web_wxnotify.php';
     const wx_orderquery = 'https://api.mch.weixin.qq.com/pay/orderquery';
 
     private $mOpenId;

+ 1 - 1
helper/pay/wxpay.php

@@ -25,7 +25,7 @@ use util;
 
 class wxpay implements IPay
 {
-    const wx_notifyurl  = BASE_SITE_URL . '/mobile/wxnotify.php';
+    const wx_notifyurl  = BASE_SITE_URL . '/mobile/notify/wxnotify.php';
     const wx_orderquery = 'https://api.mch.weixin.qq.com/pay/orderquery';
 
     public function gen_pay($pay_sn,$fee,$order_sn,$subject)

+ 1 - 1
helper/third_author/wxauthor.php

@@ -37,7 +37,7 @@ class wxauthor
 
     public function enter($origin_url)
     {
-        $back_url = BASE_SITE_URL . "/mobile/wxauthor.php";
+        $back_url = BASE_SITE_URL . "/mobile/notify/wxauthor.php";
         $params = [ 'appid' => self::appid,
                     'redirect_uri' => $back_url,
                     'response_type' => 'code',

mobile/bridge_shr.php → mobile/bridge/bridge_shr.php


+ 97 - 97
mobile/alipay_notify_url.php

@@ -1,98 +1,98 @@
-<?php
-
-require_once(BASE_ROOT_PATH   . '/helper/pay_helper.php');
-require_once(BASE_DATA_PATH   . '/logic/delivery.logic.php');
-
-$pay_sn = $_POST['out_trade_no'];       // 商户订单号
-$trade_no = $_POST['trade_no'];         // 支付宝交易号
-
-Log::record("alipay_notify_url: pay_sn={$pay_sn} total_fee={$total_fee}", Log::DEBUG);
-
-
-// 步骤一:验证数据来源正确性
-if(defined('SERVER_TYPE') && SERVER_TYPE == 'panda')
-{
-    define(ALIPAY_PATH, BASE_DATA_PATH . '/api/alipay');
-    require_once(ALIPAY_PATH . '/alipay.config.php');
-    require_once(ALIPAY_PATH . '/lib/alipay_notify.class.php');
-
-    $alipayNotify = new AlipayNotify($alipay_config);
-    $verify_result = $alipayNotify->verifyReturn();
-
-    $total_fee = doubleval(trim($_POST['total_fee']));
-
-    Log::record("走pandaup 阿里支付验签过程", Log::DEBUG);
-}
-elseif(defined('SERVER_TYPE') && SERVER_TYPE == 'car') {
-    $ipay = new pay\aopay();
-    $verify_result = $ipay->verify($_POST);
-    $total_fee = doubleval(trim($_POST['total_amount']));
-    Log::record("走pandaup 阿里支付验签过程", Log::DEBUG);
-}
-else {
-    Log::record("没有找到阿里支付密钥",Log::DEBUG);
-}
-
-Log::record("verify_result={$verify_result}, pay_sn={$pay_sn},", Log::DEBUG);
-fcgi_header("Content-Type: text/plain; charset=UTF-8\r\n\r\n");
-
-Log::record("ali post data:{$_SERVER['post_content']}",Log::DEBUG);
-
-if ($verify_result)
-{
-    $payer = new pay_helper($pay_sn);
-
-    $trade_status = $_POST['trade_status'];
-    if ($trade_status === 'TRADE_FINISHED' || $trade_status === 'TRADE_SUCCESS')
-    {
-        if($payer->paied()) {
-            echo('success'); //该订单已经支付
-            return;
-        }
-
-        $chk = $payer->check_fee($total_fee,$need_pay);
-        if($chk == false) {
-            Log::record("AliPay check: pay_sn={$pay_sn},total_fee={$total_fee},need_pay={$need_pay}",Log::ERR);
-            echo("fail");
-            return;
-        }
-        else
-        {
-            Log::record("AliPay check: pay_sn={$pay_sn},total_fee={$total_fee},need_pay={$need_pay}",Log::DEBUG);
-            // 步骤二:更新订单状态
-            $cb_info = $payer->update_order($trade_no, 'alipay');
-            if ($cb_info['state'] == false) {
-                Log::record("update_order fail: pay_sn={$pay_sn}", Log::DEBUG);
-                echo('fail');
-                return;
-            }
-            else
-            {
-                if(is_pushoms()) {
-                    $logic_delivery = Logic('delivery');
-                    $ret = $logic_delivery->putOrder($pay_sn, $trade_no);
-                    Log::record("update_order success: pay_sn={$pay_sn}", Log::DEBUG);
-                }
-                $payer->OnSuccess();
-
-                echo('success');
-                return;
-            }
-         }
-    }
-    elseif ($trade_status == 'WAIT_BUYER_PAY') {
-
-    }
-    else {
-
-    }
-    echo("success"); // 交易正确时,返回success
-    return;
-}
-else
-{
-    Log::record("verify notify fail : pay_sn={$pay_sn}");
-    echo("fail");
-    return;
-}
+<?php
+
+require_once(BASE_ROOT_PATH   . '/helper/pay_helper.php');
+require_once(BASE_DATA_PATH   . '/logic/delivery.logic.php');
+
+$pay_sn = $_POST['out_trade_no'];       // 商户订单号
+$trade_no = $_POST['trade_no'];         // 支付宝交易号
+
+Log::record("alipay_notify_url: pay_sn={$pay_sn} total_fee={$total_fee}", Log::DEBUG);
+
+
+// 步骤一:验证数据来源正确性
+if(defined('SERVER_TYPE') && SERVER_TYPE == 'panda')
+{
+    define(ALIPAY_PATH, BASE_DATA_PATH . '/api/alipay');
+    require_once(ALIPAY_PATH . '/alipay.config.php');
+    require_once(ALIPAY_PATH . '/lib/alipay_notify.class.php');
+
+    $alipayNotify = new AlipayNotify($alipay_config);
+    $verify_result = $alipayNotify->verifyReturn();
+
+    $total_fee = doubleval(trim($_POST['total_fee']));
+
+    Log::record("走pandaup 阿里支付验签过程", Log::DEBUG);
+}
+elseif(defined('SERVER_TYPE') && SERVER_TYPE == 'car') {
+    $ipay = new pay\aopay();
+    $verify_result = $ipay->verify($_POST);
+    $total_fee = doubleval(trim($_POST['total_amount']));
+    Log::record("走pandaup 阿里支付验签过程", Log::DEBUG);
+}
+else {
+    Log::record("没有找到阿里支付密钥",Log::DEBUG);
+}
+
+Log::record("verify_result={$verify_result}, pay_sn={$pay_sn},", Log::DEBUG);
+fcgi_header("Content-Type: text/plain; charset=UTF-8\r\n\r\n");
+
+Log::record("ali post data:{$_SERVER['post_content']}",Log::DEBUG);
+
+if ($verify_result)
+{
+    $payer = new pay_helper($pay_sn);
+
+    $trade_status = $_POST['trade_status'];
+    if ($trade_status === 'TRADE_FINISHED' || $trade_status === 'TRADE_SUCCESS')
+    {
+        if($payer->paied()) {
+            echo('success'); //该订单已经支付
+            return;
+        }
+
+        $chk = $payer->check_fee($total_fee,$need_pay);
+        if($chk == false) {
+            Log::record("AliPay check: pay_sn={$pay_sn},total_fee={$total_fee},need_pay={$need_pay}",Log::ERR);
+            echo("fail");
+            return;
+        }
+        else
+        {
+            Log::record("AliPay check: pay_sn={$pay_sn},total_fee={$total_fee},need_pay={$need_pay}",Log::DEBUG);
+            // 步骤二:更新订单状态
+            $cb_info = $payer->update_order($trade_no, 'alipay');
+            if ($cb_info['state'] == false) {
+                Log::record("update_order fail: pay_sn={$pay_sn}", Log::DEBUG);
+                echo('fail');
+                return;
+            }
+            else
+            {
+                if(is_pushoms()) {
+                    $logic_delivery = Logic('delivery');
+                    $ret = $logic_delivery->putOrder($pay_sn, $trade_no);
+                    Log::record("update_order success: pay_sn={$pay_sn}", Log::DEBUG);
+                }
+                $payer->OnSuccess();
+
+                echo('success');
+                return;
+            }
+         }
+    }
+    elseif ($trade_status == 'WAIT_BUYER_PAY') {
+
+    }
+    else {
+
+    }
+    echo("success"); // 交易正确时,返回success
+    return;
+}
+else
+{
+    Log::record("verify notify fail : pay_sn={$pay_sn}");
+    echo("fail");
+    return;
+}
 ?>

mobile/cmbpay_notify.php → mobile/notify/cmbpay_notify.php


mobile/cmbpay_sign.php → mobile/notify/cmbpay_sign.php


mobile/dispatch_notify.php → mobile/notify/dispatch_notify.php


mobile/innercb.php → mobile/notify/innercb.php


mobile/kdniao_notify.php → mobile/notify/kdniao_notify.php


mobile/pub_wxnotify.php → mobile/notify/pub_wxnotify.php


mobile/web_wxnotify.php → mobile/notify/web_wxnotify.php


+ 1 - 1
mobile/wxauthor.php

@@ -59,7 +59,7 @@ elseif(wechat_helper::has_origin_url())
 else
 {
     $host = urldecode($state);
-    $url = "{$host}/mobile/wxauthor.php?code={$code}";
+    $url = "{$host}/mobile/notify/wxauthor.php?code={$code}";
     Log::record("redirect url={$url}",Log::DEBUG);
     $html = "<!DOCTYPE html>
                     <html lang=\"en\">

+ 95 - 95
mobile/wxnotify.php

@@ -1,95 +1,95 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 15/12/10
- * Time: 下午6:01
- */
-
-ini_set('date.timezone', 'Asia/Shanghai');
-error_reporting(E_ERROR);
-
-define(WXPAY_PATH, BASE_DATA_PATH . '/api/open_wxpay');
-
-require_once(WXPAY_PATH . '/lib/OpenWxPay.Api.php');
-require_once(WXPAY_PATH . '/lib/OpenWxPay.Config.php');
-require_once(WXPAY_PATH . '/lib/OpenWxPay.Data.php');
-require_once(WXPAY_PATH . '/lib/OpenWxPay.Exception.php');
-require_once(WXPAY_PATH . '/lib/OpenWxPay.Notify.php');
-
-require_once(BASE_DATA_PATH . '/logic/delivery.logic.php');
-require_once(BASE_ROOT_PATH . '/helper/pay_helper.php');
-
-
-//xml格式
-//$content = '<xml><appid><![CDATA[wx24c5645aa986234a]]></appid>
-//<attach><![CDATA[120503418859341217]]></attach>
-//<bank_type><![CDATA[CFT]]></bank_type>
-//<cash_fee><![CDATA[1]]></cash_fee>
-//<fee_type><![CDATA[CNY]]></fee_type>
-//<is_subscribe><![CDATA[N]]></is_subscribe>
-//<mch_id><![CDATA[1279745801]]></mch_id>
-//<nonce_str><![CDATA[smzubtf1eul75d7snt7qzqyh258hwns3]]></nonce_str>
-//<openid><![CDATA[o-E2Rw9BKvBKnHgp41VYdxAHMJqg]]></openid>
-//<out_trade_no><![CDATA[127974580120151214143419]]></out_trade_no>
-//<result_code><![CDATA[SUCCESS]]></result_code>
-//<return_code><![CDATA[SUCCESS]]></return_code>
-//<sign><![CDATA[F43C02BBBB3B5E341D78EE477D67F598]]></sign>
-//<time_end><![CDATA[20151214143425]]></time_end>
-//<total_fee>1</total_fee>
-//<trade_type><![CDATA[APP]]></trade_type>
-//<transaction_id><![CDATA[1002150763201512142078937308]]></transaction_id>
-//</xml>';
-
-fcgi_header("Content-Type: text/html; charset=UTF-8");
-
-try {
-    $content = $_SERVER['post_content'];
-    Log::record("content = {$content}", Log::DEBUG);
-    $result = OpenWxPayResults::Init($content);
-    $ret_wx = [];
-    $ret_code = $result['result_code'];
-    Log::record("result_code= {$ret_code}", Log::DEBUG);
-    if ($ret_code == 'SUCCESS') {
-        $out_trade_no = $result['out_trade_no'];
-        $pay_sn = $result['attach'];
-        $trade_no = $result['transaction_id'];
-
-        Log::record("out_trade_no={$out_trade_no} and pay_sn={$pay_sn} and trade_no = {$trade_no}", Log::DEBUG);
-
-        $payer = new pay_helper($pay_sn);
-        $cb_info = $payer->update_order($trade_no, 'wxpay');
-
-        if ($cb_info['state'] == false) {
-            Log::record('wxpay error.', Log::DEBUG);
-        } else {
-            Log::record('wxpay success.', Log::DEBUG);
-
-            if (is_pushoms()) {
-                $logic_delivery = Logic('delivery');
-                $ret = $logic_delivery->putOrder($pay_sn, $trade_no);
-            }
-
-            $payer->OnSuccess();
-        }
-
-        $ret_wx['return_code'] = 'SUCCESS';
-        $ret_wx['return_msg'] = 'OK';
-    } else {
-        Log::record('wxpay error 2.', Log::DEBUG);
-        $ret_wx['return_code'] = 'FAIL';
-        $ret_wx['return_msg'] = 'Error.';
-    }
-
-    $retoper = new OpenWxPayResults();
-    $retoper->FromArray($ret_wx);
-    $xml = $retoper->ToXml();
-    Log::record("return to wx= {$xml}", Log::DEBUG);
-
-    echo($xml);
-} catch (OpenWxPayException $e) {
-    Log::record($e->getTraceAsString(), Log::ERR);
-    $msg = $e->errorMessage();
-    return false;
-}
-
+<?php
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 15/12/10
+ * Time: 下午6:01
+ */
+
+ini_set('date.timezone', 'Asia/Shanghai');
+error_reporting(E_ERROR);
+
+define(WXPAY_PATH, BASE_DATA_PATH . '/api/open_wxpay');
+
+require_once(WXPAY_PATH . '/lib/OpenWxPay.Api.php');
+require_once(WXPAY_PATH . '/lib/OpenWxPay.Config.php');
+require_once(WXPAY_PATH . '/lib/OpenWxPay.Data.php');
+require_once(WXPAY_PATH . '/lib/OpenWxPay.Exception.php');
+require_once(WXPAY_PATH . '/lib/OpenWxPay.Notify.php');
+
+require_once(BASE_DATA_PATH . '/logic/delivery.logic.php');
+require_once(BASE_ROOT_PATH . '/helper/pay_helper.php');
+
+
+//xml格式
+//$content = '<xml><appid><![CDATA[wx24c5645aa986234a]]></appid>
+//<attach><![CDATA[120503418859341217]]></attach>
+//<bank_type><![CDATA[CFT]]></bank_type>
+//<cash_fee><![CDATA[1]]></cash_fee>
+//<fee_type><![CDATA[CNY]]></fee_type>
+//<is_subscribe><![CDATA[N]]></is_subscribe>
+//<mch_id><![CDATA[1279745801]]></mch_id>
+//<nonce_str><![CDATA[smzubtf1eul75d7snt7qzqyh258hwns3]]></nonce_str>
+//<openid><![CDATA[o-E2Rw9BKvBKnHgp41VYdxAHMJqg]]></openid>
+//<out_trade_no><![CDATA[127974580120151214143419]]></out_trade_no>
+//<result_code><![CDATA[SUCCESS]]></result_code>
+//<return_code><![CDATA[SUCCESS]]></return_code>
+//<sign><![CDATA[F43C02BBBB3B5E341D78EE477D67F598]]></sign>
+//<time_end><![CDATA[20151214143425]]></time_end>
+//<total_fee>1</total_fee>
+//<trade_type><![CDATA[APP]]></trade_type>
+//<transaction_id><![CDATA[1002150763201512142078937308]]></transaction_id>
+//</xml>';
+
+fcgi_header("Content-Type: text/html; charset=UTF-8");
+
+try {
+    $content = $_SERVER['post_content'];
+    Log::record("content = {$content}", Log::DEBUG);
+    $result = OpenWxPayResults::Init($content);
+    $ret_wx = [];
+    $ret_code = $result['result_code'];
+    Log::record("result_code= {$ret_code}", Log::DEBUG);
+    if ($ret_code == 'SUCCESS') {
+        $out_trade_no = $result['out_trade_no'];
+        $pay_sn = $result['attach'];
+        $trade_no = $result['transaction_id'];
+
+        Log::record("out_trade_no={$out_trade_no} and pay_sn={$pay_sn} and trade_no = {$trade_no}", Log::DEBUG);
+
+        $payer = new pay_helper($pay_sn);
+        $cb_info = $payer->update_order($trade_no, 'wxpay');
+
+        if ($cb_info['state'] == false) {
+            Log::record('wxpay error.', Log::DEBUG);
+        } else {
+            Log::record('wxpay success.', Log::DEBUG);
+
+            if (is_pushoms()) {
+                $logic_delivery = Logic('delivery');
+                $ret = $logic_delivery->putOrder($pay_sn, $trade_no);
+            }
+
+            $payer->OnSuccess();
+        }
+
+        $ret_wx['return_code'] = 'SUCCESS';
+        $ret_wx['return_msg'] = 'OK';
+    } else {
+        Log::record('wxpay error 2.', Log::DEBUG);
+        $ret_wx['return_code'] = 'FAIL';
+        $ret_wx['return_msg'] = 'Error.';
+    }
+
+    $retoper = new OpenWxPayResults();
+    $retoper->FromArray($ret_wx);
+    $xml = $retoper->ToXml();
+    Log::record("return to wx= {$xml}", Log::DEBUG);
+
+    echo($xml);
+} catch (OpenWxPayException $e) {
+    Log::record($e->getTraceAsString(), Log::ERR);
+    $msg = $e->errorMessage();
+    return false;
+}
+

+ 1 - 2
racc/config/config.ini.php

@@ -1,5 +1,4 @@
 <?php
 defined('InShopNC') or exit('Access Invalid!');
 
-$config['racc_exclude_dirs'] = ['callback/lingzh','callback/mh'];
-
+$config['racc_exclude_dirs'] = ['callback/lingzh','callback/mh'];

+ 2 - 17
racc/racc_run.php

@@ -19,23 +19,9 @@ require_once(BASE_ROOT_PATH . '/helper/exceptionex.php');
 require_once(BASE_ROOT_PATH . '/helper/message/msgstates.php');
 require_once(BASE_ROOT_PATH . '/helper/message/msgutil.php');
 require_once(BASE_ROOT_PATH . '/helper/message/subscriber.php');
-require_once(BASE_ROOT_PATH . '/helper/index_tab.php');
-require_once(BASE_ROOT_PATH . '/helper/bonus_helper.php');
 require_once(BASE_ROOT_PATH . '/helper/session_helper.php');
 require_once(BASE_ROOT_PATH . '/helper/sms_helper.php');
-require_once(BASE_ROOT_PATH . '/helper/model_helper.php');
-require_once(BASE_ROOT_PATH . '/helper/category_helper.php');
-require_once(BASE_ROOT_PATH . '/helper/brand_helper.php');
-require_once(BASE_ROOT_PATH . '/helper/search/tcp_client.php');
-require_once(BASE_ROOT_PATH . '/helper/search/util.php');
-require_once(BASE_ROOT_PATH . '/helper/search_param.php');
-require_once(BASE_ROOT_PATH . '/helper/goods_helper.php');
-require_once(BASE_ROOT_PATH . '/helper/session_helper.php');
-require_once(BASE_ROOT_PATH . '/helper/login_helper.php');
-require_once(BASE_ROOT_PATH . '/helper/third_author/wxauthor.php');
-require_once(BASE_ROOT_PATH . '/helper/fcode/present_manager.php');
-require_once(BASE_ROOT_PATH . '/helper/url_helper.php');
-require_once(BASE_ROOT_PATH . '/helper/activity_helper.php');
+
 require_once(BASE_HELPER_PATH . '/refill/util.php');
 require_once(BASE_HELPER_PATH . '/fcgisrv/RAccServer.php');
 
@@ -52,5 +38,4 @@ StatesHelper::init();
 $listener = new message\subscriber($gMessageStates);
 $listener->start();
 
-fcgisrv\RAccServer::instance()->run_looper();
-
+fcgisrv\RAccServer::instance()->run_looper();

+ 1 - 1
test/TestElectric.php

@@ -33,7 +33,7 @@ class TestElectric extends TestCase
             "act" => "refill",
             "op" => "add_electric",
             'order_sn' => $this->make_sn(),
-            'notifyurl' => 'https://www.xyzshops.cn' . '/mobile/innercb.php',
+            'notifyurl' => 'https://www.xyzshops.cn' . '/mobile/notify/innercb.php',
             'cardno' => '1004638637',
             'amount' => 200,
             'company_type' => 'nation',

+ 1 - 1
test/TestPay.php

@@ -79,7 +79,7 @@ class TestAddData extends TestCase
 <trade_type><![CDATA[MWEB]]></trade_type>
 <transaction_id><![CDATA[4200000279201902260421273158]]></transaction_id>
 </xml>^M';
-        $resp = http_post_data('https://www.xyzshops.cn/mobile/web_wxnotify.php',$body);
+        $resp = http_post_data('https://www.xyzshops.cn/mobile/notify/web_wxnotify.php',$body);
     }
 
     public function testPostData()

Fichier diff supprimé car celui-ci est trop grand
+ 3 - 3
test/TestRBridge.php


+ 1 - 1
wsd_bridge.php

@@ -81,7 +81,7 @@ class WSDBridge
 
     private function relay_request($body)
     {
-        $url = BASE_SITE_URL . "/mobile/bridge_shr.php";
+        $url = BASE_SITE_URL . "/mobile/bridge/bridge_shr.php";
         $headers = ['Content-Type: application/json'];
 
         $resp = http_post_data($url, $body, $headers);