1 | <?php |
||
11 | class Everypay |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | const VERSION = '2.4.0'; |
||
17 | |||
18 | public static $isTest = false; |
||
19 | |||
20 | public static $throwExceptions = false; |
||
21 | |||
22 | /** |
||
23 | * API request key. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected static $apiKey = null; |
||
28 | |||
29 | /** |
||
30 | * EveryPay API url. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected static $apiUrl = 'https://api.everypay.gr'; |
||
35 | |||
36 | protected static $testApiUrl = 'https://sandbox-api.everypay.gr'; |
||
37 | |||
38 | /** |
||
39 | * Check for needed requirements. |
||
40 | * |
||
41 | * @throws Everypay\Exception\RuntimeException |
||
42 | */ |
||
43 | public static function checkRequirements() |
||
56 | |||
57 | /** |
||
58 | * Set an API key for the request. |
||
59 | * |
||
60 | * @param string $key |
||
61 | */ |
||
62 | public static function setApiKey($key) |
||
66 | |||
67 | /** |
||
68 | * Get the API Key. |
||
69 | * |
||
70 | * @return string |
||
71 | * @throws Everypay\Exception\RuntimeException |
||
72 | */ |
||
73 | public static function getApiKey() |
||
83 | |||
84 | /** |
||
85 | * Set the API url for the request. |
||
86 | * |
||
87 | * @param string $url |
||
88 | * @throws Everypay\Exception\InvalidArgumentException |
||
89 | */ |
||
90 | public static function setApiUrl($url) |
||
102 | |||
103 | /** |
||
104 | * Get the API url. |
||
105 | * |
||
106 | * @return string |
||
107 | */ |
||
108 | public static function getApiUrl() |
||
114 | |||
115 | public static function throwExceptions() |
||
119 | |||
120 | /** |
||
121 | * Reset Everypay class to its default values |
||
122 | * |
||
123 | * @return void |
||
124 | */ |
||
125 | public static function reset() |
||
131 | } |
||
132 |