mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: use Dto class instead of array
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Service\Connector;
|
||||
|
||||
use App\Dto\Connector\DefaultProviderDto;
|
||||
use App\Dto\Connector\NamecheapProviderDto;
|
||||
use App\Entity\Domain;
|
||||
use Psr\Cache\CacheItemInterface;
|
||||
@@ -23,6 +24,9 @@ class NamecheapProvider extends AbstractProvider
|
||||
{
|
||||
protected string $dtoClass = NamecheapProviderDto::class;
|
||||
|
||||
/** @var NamecheapProviderDto */
|
||||
protected DefaultProviderDto $authData;
|
||||
|
||||
public const BASE_URL = 'https://api.namecheap.com/xml.response';
|
||||
public const SANDBOX_BASE_URL = 'https://api.sandbox.namecheap.com/xml.response';
|
||||
|
||||
@@ -88,9 +92,9 @@ class NamecheapProvider extends AbstractProvider
|
||||
{
|
||||
$actualParams = array_merge([
|
||||
'Command' => $command,
|
||||
'UserName' => $this->authData['ApiUser'],
|
||||
'ApiUser' => $this->authData['ApiUser'],
|
||||
'ApiKey' => $this->authData['ApiKey'],
|
||||
'UserName' => $this->authData->ApiUser,
|
||||
'ApiUser' => $this->authData->ApiUser,
|
||||
'ApiKey' => $this->authData->ApiKey,
|
||||
'ClientIp' => $this->outgoingIp,
|
||||
], $parameters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user