* HOST split into two parts
This commit is contained in:
parent
9e1809e6ae
commit
3cbbc85e43
@ -25,7 +25,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|||||||
*/
|
*/
|
||||||
final class LightSmsTransport extends AbstractTransport
|
final class LightSmsTransport extends AbstractTransport
|
||||||
{
|
{
|
||||||
protected const HOST = 'www.lightsms.com/external/get/send.php';
|
protected const HOST = 'www.lightsms.com';
|
||||||
|
|
||||||
private $login;
|
private $login;
|
||||||
private $password;
|
private $password;
|
||||||
@ -78,13 +78,8 @@ final class LightSmsTransport extends AbstractTransport
|
|||||||
'39' => 'Phone number is not exist in this base',
|
'39' => 'Phone number is not exist in this base',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(string $login, string $password, string $phone, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
|
||||||
string $login,
|
{
|
||||||
string $password,
|
|
||||||
string $phone,
|
|
||||||
HttpClientInterface $client = null,
|
|
||||||
EventDispatcherInterface $dispatcher = null
|
|
||||||
) {
|
|
||||||
$this->login = $login;
|
$this->login = $login;
|
||||||
$this->password = $password;
|
$this->password = $password;
|
||||||
$this->phone = $phone;
|
$this->phone = $phone;
|
||||||
@ -113,7 +108,7 @@ final class LightSmsTransport extends AbstractTransport
|
|||||||
$signature = $this->generateSignature();
|
$signature = $this->generateSignature();
|
||||||
|
|
||||||
$endpoint = sprintf(
|
$endpoint = sprintf(
|
||||||
'https://%s?login=%s&signature=%s&phone=%s&text=%s&sender=%s×tamp=%s',
|
'https://%s/external/get/send.php?login=%s&signature=%s&phone=%s&text=%s&sender=%s×tamp=%s',
|
||||||
$this->getEndpoint(),
|
$this->getEndpoint(),
|
||||||
$this->login,
|
$this->login,
|
||||||
$signature,
|
$signature,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
LightSms Notifier
|
LightSms Notifier
|
||||||
====================
|
===============
|
||||||
|
|
||||||
Provides [LightSms](https://www.lightsms.com/) integration for Symfony Notifier.
|
Provides [LightSms](https://www.lightsms.com/) integration for Symfony Notifier.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user