Răsfoiți Sursa

fix bug: 顺丰下单时,如果余额不足,要正确返回

shizhongqi 9 luni în urmă
părinte
comite
6b45924728

+ 1 - 1
common/components/delivery/platform/shunfeng/Auth.php

@@ -21,7 +21,7 @@ class Auth
      */
     public function __construct()
     {
-        $isProduction = getenv('YII_ENV') == 'dev';
+        $isProduction = getenv('YII_ENV') == 'dev'; // TODO 先变更为测试
 
         if ($isProduction) {
             $this->appKey = 1594082399;

+ 2 - 2
common/components/delivery/services/adapter/ShunfengAdapter.php

@@ -158,8 +158,8 @@ class ShunfengAdapter extends Shunfeng implements Adapter
         }
 
         return [
-            'code' => (int)($resp['code'] ?? -1),
-            'msg' => $resp['msg'] ?? 'Unknown error',
+            'code' => $resp['error_code'] ?? -1,
+            'msg' => $resp['error_msg'] ?? 'Unknown error',
             'data' => null
         ];
     }