private function writeShipWorksXML($data) { $moduleVersion = '2.9.51'; $data['ModuleVersion'] = $moduleVersion; if ($this->authenticated) { $authStr = "true"; } else { $authStr = "false"; } $data['Admin']['Authenticated'] = $authStr; $xml = Interspire_Xml::createXML('ShipWorks'); Interspire_Xml::addArrayToXML($xml, $data); $xmlString = Interspire_Xml::prettyIndent($xml); Interspire_Xml::sendHttpHeader(); echo $xmlString; exit; }
public function BadRequest($message) { $xml = Interspire_Xml::createXML('response'); $data = array( 'status' => 'FAILED', 'version' => self::VERSION_CODE, 'errormessage' => $message, ); Interspire_Xml::addArrayToXML($xml, $data); Interspire_Xml::sendHttpHeader(); $xmlString = Interspire_Xml::prettyIndent($xml); echo $xmlString; exit; }