1 | <?php |
||
16 | class Gateway |
||
17 | { |
||
18 | const API_URL = 'https://api.cmpayments.com/'; |
||
19 | |||
20 | const REQUEST_METHOD_POST = 'POST'; |
||
21 | const REQUEST_METHOD_GET = 'GET'; |
||
22 | |||
23 | /** |
||
24 | * @var HttpClient |
||
25 | */ |
||
26 | private $httpClient; |
||
27 | |||
28 | /** |
||
29 | * Gateway constructor. |
||
30 | * @param Credentials $credentials |
||
31 | * @param HttpClient|null $httpClient |
||
32 | */ |
||
33 | 5 | public function __construct(Credentials $credentials, HttpClient $httpClient = null) |
|
51 | |||
52 | /** |
||
53 | * Execute a request against the Payments API. |
||
54 | * |
||
55 | * @param RequestInterface $request |
||
56 | * @return array |
||
57 | */ |
||
58 | 4 | public function execute(RequestInterface $request) |
|
70 | } |
||
71 |