public function authorized() { $headers = MoipHelper::getAllHeaders(); $this->authorized = false; if (MoipHelper::isArray($headers) && array_key_exists('Authorization', $headers) && $this->obj->getNotificationToken() === $headers['Authorization']) { $this->authorized = true; } return $this->authorized; }