src/Message/AbstractRequest.php
public function getBaseData()
    {
        $data = new FluidXml(false);

        $message = $data->addChild('Message', ['version' => $this->getApiVersion()], true);

        $header = $message->addChild('Header', true);
        $header->addChild('Time', $this->getTime());

        $itentity = $header->addChild('Identity', true);
        $itentity->addChild('UserID', $this->getUserId());

        $body = $message->addChild('Body', ['type' => 'GetInvoice', 'live' => $this->getLive()], true);
        $order = $body->addChild('Order', ['paymentMethod' => $this->getPaymentMethod()], true);

        $order->addChild('MerchantID', $this->getMerchantId());
        $order->addChild('SiteAddress', $this->getSiteAddress());
        $order->addChild('PostbackURL', $this->getNotifyUrl());
        $order->addChild('SuccessURL', $this->getReturnUrl());
        $order->addChild('FailureURL', $this->getCancelUrl());

        return $message;
    }
public function getBaseData()
    {
        $data = new FluidXml(false);

        $message = $data->addChild('Message', ['version' => $this->getApiVersion()], true);

        $header = $message->addChild('Header', true);
        $header->addChild('Time', $this->getTime());

        $itentity = $header->addChild('Identity', true);
        $itentity->addChild('UserID', $this->getUserId());

        $body = $message->addChild('Body', ['type' => 'GetInvoice', 'live' => $this->getLive()], true);
        $order = $body->addChild('Order', ['paymentMethod' => $this->getPaymentMethod()], true);

        $order->addChild('MerchantID', $this->getMerchantId());
        $order->addChild('SiteAddress', $this->getSiteAddress());
        $order->addChild('PostbackURL', $this->getNotifyUrl());
        $order->addChild('SuccessURL', $this->getReturnUrl());
        $order->addChild('FailureURL', $this->getCancelUrl());

        return $message;
    }
public function getBaseData ( ) { $ data = new FluidXml ( false ) ; $ message = $ data -> addChild ( 'Message' , [ 'version' => $ this -> getApiVersion ( ) ] , true ) ; $ header = $ message -> addChild ( 'Header' , true ) ; $ header -> addChild ( 'Time' , $ this -> getTime ( ) ) ; $ itentity = $ header -> addChild ( 'Identity' , true ) ; $ itentity -> addChild ( 'UserID' , $ this -> getUserId ( ) ) ; $ body = $ message -> addChild ( 'Body' , [ 'type' => 'GetInvoice' , 'live' => $ this -> getLive ( ) ] , true ) ; $ order = $ body -> addChild ( 'Order' , [ 'paymentMethod' => $ this -> getPaymentMethod ( ) ] , true ) ; $ order -> addChild ( 'MerchantID' , $ this -> getMerchantId ( ) ) ; $ order -> addChild ( 'SiteAddress' , $ this -> getSiteAddress ( ) ) ; $ order -> addChild ( 'PostbackURL' , $ this -> getNotifyUrl ( ) ) ; $ order -> addChild ( 'SuccessURL' , $ this -> getReturnUrl ( ) ) ; $ order -> addChild ( 'FailureURL' , $ this -> getCancelUrl ( ) ) ; return $ message ; }
Get base data
@return FluidXml
Get base data