| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public static function SMSSend(SMSRecipient $recipient, $message = 'Test Message') |
||
| 22 | { |
||
| 23 | $client = new HttpClient(); |
||
| 24 | |||
| 25 | $send = urldecode($message); |
||
| 26 | $response = $client->request( |
||
| 27 | 'GET', |
||
| 28 | 'https://api.doluna.net/sms/send', |
||
| 29 | [ |
||
| 30 | 'query' => [ |
||
| 31 | 'api_service_key' => config('sms.dolunaAPIKey'), |
||
| 32 | 'msg_senderid' => config('sms.senderId'), |
||
| 33 | 'msg_to' => "{$recipient}", |
||
| 34 | 'msg_text' => $send, |
||
| 35 | 'msg_clientref' => config('sms.clientref'), |
||
| 36 | 'msg_dr' => config('sms.dr'), |
||
| 37 | 'output' => config('sms.output'), |
||
| 38 | 'type' => config('sms.type'), |
||
| 39 | ], |
||
| 40 | 'verify' => false |
||
| 41 | ] |
||
| 42 | ); |
||
| 43 | |||
| 44 | return $response->getBody()->getContents(); |
||
| 45 | } |
||
| 46 | |||
| 49 |