rabin 1 tahun lalu
induk
melakukan
d5f8fffd9c
1 mengubah file dengan 9 tambahan dan 7 penghapusan
  1. 9 7
      src/dai/seller/api/Test.php

+ 9 - 7
src/dai/seller/api/Test.php

@@ -36,13 +36,15 @@ class Test
     {
     {
         while(1) {
         while(1) {
             $order = Dever::db('order', 'seller')->find(array('seller_id' => 1, 'status' => 2));
             $order = Dever::db('order', 'seller')->find(array('seller_id' => 1, 'status' => 2));
-            $msg = 'error';
+            if ($order) {
-            $update = array();
+                $msg = 'error';
-            $update['official_msg'] = '';
+                $update = array();
-            $update['official_order_num'] = '';
+                $update['official_msg'] = '';
-            $update['channel_callback'] = '';
+                $update['official_order_num'] = '';
-            $update['channel_callback_date'] = time();
+                $update['channel_callback'] = '';
-            Dever::load('order', 'seller')->notify($order, $msg, $update);
+                $update['channel_callback_date'] = time();
+                Dever::load('order', 'seller')->notify($order, $msg, $update);
+            }
         };
         };
     }
     }
 }
 }