chore: update Connectors

This commit is contained in:
Maël Gangloff 2024-08-06 23:21:01 +02:00
parent e1cad45028
commit e04e880d33
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629
2 changed files with 10 additions and 2 deletions

View File

@ -43,8 +43,10 @@ readonly class GandiConnector implements ConnectorInterface
$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())

View File

@ -57,6 +57,12 @@ readonly class OvhConnector implements ConnectorInterface
$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'],