1
0
mirror of synced 2024-11-25 06:26:05 +03:00
This commit is contained in:
Alexey Chelnakov 2018-06-20 11:47:50 +03:00
parent 665b56f58a
commit b253642b6f
2 changed files with 4 additions and 22 deletions

View File

@ -7,8 +7,8 @@ use Doctrine\Common\Cache\Cache;
use Guzzle\Http\Client; use Guzzle\Http\Client;
use Guzzle\Http\Exception\BadResponseException;
use Guzzle\Http\Message\Response; use Guzzle\Http\Message\Response;
use GuzzleHttp\Exception\BadResponseException;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
class AtolOnlineApi class AtolOnlineApi
@ -65,6 +65,9 @@ class AtolOnlineApi
$this->login = $connectionConfig->login; $this->login = $connectionConfig->login;
$this->pass = $connectionConfig->pass; $this->pass = $connectionConfig->pass;
$this->groupCode = $connectionConfig->group; $this->groupCode = $connectionConfig->group;
if (!$connectionConfig->version) {
$connectionConfig->version = self::API_VERSION_V3;
}
$this->version = $connectionConfig->version; $this->version = $connectionConfig->version;
$this->debug = $connectionConfig->isDebug(); $this->debug = $connectionConfig->isDebug();
$this->attempts = 0; $this->attempts = 0;

View File

@ -26,27 +26,6 @@ class Configuration implements ConfigurationInterface
$metadata->addPropertyConstraint('connections', new Assert\Valid()); $metadata->addPropertyConstraint('connections', new Assert\Valid());
} }
// public function loadConnections($connections)
// {
// if (!$connections) {
// return;
// }
// foreach ($connections as $connectionItem) {
// $connection = new Connection();
// $connection->login = $connectionItem['login'];
// $connection->pass = $connectionItem['pass'];
// $connection->group = $connectionItem['group'];
//// $connection->legalEntity = $connectionItem['legalEntity'];
// $connection->sno = $connectionItem['sno'];
// $connection->enabled = (bool) $connectionItem['enabled'];
//// $connection->paymentTypes = $connectionItem['paymentTypes'];
//// $connection->paymentStatuses = $connectionItem['paymentStatuses'];
// $connection->ofd = $connectionItem['ofd'];
// $connection->version = $connectionItem['version'];
// $this->connections[] = $connection;
// }
// }
/** /**
* @param bool $enabled * @param bool $enabled
*/ */