|
@@ -1,14 +1,16 @@
|
|
|
<?php
|
|
<?php
|
|
|
|
|
+
|
|
|
declare(strict_types=1);
|
|
declare(strict_types=1);
|
|
|
|
|
+
|
|
|
namespace SixShop\AliyunIDCard;
|
|
namespace SixShop\AliyunIDCard;
|
|
|
|
|
|
|
|
use Symfony\Component\HttpClient\HttpClient;
|
|
use Symfony\Component\HttpClient\HttpClient;
|
|
|
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|
|
|
|
+
|
|
|
use function SixShop\Core\throw_logic_exception;
|
|
use function SixShop\Core\throw_logic_exception;
|
|
|
|
|
|
|
|
class IDCardClient
|
|
class IDCardClient
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
private const string GATEWAY = 'https://idcard.market.alicloudapi.com/';
|
|
private const string GATEWAY = 'https://idcard.market.alicloudapi.com/';
|
|
|
|
|
|
|
|
private HttpClientInterface $httpClient;
|
|
private HttpClientInterface $httpClient;
|
|
@@ -45,4 +47,4 @@ class IDCardClient
|
|
|
throw_logic_exception($this->errorMesageMap[$result['resp']['code']] ?? $result['resp']['desc']);
|
|
throw_logic_exception($this->errorMesageMap[$result['resp']['code']] ?? $result['resp']['desc']);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|