Skip to content

Commit

Permalink
chore: update Connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed Aug 6, 2024
1 parent e1cad45 commit e04e880
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Config/Connector/GandiConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ public function orderDomain(Domain $domain, bool $dryRun = false): void
$ownerLegalAge = $authData['ownerLegalAge'];
$waiveRetractationPeriod = $authData['waiveRetractationPeriod'];

if (false === $acceptConditions || false === $ownerLegalAge || false === $waiveRetractationPeriod) {
throw new \Exception('It is not possible to order a domain name if the legal conditions are not met');
if (true !== $acceptConditions
|| 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())
Expand Down
6 changes: 6 additions & 0 deletions src/Config/Connector/OvhConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public function orderDomain(Domain $domain, bool $dryRun = false): void
$ownerLegalAge = $authData['ownerLegalAge'];
$waiveRetractationPeriod = $authData['waiveRetractationPeriod'];

if (true !== $acceptConditions
|| true !== $ownerLegalAge
|| true !== $waiveRetractationPeriod) {
throw new HttpException(451, 'The user has not given explicit consent');
}

$conn = new Api(
$authData['appKey'],
$authData['appSecret'],
Expand Down

0 comments on commit e04e880

Please sign in to comment.