Example #1
0
 function track($trackingNumber)
 {
     $xml = $this->connector->getAccessRequestXMLString();
     $xml .= $this->connector->getXMLString('Tracking/TrackRequest.xml', array('TRACKING_NUMBER' => $trackingNumber));
     $this->xmlSent = $xml;
     $responseXML = $this->connector->sendEndpointXML('Track', $xml);
     $xmlParser = new \UPS\XMLParser();
     $fromUPS = $xmlParser->xmlparser($responseXML);
     $fromUPS = $xmlParser->getData();
     $this->trackResponse = $fromUPS;
     return $fromUPS;
 }
Example #2
0
 function sendRateRequest()
 {
     // First part of XML is the access part,
     $xml = $this->connector->getAccessRequestXMLString();
     $content = $this->requestXML;
     $content .= $this->shipmentXML;
     $xml .= $this->connector->sandwich('Rates/RatingServiceSelection_Main.xml', array('{CONTENT}'), array($content));
     # Put the xml send to UPS into a variable so we can call it later for debugging purposes
     $this->xmlSent = $xml;
     $responseXML = $this->connector->sendEndpointXML('Rate', $xml);
     #$xmlParser = new XML2Array();
     #$fromUPS = $xmlParser->parse($responseXML);
     $xmlParser = new \UPS\XMLParser($responseXML);
     $fromUPS = $xmlParser->getData();
     $this->rateResponse = $fromUPS;
     return $fromUPS;
 }
Example #3
0
 function responseArray()
 {
     $xmlParser = new \UPS\XMLParser();
     $responseArray = $xmlParser->xmlParser($this->responseXML);
     $responseArray = $xmlParser->getData();
     return $responseArray;
 }