From 3bd043bde7136f33e26e32a49c88d58ff51725e8 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sun, 14 Jun 2020 13:44:35 +0800 Subject: [PATCH] =?UTF-8?q?Kkt::setCallbackUrl()=20-=20=D0=A4=D0=B8=D0=BA?= =?UTF-8?q?=D1=81=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20cal?= =?UTF-8?q?lback=5Furl=20=D0=BF=D0=BE=20=D1=80=D0=B5=D0=B3=D1=83=D0=BB?= =?UTF-8?q?=D1=8F=D1=80=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AtolOnline/Api/Kkt.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AtolOnline/Api/Kkt.php b/src/AtolOnline/Api/Kkt.php index ba88a1d..54c2d45 100644 --- a/src/AtolOnline/Api/Kkt.php +++ b/src/AtolOnline/Api/Kkt.php @@ -183,8 +183,8 @@ class Kkt extends Client { if (valid_strlen($url) > Constraints::MAX_LENGTH_CALLBACK_URL) { throw new AtolCallbackUrlTooLongException($url, Constraints::MAX_LENGTH_CALLBACK_URL); - } elseif (preg_match(Constraints::PATTERN_CALLBACK_URL, $url)) { - throw new AtolInvalidCallbackUrlException(); + } elseif (!preg_match(Constraints::PATTERN_CALLBACK_URL, $url)) { + throw new AtolInvalidCallbackUrlException('Callback URL not matches with pattern'); } $this->kkt_config[$this->isTestMode() ? 'test' : 'prod']['callback_url'] = $url; return $this;