public function checkNotification($notify) {
    if (!is_array($notify)) {
      return FALSE;
    }

    $notifyParams = array();
    foreach ($this->notifyFields as $k => $mandatory) {
      if (isset($notify[$k])) {
        $notifyParams[$k] = $notify[$k];
      }
      elseif (!isset($notify[$k]) && $mandatory) {
        throw new \Exception('expected notification field ' . $k . ' is missing');
      }
    }

    return $notifyParams;
  }