mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
chore: update Connectors
This commit is contained in:
@@ -43,8 +43,10 @@ readonly class GandiConnector implements ConnectorInterface
|
|||||||
$ownerLegalAge = $authData['ownerLegalAge'];
|
$ownerLegalAge = $authData['ownerLegalAge'];
|
||||||
$waiveRetractationPeriod = $authData['waiveRetractationPeriod'];
|
$waiveRetractationPeriod = $authData['waiveRetractationPeriod'];
|
||||||
|
|
||||||
if (false === $acceptConditions || false === $ownerLegalAge || false === $waiveRetractationPeriod) {
|
if (true !== $acceptConditions
|
||||||
throw new \Exception('It is not possible to order a domain name if the legal conditions are not met');
|
|| true !== $ownerLegalAge
|
||||||
|
|| true !== $waiveRetractationPeriod) {
|
||||||
|
throw new HttpException(451, 'The user has not given explicit consent');
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = $this->client->request('GET', '/v5/organization/user-info', (new HttpOptions())
|
$user = $this->client->request('GET', '/v5/organization/user-info', (new HttpOptions())
|
||||||
|
|||||||
@@ -57,6 +57,12 @@ readonly class OvhConnector implements ConnectorInterface
|
|||||||
$ownerLegalAge = $authData['ownerLegalAge'];
|
$ownerLegalAge = $authData['ownerLegalAge'];
|
||||||
$waiveRetractationPeriod = $authData['waiveRetractationPeriod'];
|
$waiveRetractationPeriod = $authData['waiveRetractationPeriod'];
|
||||||
|
|
||||||
|
if (true !== $acceptConditions
|
||||||
|
|| true !== $ownerLegalAge
|
||||||
|
|| true !== $waiveRetractationPeriod) {
|
||||||
|
throw new HttpException(451, 'The user has not given explicit consent');
|
||||||
|
}
|
||||||
|
|
||||||
$conn = new Api(
|
$conn = new Api(
|
||||||
$authData['appKey'],
|
$authData['appKey'],
|
||||||
$authData['appSecret'],
|
$authData['appSecret'],
|
||||||
|
|||||||
Reference in New Issue
Block a user