Total Complexity | 3 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class PayPal |
||
10 | { |
||
11 | use PayPalAPIRequest; |
||
|
|||
12 | use PayPalVerifyIPN; |
||
13 | |||
14 | /** |
||
15 | * PayPal constructor. |
||
16 | * |
||
17 | * @param array $config |
||
18 | * |
||
19 | * @throws Exception |
||
20 | */ |
||
21 | public function __construct(array $config = []) |
||
22 | { |
||
23 | // Setting PayPal API Credentials |
||
24 | $this->setConfig($config); |
||
25 | |||
26 | $this->httpBodyParam = 'form_params'; |
||
27 | |||
28 | $this->options = []; |
||
29 | |||
30 | $this->setRequestHeader('Accept', 'application/json'); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Set ExpressCheckout API endpoints & options. |
||
35 | * |
||
36 | * @param array $credentials |
||
37 | */ |
||
38 | protected function setOptions(array $credentials): void |
||
57 | } |
||
58 | } |
||
59 |