Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function send($mobileNumber, $message) |
||
31 | { |
||
32 | try { |
||
33 | $this->client->get('/index.php', [ |
||
34 | 'query' => [ |
||
35 | 'app' => 'ws', |
||
36 | 'u' => $this->username, |
||
37 | 'h' => $this->apiKey, |
||
38 | 'op' => 'pv', |
||
39 | 'to' => $mobileNumber, |
||
40 | 'msg' => $message, |
||
41 | ], |
||
42 | ]); |
||
43 | } catch (RequestException $e) { |
||
44 | throw new CouldNotSendNotification("Failed to call PlaySMS API. Endpoint responded with {$e->getCode()}."); |
||
45 | } |
||
46 | } |
||
47 | } |
||
48 |