Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isVerified example
}
,
$licenseDomains
)
;
return
new
LicenseDomainCollection
(
$domains
)
;
}
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
)
;
}