Explorar el Código

add urldecode

stanley-king hace 9 años
padre
commit
89a992d0ac
Se han modificado 2 ficheros con 4 adiciones y 3 borrados
  1. 2 1
      helper/kdn_helper.php
  2. 2 2
      mobile/kdniao_notify.php

+ 2 - 1
helper/kdn_helper.php

@@ -6,6 +6,7 @@
  * Time: 下午5:10
  */
 
+require_once (BASE_CORE_PATH . "/framework/function/http.php");
 class kdn_helper
 {
     const req_url = 'http://api.kdniao.cc/Ebusiness/EbusinessOrderHandle.aspx';
@@ -42,7 +43,7 @@ class kdn_helper
         if($ret === false) {
             Log::record("kdn_helper::subscribe order_sn={$order_sn} error.",Log::ERR);
         } else {
-            Log::DEBUG("kdn_helper::subscribe ret={$ret}",Log::DEBUG);
+            Log::record("kdn_helper::subscribe ret={$ret}",Log::DEBUG);
         }
     }
 

+ 2 - 2
mobile/kdniao_notify.php

@@ -4,9 +4,9 @@ require_once(BASE_MOBILE_PATH . '/control/app_pay.php');
 require_once (BASE_DATA_PATH . '/logic/delivery.logic.php');
 
 $requestData = $_POST['RequestData'];  // 快递鸟数据
-$deliver_info = json_decode($requestData);
+$deliver_info = json_decode(urldecode($requestData));
 
-Log::record("kdniao_notify: post data {$requestData}",Log::ERR);
+Log::record("kdniao_notify: post data={$requestData}",Log::ERR);
 
 //数据不正确, 记录并退出
 if ($deliver_info === false || empty($deliver_info))