function voidMultiShipment($ShipmentIdentificationNumber, $TrackingNumber) { $xml = new xmlBuilder(); $xml->push('VoidShipmentRequest'); $xml->push('Request'); $xml->element('RequestAction', '1'); $xml->pop(); // end Request $xml->push('ExpandedVoidShipment'); $xml->element('ShipmentIdentificationNumber', $ShipmentIdentificationNumber); foreach ($TrackingNumber as $tracking) { $xml->element('TrackingNumber', $tracking); } $xml->pop(); // end ExpandedVoidShipment $xml->pop(); // end VoidShipmentRequest $voidMultiShipment = $this->ups->access(); $voidMultiShipment .= $xml->getXml(); $responseXML = $this->ups->request('Void', $voidMultiShipment); $this->responseXML = $responseXML; $this->xmlSent = $voidMultiShipment; }
function buildShipmentAcceptXML($ShipmentDigest) { $xml = new xmlBuilder(); $xml->push('ShipmentAcceptRequest'); $xml->push('Request'); $xml->push('TransactionReference'); $xml->element('CustomerContext', 'guidlikesubstance'); $xml->element('XpciVersion', '1.0001'); $xml->pop(); // end TransactionReference $xml->element('RequestAction', 'ShipAccept'); $xml->pop(); // end Request $xml->element('ShipmentDigest', $ShipmentDigest); $xml->pop(); // end ShipmentAcceptRequest $ShipmentAcceptXML = $this->ups->access(); $ShipmentAcceptXML .= $xml->getXml(); $responseXML = $this->ups->request('ShipAccept', $ShipmentAcceptXML); $this->responseXML = $responseXML; return $ShipmentAcceptXML; }