/** * Sends an API request for removing the notification from the api server, * thereby causing any future calls to getNotificationInfo() to fail. Also, * prevents the api from sending any further notifications. * * Unless this method is called, the api will keep sending the same * notification id indefinitely. * * @param string $notificationId notification id * * @return array api response * @throws ServiceException if api request was not successful */ public function deleteNotification($notificationId) { $urlPath = '/rest/3/Commerce/Payment/Notifications/' . $notificationId; $url = $this->getFqdn() . $urlPath; $req = new RESTFulRequest($url); $req->setHttpMethod(RESTFulRequest::HTTP_METHOD_PUT); $req->setHeader('Accept', 'application/json'); $req->addAuthorizationHeader($this->token); $result = $req->sendRequest(); return $this->parseResult($result); }