protected function getRequestXml()
    {
        $serviceXmlNode = "<" . $this->getServiceName() . "/>";
        $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>' . $serviceXmlNode);
        $xml->addAttribute('version', $this->getServiceVersion());

        $bodyChild = $xml->addChild('body');
        $bodyChild->addAttribute('merchantId', $this->getMerchantId());

        $transactionChild = $bodyChild->addChild('transaction');
        $transactionChild->addAttribute('refno', $this->getTransactionId());

        $requestChild = $transactionChild->addChild('request');

        $this->prepareRequestXml($requestChild);

        $requestChild->addChild('sign', $this->getSign());

        return $xml;
    }
protected function getRequestXml()
    {
        $serviceXmlNode = "<" . $this->getServiceName() . "/>";
        $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>' . $serviceXmlNode);
        $xml->addAttribute('version', $this->getServiceVersion());

        $bodyChild = $xml->addChild('body');
        $bodyChild->addAttribute('merchantId', $this->getMerchantId());

        $transactionChild = $bodyChild->addChild('transaction');
        $transactionChild->addAttribute('refno', $this->getTransactionId());

        $requestChild = $transactionChild->addChild('request');

        $this->prepareRequestXml($requestChild);

        $requestChild->addChild('sign', $this->getSign());

        return $xml;
    }
protected function getRequestXml ( ) { $ serviceXmlNode = "<" . $ this -> getServiceName ( ) . "/>" ; $ xml = new \ SimpleXMLElement ( '<?xml version="1.0" encoding="UTF-8"?>' . $ serviceXmlNode ) ; $ xml -> addAttribute ( 'version' , $ this -> getServiceVersion ( ) ) ; $ bodyChild = $ xml -> addChild ( 'body' ) ; $ bodyChild -> addAttribute ( 'merchantId' , $ this -> getMerchantId ( ) ) ; $ transactionChild = $ bodyChild -> addChild ( 'transaction' ) ; $ transactionChild -> addAttribute ( 'refno' , $ this -> getTransactionId ( ) ) ; $ requestChild = $ transactionChild -> addChild ( 'request' ) ; $ this -> prepareRequestXml ( $ requestChild ) ; $ requestChild -> addChild ( 'sign' , $ this -> getSign ( ) ) ; return $ xml ; }
Generate XML for request

@return \SimpleXMLElement
Generate XML for request