* LightSmsTransport.php - better to remove if we do not have it?
This commit is contained in:
parent
83d259832b
commit
a197deeed1
@ -26,14 +26,13 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|||||||
*/
|
*/
|
||||||
final class LightSmsTransport extends AbstractTransport
|
final class LightSmsTransport extends AbstractTransport
|
||||||
{
|
{
|
||||||
protected const HOST = 'www.lightsms.com';
|
protected const HOST = 'lightsms.com';
|
||||||
|
|
||||||
private $login;
|
private $login;
|
||||||
private $password;
|
private $password;
|
||||||
private $from;
|
private $from;
|
||||||
|
|
||||||
private const ERROR_CODES = [
|
private const ERROR_CODES = [
|
||||||
000 => 'Service unavailable',
|
|
||||||
1 => 'Missing Signature',
|
1 => 'Missing Signature',
|
||||||
2 => 'Login not specified',
|
2 => 'Login not specified',
|
||||||
3 => 'Text not specified',
|
3 => 'Text not specified',
|
||||||
@ -119,6 +118,8 @@ final class LightSmsTransport extends AbstractTransport
|
|||||||
|
|
||||||
$content = $response->toArray(false);
|
$content = $response->toArray(false);
|
||||||
|
|
||||||
|
dump($content); die();
|
||||||
|
|
||||||
// it happens if the host without www
|
// it happens if the host without www
|
||||||
if (isset($content['']) && isset($content['']['error'])) {
|
if (isset($content['']) && isset($content['']['error'])) {
|
||||||
throw new TransportException('Unable to send the SMS: '.self::ERROR_CODES[$content['']['error']], $response);
|
throw new TransportException('Unable to send the SMS: '.self::ERROR_CODES[$content['']['error']], $response);
|
||||||
|
Reference in New Issue
Block a user