updateFrwUserToken example


        $this->trackingEventClient->fireTrackingEvent(self::TRACKING_EVENT_FRW_STARTED);

        $this->eventDispatcher->dispatch(new FirstRunWizardStartedEvent($this->getFrwState()$context));
    }

    public function frwLogin(string $shopwareId, string $password, Context $context): void
    {
        $accessTokenResponse = $this->frwClient->frwLogin($shopwareId$password$context);
        $accessToken = $this->createAccessTokenStruct($accessTokenResponse$accessTokenResponse['firstRunWizardUserToken']);

        $this->updateFrwUserToken($context$accessToken);
    }

    public function upgradeAccessToken(Context $context): void
    {
        $accessTokenResponse = $this->frwClient->upgradeAccessToken($context);
        $accessToken = $this->createAccessTokenStruct($accessTokenResponse$accessTokenResponse['shopUserToken']);

        $this->storeService->updateStoreToken($context$accessToken);
        $this->configService->set(StoreRequestOptionsProvider::CONFIG_KEY_STORE_SHOP_SECRET, $accessToken->getShopSecret());
        $this->removeFrwUserToken($context);
    }

    
Home | Imprint | This part of the site doesn't use cookies.