Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class DotpayApi |
||
8 | { |
||
9 | private $config; |
||
10 | private $client; |
||
11 | private $validator; |
||
12 | |||
13 | public function __construct($config) |
||
14 | { |
||
15 | $this->config = $config; |
||
16 | $this->client = new Client($this->config['username'], $this->config['password'], $this->config['base_url']); |
||
17 | $this->validator = new Validator($this->config['pin']); |
||
18 | } |
||
19 | |||
20 | public function createPayment($payment) |
||
21 | { |
||
22 | return $this->getPaymentUrl($this->client->makeRequest(new CreatePaymentLink($this->config['shop_id'], $payment))); |
||
23 | } |
||
24 | |||
25 | public function getPaymentUrl($payment) |
||
26 | { |
||
27 | return $payment->payment_url; |
||
28 | } |
||
29 | |||
30 | public function verifyCallback($data) |
||
33 | } |
||
34 | |||
35 | public function paidStatus($status) |
||
38 | } |
||
39 | } |