1 | <?php |
||
8 | class Verifier |
||
9 | { |
||
10 | const STATUS_KEYWORD_VERIFIED = 'VERIFIED'; |
||
11 | const STATUS_KEYWORD_INVALID = 'INVALID'; |
||
12 | |||
13 | /** |
||
14 | * @var HttpClient |
||
15 | */ |
||
16 | private $httpClient; |
||
17 | |||
18 | /** |
||
19 | * @var MessageFactory |
||
20 | */ |
||
21 | private $messageFactory; |
||
22 | |||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | private $useSandbox; |
||
27 | |||
28 | public function __construct(HttpClient $httpClient, MessageFactory $messageFactory, $useSandbox = false) |
||
34 | |||
35 | /** |
||
36 | * @param array $datas |
||
37 | * |
||
38 | * @return bool |
||
39 | * |
||
40 | * @throws \UnexpectedValueException |
||
41 | */ |
||
42 | public function verify(array $datas) |
||
54 | |||
55 | /** |
||
56 | * @param array $datas |
||
57 | * |
||
58 | * @return \Psr\Http\Message\RequestInterface |
||
59 | */ |
||
60 | protected function createRequest(array $datas) |
||
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | protected function getServiceEndpoint() |
||
76 | } |
||
77 |