From 55f9b2785c76daa4ecf40b2da28e9fd2867cc968 Mon Sep 17 00:00:00 2001 From: Nuryagdy Mustapayev Date: Sat, 18 Nov 2023 17:07:03 +0100 Subject: [PATCH] issue #165 EstV3pos added callbackUrl --- examples/_main_config.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/_main_config.php b/examples/_main_config.php index 1d4b36bc..cf0f5dee 100644 --- a/examples/_main_config.php +++ b/examples/_main_config.php @@ -19,18 +19,20 @@ $hostUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http')."://$_SERVER[HTTP_HOST]"; $subMenu = []; +$handler = new \Monolog\Handler\StreamHandler(__DIR__.'/../var/log/pos.log', \Psr\Log\LogLevel::DEBUG); +$logger = new \Monolog\Logger('pos', [$handler]); + function getGateway(\Mews\Pos\Entity\Account\AbstractPosAccount $account): ?\Mews\Pos\PosInterface { try { - $handler = new \Monolog\Handler\StreamHandler(__DIR__.'/../var/log/pos.log', \Psr\Log\LogLevel::DEBUG); - $logger = new \Monolog\Logger('pos', [$handler]); - /* $client = new HttpClient( new \Http\Client\Curl\Client(), new \Slim\Psr7\Factory\RequestFactory(), new \Slim\Psr7\Factory\StreamFactory() );*/ + global $logger; + $pos = \Mews\Pos\Factory\PosFactory::createPosGateway($account, null, null, $logger); $pos->setTestMode(true);