protected function handleResponse($pResponse) { parent::handleResponse($pResponse); $lResponse = $pResponse; if ($lResponse != "ACCESS_DENIED" && $lResponse != "USER_NOT_FOUND" && strstr($lResponse, "OAUTH") === false) { return; } $lError = new Documents\ApiErrorLog(); $lError->setCode("403"); $lError->setMessage($lResponse); $lError->setOiId($this->onlineIdentity->getId()); $lError->setUId($this->onlineIdentity->getUserId()); $lError->save(); $this->onlineIdentity->deactivate(); }
protected function handleResponse($pResponse) { parent::handleResponse($pResponse); $lResponse = json_decode($pResponse, true); if (!array_key_exists("error", $lResponse)) { return; } $lError = new Documents\ApiErrorLog(); $lError->setCode("NaN"); $lError->setMessage($lResponse['error']); $lError->setOiId($this->onlineIdentity->getId()); $lError->setUId($this->onlineIdentity->getUserId()); $lError->save(); if (strstr($lResponse['error'], "OAuth") !== false) { $this->onlineIdentity->deactivate(); } }
protected function handleResponse($pResponse) { parent::handleResponse($pResponse); $lResponse = json_decode($pResponse, true); if (!array_key_exists("error", $lResponse)) { return; } $lError = new Documents\ApiErrorLog(); $lError->setCode($lResponse['error']['code']); $lError->setMessage($lResponse['error']['message']); $lError->setOiId($this->onlineIdentity->getId()); $lError->setUId($this->onlineIdentity->getUserId()); $lError->save(); //if (in_array($lResponse['error']['code'], array(190, 200, 450, 451, 452, 453, 454, 455))) { // $this->onlineIdentity->deactivate(); //} }
protected function handleResponse($pResponse) { parent::handleResponse($pResponse); if (!preg_match('~<error>~i', $pResponse)) { return; } libxml_use_internal_errors(true); $lDoc = new DOMDocument(); $lDoc->loadXML($pResponse); $lError = new Documents\ApiErrorLog(); foreach ($lDoc->getElementsByTagName('status') as $code) { $lError->setCode($code->nodeValue); } foreach ($lDoc->getElementsByTagName('message') as $message) { $lError->setMessage($message->nodeValue); } $lError->setOiId($this->onlineIdentity->getId()); $lError->setUId($this->onlineIdentity->getUserId()); $lError->save(); if ($lError->getCode() == 401 && strstr($lError->getMessage(), "OAuth") !== false) { $this->onlineIdentity->deactivate(); } }
protected function handleResponse($pResponse) { parent::handleResponse($pResponse); }