checkVerificationSecret example



    public function verifyLicenseDomain(string $domain, Context $context, bool $testEnvironment = false): LicenseDomainStruct
    {
        $domains = $this->getLicenseDomains($context);

        $existing = $domains->get($domain);
        if (!$existing || !$existing->isVerified()) {
            $secretResponse = $this->frwClient->fetchVerificationInfo($domain$context);
            $secret = new DomainVerificationRequestStruct($secretResponse['content']$secretResponse['fileName']);
            $this->storeVerificationSecret($domain$secret);
            $this->frwClient->checkVerificationSecret($domain$context$testEnvironment);

            $domains = $this->getLicenseDomains($context);
            $existing = $domains->get($domain);
        }

        if (!$existing || !$existing->isVerified()) {
            throw new LicenseDomainVerificationException($domain);
        }
        $existing->assign(['active' => true]);

        $this->configService->set(StoreService::CONFIG_KEY_STORE_LICENSE_DOMAIN, $domain);
        
'headers' => [],
                    'json' => [
                        'domain' => 'shopware.swag',
                        'shopwareVersion' => '',
                        'testEnvironment' => true,
                    ],
                ],
            ],
            []
        );

        $frwClient->checkVerificationSecret('shopware.swag', $this->context, true);
    }

    public function testFetchVerificationInfo(): void
    {
        $verificationInfo = [
            [
                'content' => 'sw-v3rific4t0n-h4sh',
                'fileName' => 'sw-domain-hash.html',
            ],
        ];

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