mirror of
https://github.com/anthonyaxenov/atol-online.git
synced 2024-12-22 12:54:53 +00:00
В тестовом режиме установка логина и пароля теперь необязательна
This commit is contained in:
parent
b499d998e3
commit
dc20d3e08e
@ -115,10 +115,12 @@ class Kkt extends Client
|
||||
*/
|
||||
public function setLogin(string $login)
|
||||
{
|
||||
if (empty($login)) {
|
||||
throw new AtolKktLoginEmptyException();
|
||||
} elseif (strlen($login) > 100) {
|
||||
throw new AtolKktLoginTooLongException($login, 100);
|
||||
if (!$this->isTestMode()) {
|
||||
if (empty($login)) {
|
||||
throw new AtolKktLoginEmptyException();
|
||||
} elseif (strlen($login) > 100) {
|
||||
throw new AtolKktLoginTooLongException($login, 100);
|
||||
}
|
||||
}
|
||||
$this->kkt_config['prod']['login'] = $login;
|
||||
return $this;
|
||||
@ -143,8 +145,10 @@ class Kkt extends Client
|
||||
*/
|
||||
public function setPassword(string $password)
|
||||
{
|
||||
if (empty($password)) {
|
||||
throw new AtolKktPasswordEmptyException();
|
||||
if (!$this->isTestMode()) {
|
||||
if (empty($password)) {
|
||||
throw new AtolKktPasswordEmptyException();
|
||||
}
|
||||
}
|
||||
$this->kkt_config['prod']['pass'] = $password;
|
||||
return $this;
|
||||
|
Loading…
Reference in New Issue
Block a user