Parcourir la source

Merge branch 'rtest' of 39.97.239.116:gyfl/xyzshop into rtest

stanley-king il y a 3 ans
Parent
commit
f67795925f

+ 9 - 1
helper/refill/api/lingzh/weishengyjd/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/lingzh/weishengyjd/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/lingzh/weishengysix/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/lingzh/weishengysix/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/lingzh/weishengywt/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/lingzh/weishengywt/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/bingdht/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/bingdht/config.php

@@ -19,4 +19,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/qijutang/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/qijutang/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/suyuan/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/suyuan/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/weiyiwt/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/weiyiwt/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/yinteng/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/yinteng/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/yonghe/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/yonghe/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/yunchonggong/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/yunchonggong/config.php

@@ -19,4 +19,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/yunchonggongman/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/yunchonggongman/config.php

@@ -19,4 +19,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }

+ 9 - 1
helper/refill/api/xyz/zhongst/RefillPhone.php

@@ -45,11 +45,19 @@ class RefillPhone extends refill\IRefillPhone
         {
             Log::record($resp, Log::DEBUG);
             $resp = json_decode($resp, true);
+            $nRtn = intval($resp['nRtn']);
             if (empty($resp)) {
                 return [false, '网络错误', true];
-            } elseif ($resp['nRtn'] == 0) {
+            } elseif ($nRtn == 0) {
                 return [true, '', false];
+            } elseif (in_array($nRtn, config::ERR_NO)) {
+                return [false, $resp['szRtnCode'], false];
+            } elseif (in_array($nRtn, [2050, 999])) {
+                $net_errno = "HTTP-{$nRtn}";
+                return [false, $resp['szRtnCode'], false];
             } else {
+                $err = CURLE_GOT_NOTHING;
+                $net_errno = "HTTP-{$err}";
                 return [false, $resp['szRtnCode'], false];
             }
         }

+ 4 - 0
helper/refill/api/xyz/zhongst/config.php

@@ -18,4 +18,8 @@ class config
         mtopcard\ChinaTelecomCard => 3
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
+
+    const ERR_NO = [
+        1000,1001,1003,1004,2001,2002,2003,2020,2021,1006,2030,3003
+    ];
 }