'. $login['merchant_id'] .''. $login['transaction_key'] .''; $requestDOM = new DOMDocument('1.0'); $soapHeaderDOM = new DOMDocument('1.0'); try { $requestDOM->loadXML($request); $soapHeaderDOM->loadXML($soapHeader); $node = $requestDOM->importNode($soapHeaderDOM->firstChild, TRUE); $requestDOM->firstChild->insertBefore($node, $requestDOM->firstChild->firstChild); $request = $requestDOM->saveXML(); } catch (DOMException $e) { die('Error adding UsernameToken: '. $e->code); } return parent::__doRequest($request, $location, $action, $version); } }