protected function xmlresponse() { parent::xpath($this->response, $this->method); $xPathResult = $this->xpath->search("//Transaction/IP"); if (!empty($xPathResult)) { $this->result[$xPathResult->item(0)->nodeName] = $xPathResult->item(0)->nodeValue; } $xPathResult = $this->xpath->search("//Transaction/Code"); if (!empty($xPathResult)) { $this->result[$xPathResult->item(0)->nodeName] = $xPathResult->item(0)->nodeValue; } $xPathResult = $this->xpath->search("//Transaction/Description"); if (!empty($xPathResult)) { $this->result[$xPathResult->item(0)->nodeName] = $xPathResult->item(0)->nodeValue; } $xPathResult = $this->xpath->search("//Statuses/Status"); if (!empty($xPathResult)) { for ($i = 0; $i < $xPathResult->length; $i++) { $destination = $this->xpath->search("//Destination", $xPathResult->item($i))->item($i)->nodeValue; $this->result[$destination]['CurrentPart'] = $this->xpath->search("//CurrentPart", $xPathResult->item($i))->item($i)->nodeValue; $this->result[$destination]['TotalPart'] = $this->xpath->search("//TotalPart", $xPathResult->item($i))->item($i)->nodeValue; $this->result[$destination]['StatusCode'] = $this->xpath->search("//StatusCode", $xPathResult->item($i))->item($i)->nodeValue; $this->result[$destination]['StatusName'] = $this->xpath->search("//StatusName", $xPathResult->item($i))->item($i)->nodeValue; $this->result[$destination]['StatusDescription'] = $this->xpath->search("//StatusDescription", $xPathResult->item($i))->item($i)->nodeValue; } //for } //if print_r($this->result); $this->validateResponse(); parent::error(); }
protected function xmlresponse() { parent::xpath($this->response, $this->method); $xPathResult = $this->xpath->search("//Transaction/IP"); if (!empty($xPathResult)) { $this->result[$xPathResult->item(0)->nodeName] = $xPathResult->item(0)->nodeValue; } $xPathResult = $this->xpath->search("//Transaction/Code"); if (!empty($xPathResult)) { $this->result[$xPathResult->item(0)->nodeName] = $xPathResult->item(0)->nodeValue; } $xPathResult = $this->xpath->search("//Transaction/Description"); if (!empty($xPathResult)) { $this->result[$xPathResult->item(0)->nodeName] = $xPathResult->item(0)->nodeValue; } $xPathResult = $this->xpath->search("//Status"); if (!empty($xPathResult)) { $this->result[$xPathResult->item(0)->nodeName] = $xPathResult->item(0)->nodeValue; } $this->validateResponse(); parent::error(); }