Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | protected function verifyResponse(ResponseInterface $response) |
||
12 | { |
||
13 | if(in_array($response->getStatusCode(), [200, 201])) { |
||
14 | //https://developers.paystack.co/v1.0/docs/errors |
||
15 | return; |
||
16 | } |
||
17 | |||
18 | throw new InvalidHttpResponseException( |
||
19 | "Invalid HTTP response. Expected 200 or 201 but got {$response->getStatusCode()}" |
||
20 | ); |
||
21 | } |
||
22 | } |
||
23 |