* HOST split into two parts

This commit is contained in:
Vasilij Dusko 2021-03-28 15:58:51 +03:00 committed by Vasilij Dusko | CREATION
parent 9e1809e6ae
commit 3cbbc85e43
2 changed files with 5 additions and 10 deletions

View File

@ -25,7 +25,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
*/
final class LightSmsTransport extends AbstractTransport
{
protected const HOST = 'www.lightsms.com/external/get/send.php';
protected const HOST = 'www.lightsms.com';
private $login;
private $password;
@ -78,13 +78,8 @@ final class LightSmsTransport extends AbstractTransport
'39' => 'Phone number is not exist in this base',
];
public function __construct(
string $login,
string $password,
string $phone,
HttpClientInterface $client = null,
EventDispatcherInterface $dispatcher = null
) {
public function __construct(string $login, string $password, string $phone, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
{
$this->login = $login;
$this->password = $password;
$this->phone = $phone;
@ -113,7 +108,7 @@ final class LightSmsTransport extends AbstractTransport
$signature = $this->generateSignature();
$endpoint = sprintf(
'https://%s?login=%s&signature=%s&phone=%s&text=%s&sender=%s&timestamp=%s',
'https://%s/external/get/send.php?login=%s&signature=%s&phone=%s&text=%s&sender=%s&timestamp=%s',
$this->getEndpoint(),
$this->login,
$signature,

View File

@ -1,5 +1,5 @@
LightSms Notifier
====================
===============
Provides [LightSms](https://www.lightsms.com/) integration for Symfony Notifier.