diff --git a/src/bitrix24.php b/src/bitrix24.php index 51e5f373..6df97bbc 100644 --- a/src/bitrix24.php +++ b/src/bitrix24.php @@ -216,7 +216,7 @@ public function setOnExpiredToken(callable $callback) */ public function setOnCallApiMethod(callable $callback) { - $this->_onCallApiMothod = $callback; + $this->_onCallApiMethod = $callback; } /** @@ -1132,8 +1132,8 @@ public function call($methodName, array $additionalParameters = array()) $result = $this->getWebhookUsage() ? $this->_call_webhook($methodName, $additionalParameters) : $this->_call($methodName, $additionalParameters); - if (is_callable($this->_onCallApiMothod)) { - call_user_func($this->_onCallApiMothod, $this, $methodName); + if (is_callable($this->_onCallApiMethod)) { + call_user_func($this->_onCallApiMethod, $this, $methodName); } } catch (Bitrix24TokenIsExpiredException $e) {