stanley-king 4 lat temu
rodzic
commit
c574e7d805

+ 2 - 3
helper/refill/api/lingzh/riying/RefillCallBack.php

@@ -34,11 +34,10 @@ class RefillCallBack implements refill\IRefillCallBack
         if (empty($order_info)) {
             return [false, false, false,false];
         }
-        $order_id = $order_info['order_id'];
-        
-        $data['official_sn'] = strtolower($params['VoucherContent']) == 'null' ? '' : $params['VoucherContent'];
 
+        $order_id = $order_info['order_id'];
         if ($status === 4) {
+            $data['official_sn'] = strtolower($params['VoucherContent']) == 'null' ? '' : $params['VoucherContent'];
             Model('refill_order')->edit($order_id, $data);
             return [$order_id, true, false,true];
         }

+ 4 - 3
helper/refill/api/lingzh/riying/RefillPhone.php

@@ -41,14 +41,15 @@ class RefillPhone extends refill\IRefillPhone
         else
         {
             Log::record($resp, Log::DEBUG);
+
             $resp = json_decode($resp ,true);
             if (empty($resp)) {
                 return [false, '系统错误', true];
-            }
-            if($resp['Code'] == 10012) {
+            } elseif ($resp['Code'] == 10012) {
                 return [true, $resp['SysOrderId'], false];
+            } else {
+                return [false, $resp['Message'], false];
             }
-            return [false , $resp['Message'], false];
         }
     }