stanley-king 6 lat temu
rodzic
commit
205b947272

+ 1 - 1
data/logic/queue.logic.php

@@ -594,7 +594,7 @@ class queueLogic
         }
 
         try {
-            kdn_helper::subscribe($param['order_sn']);
+            kdn_helper_back::subscribe($param['order_sn']);
         } catch (Exception $e) {
             Log::record("kdn_helper: fall error\treturn:" . $e->getMessage() . "\t param:" . json_encode($param));
         }

+ 3 - 1
helper/kdn_helper.php

@@ -6,7 +6,9 @@
  * Time: 下午7:44
  */
 
-class kdn_helper_new
+require_once (BASE_CORE_PATH . "/framework/function/http.php");
+
+class kdn_helper
 {
     private static $EBusinessID = 1366783;
     private static $AppKey    = "e62955d6-4871-4740-9ec9-62068a544ab5";

+ 2 - 3
helper/kdn_helper_back.php

@@ -7,7 +7,7 @@
  */
 
 require_once (BASE_CORE_PATH . "/framework/function/http.php");
-class kdn_helper
+class kdn_helper_back
 {
     const req_url = 'http://api.kdniao.cc/Ebusiness/EbusinessOrderHandle.aspx';
 
@@ -112,5 +112,4 @@ class kdn_helper
             }
         }
     }
-}
-
+}

+ 1 - 1
mobile/control/member_order.php

@@ -349,7 +349,7 @@ class member_orderControl extends mbMemberControl
         $deliver_info = rkcache($key);
         if (empty($deliver_info))
         {
-            $deliver_info = kdn_helper::query($e_code, $order_info['shipping_code']);
+            $deliver_info = kdn_helper_back::query($e_code, $order_info['shipping_code']);
             if ($deliver_info === false || empty($deliver_info)) {
                 return self::outsuccess(NULL,'express/error','wap');
             }

+ 4 - 4
mobile/kdniao_notify.php

@@ -27,18 +27,18 @@ if (!empty($requestData))
     {
         Log::record("start handle....",Log::DEBUG);
         $count = intval($deliver_info['Count']);
-        if($count <= 0 || $deliver_info['EBusinessID'] != kdn_helper_new::cur_businessid()) {
+        if($count <= 0 || $deliver_info['EBusinessID'] != kdn_helper::cur_businessid()) {
             $success = false;
-            $reson = "count={$count} or EBusinessID = {$deliver_info['EBusinessID']} != " . kdn_helper_new::cur_businessid();
+            $reson = "count={$count} or EBusinessID = {$deliver_info['EBusinessID']} != " . kdn_helper::cur_businessid();
         }
         else
         {
             foreach($deliver_info['Data'] as $item) {
-                kdn_helper_new::onCallback($item);
+                kdn_helper::onCallback($item);
             }
         }
     }
 
-    echo (json_encode(array('EBusinessID' => kdn_helper_new::cur_businessid(),'UpdateTime' => strftime("%Y-%m-%d %H:%M:%S",time()), 'Success' => $success,'Reason' => $reson)));
+    echo (json_encode(array('EBusinessID' => kdn_helper::cur_businessid(),'UpdateTime' => strftime("%Y-%m-%d %H:%M:%S",time()), 'Success' => $success,'Reason' => $reson)));
 }
 ?>

+ 2 - 2
test/TestKdniao.php

@@ -29,7 +29,7 @@ class TestKdniao extends PHPUnit_Framework_TestCase
         $e_code     = "ZTO";
         $logisticCode   = "457209987858";
 
-        $ret = kdn_helper_new::query($e_code, $logisticCode);
+        $ret = kdn_helper::query($e_code, $logisticCode);
 
         var_dump($ret);
     }
@@ -40,7 +40,7 @@ class TestKdniao extends PHPUnit_Framework_TestCase
         $e_code     = "ZTO";
         $logisticCode   = "457209987858";
 
-        $subs = kdn_helper_new::req_subscribe($e_code, $logisticCode, $order_sn);
+        $subs = kdn_helper::req_subscribe($e_code, $logisticCode, $order_sn);
 
         var_dump($subs);
     }