Browse Source

代支付流程

whitefang 1 year ago
parent
commit
5f2455ea78
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/common/service/pay/WorkerWeChatPayService.php

+ 3 - 1
app/common/service/pay/WorkerWeChatPayService.php

@@ -57,7 +57,9 @@ class WorkerWeChatPayService extends BasePayService
         $this->terminal = $terminal;
         $this->config = WeChatConfigService::getPayConfigByTerminal($terminal);
         $this->app = new Application($this->config);
-        $this->auth = MasterWorkerAuth::where(['worker_id' => $userId, 'terminal' => $terminal])->findOrEmpty();
+        if ($userId !== null) {
+            $this->auth = MasterWorkerAuth::where(['worker_id' => $userId, 'terminal' => $terminal])->findOrEmpty();
+        }
     }