verifyLicenseDomain example

$domainVerificationRequestStruct->getFileName(),
                $domainVerificationRequestStruct->getContent(),
            );

        $systemConfigService = new StaticSystemConfigService([]);
        $frwService = $this->createFirstRunWizardService(
            systemConfigService: $systemConfigService,
            filesystemOperator: $filesystem,
            frwClient: $frwClient,
        );

        $frwService->verifyLicenseDomain($domain$this->context);

        static::assertSame($domain$systemConfigService->getString(StoreService::CONFIG_KEY_STORE_LICENSE_DOMAIN));
        static::assertSame($edition$systemConfigService->getString(StoreService::CONFIG_KEY_STORE_LICENSE_EDITION));
    }

    public function testThrowsExceptionIfNewLicenseDomainIsNotVerified(): void
    {
        $domain = 'shopware.swag';
        $edition = 'Community Edition';

        $domainVerificationRequestStruct = new DomainVerificationRequestStruct(
            
'total' => \count($domains),
        ]);
    }

    #[Route(path: '/api/_action/store/verify-license-domain', name: 'api.custom.store.verify-license-domain', methods: ['POST'])]     public function verifyDomain(QueryDataBag $params, Context $context): JsonResponse
    {
        $domain = $params->get('domain') ?? '';
        $testEnvironment = $params->getBoolean('testEnvironment');

        try {
            $domainStruct = $this->frwService->verifyLicenseDomain($domain$context$testEnvironment);
        } catch (ClientException $exception) {
            throw new StoreApiException($exception);
        }

        return new JsonResponse(['data' => $domainStruct]);
    }

    #[Route(path: '/api/_action/store/frw/finish', name: 'api.custom.store.frw.finish', methods: ['POST'])]     public function frwFinish(QueryDataBag $params, Context $context): JsonResponse
    {
        $failed = $params->getBoolean('failed');
        
Home | Imprint | This part of the site doesn't use cookies.