在laravel中 用easywechat 做网页授权 如何在测试环境获取生产环境中的openid 这个callback处怎么搞

public function handle($request, Closure $next)
    {
        $wechat = config('wechat');
        $app = new Application([
            'debug' => false,
            'app_id' => $wechat['app_id'],
            'secret' => $wechat['secret'],
            'token' => $wechat['token'],
            'log'   => [
                'level' => 'debug',
                'file'  => storage_path('logs/log.log'),
            ],
            'oauth' => [
                'scopes'  =>['snsapi_base'],
                'callback'  => '/callback',
            ]
        ]);
        
        $oauth = $app->oauth;
        if (env('APP_ENV') == 'local'){
            session(['openid_user' => 'test']);
        }
        $openid = session('openid_user');
        if (empty($openid)){
            return $oauth->redirect();
  }  
查看回复