Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
6 | class Payment extends ApiResource |
||
7 | { |
||
8 | const OBJECT_NAME = 'payments'; |
||
9 | |||
10 | /** |
||
11 | * @param array $params |
||
12 | * @return array|object |
||
13 | * @throws Exceptions\InvalidArgumentException |
||
14 | * @throws Exceptions\IsNullException |
||
15 | * @link https://docs.mono.co/reference#initiate-payment |
||
16 | */ |
||
17 | public static function initiate(array $params) |
||
18 | { |
||
19 | $url = self::endPointUrl("initiate"); |
||
20 | |||
21 | return self::staticRequest('POST', $url, $params); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param string $paymentId |
||
26 | * @return array|object |
||
27 | * @throws Exceptions\InvalidArgumentException |
||
28 | * @throws Exceptions\IsNullException |
||
29 | * @link https://docs.mono.co/reference#pull-status |
||
30 | */ |
||
31 | public static function onetimeDebitStatus(string $paymentId) |
||
32 | { |
||
33 | $url = self::endPointUrl("debits/{$paymentId}"); |
||
34 | |||
35 | return self::staticRequest('GET', $url); |
||
36 | } |
||
37 | |||
38 | public static function recurringDebitStatus(string $paymentId) |
||
43 | } |
||
44 | } |
||
45 |