mirror of
https://github.com/anthonyaxenov/atol-online.git
synced 2025-01-03 10:29:21 +00:00
Kkt::setCallbackUrl() - Фикс проверки callback_url по регулярке
This commit is contained in:
parent
7c8ee85b89
commit
3bd043bde7
@ -183,8 +183,8 @@ class Kkt extends Client
|
|||||||
{
|
{
|
||||||
if (valid_strlen($url) > Constraints::MAX_LENGTH_CALLBACK_URL) {
|
if (valid_strlen($url) > Constraints::MAX_LENGTH_CALLBACK_URL) {
|
||||||
throw new AtolCallbackUrlTooLongException($url, Constraints::MAX_LENGTH_CALLBACK_URL);
|
throw new AtolCallbackUrlTooLongException($url, Constraints::MAX_LENGTH_CALLBACK_URL);
|
||||||
} elseif (preg_match(Constraints::PATTERN_CALLBACK_URL, $url)) {
|
} elseif (!preg_match(Constraints::PATTERN_CALLBACK_URL, $url)) {
|
||||||
throw new AtolInvalidCallbackUrlException();
|
throw new AtolInvalidCallbackUrlException('Callback URL not matches with pattern');
|
||||||
}
|
}
|
||||||
$this->kkt_config[$this->isTestMode() ? 'test' : 'prod']['callback_url'] = $url;
|
$this->kkt_config[$this->isTestMode() ? 'test' : 'prod']['callback_url'] = $url;
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
Reference in New Issue
Block a user