stanley-king 3 年 前
コミット
ef9380187e
1 ファイル変更8 行追加1 行削除
  1. 8 1
      helper/refill/api/test/baidu/RefillPhone.php

+ 8 - 1
helper/refill/api/test/baidu/RefillPhone.php

@@ -33,7 +33,14 @@ class RefillPhone extends refill\IRefillPhone
     {
         Log::record("start request",Log::DEBUG);
         sleep(1);
-        $resp = http_request(config::NOTIFY_URL,['status' => 1,'order_sn' => $params['order_sn']]);
+        $status = mt_rand(0,5);
+        if($status > 3) {
+            $status = 1;
+        } else {
+            $status = 0;
+        }
+
+        $resp = http_request(config::NOTIFY_URL,['status' => $status,'order_sn' => $params['order_sn']]);
         Log::record("resp={$resp}",Log::DEBUG);
         return [true , '',false];
     }