liuzejian há 1 ano atrás
pai
commit
7d9364d34b

+ 6 - 0
modules/Channel/Http/Controllers/WechatOpenPlatformController.php

@@ -67,6 +67,12 @@ class WechatOpenPlatformController extends CatchController
         $app->setCache(new RedisAdapter(Redis::client()));
         $server = $app->getServer();
 
+        $server->handleVerifyTicketRefreshed(function($message, \Closure $next) {
+            myLog('authorCommand')->info('handleVerifyTicketRefreshed', ['message' => $message]);
+            return $next($message);
+        });
+
+
         $server->handleAuthorized(function($message, \Closure $next) {
             myLog('authorCommand')->info('handleAuthorized', ['message' => $message]);
             return $next($message);

+ 0 - 3
modules/Channel/Services/WechatOpenPlatform/WechatOpenPlatformService.php

@@ -42,9 +42,6 @@ class WechatOpenPlatformService
      * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
      */
     public static function buildApplication($componentInfo) {
-        if(!$componentInfo) {
-            CommonBusinessException::throwError(Errors::OPENPLATFORM_COMPANY_INFO_NOT_EXISTS);
-        }
         $config = [
             'app_id' => $componentInfo->app_id, // 开放平台账号的 appid
             'secret' => $componentInfo->secret,   // 开放平台账号的 secret