protected function getBasePaymentXML()
    {
        $xml = $this->getBaseXML();

        $payment = $xml->addChild('Payment');
        $txnList = $payment->addChild('TxnList');
        $txnList->addAttribute('count', 1); // One transaction per request supported by current API.

        $transaction = $txnList->addChild('Txn');
        $transaction->addAttribute('ID', 1); // One transaction per request supported by current API.
        $transaction->addChild('txnType', $this->txnType);
        $transaction->addChild('txnSource', 23); // Must always be 23 for SecureXML.
        $transaction->addChild('amount', $this->getAmountInteger());
        $transaction->addChild('currency', $this->getCurrency());
        $transaction->purchaseOrderNo = $this->getTransactionId();

        return $xml;
    }
protected function getBasePaymentXML()
    {
        $xml = $this->getBaseXML();

        $payment = $xml->addChild('Payment');
        $txnList = $payment->addChild('TxnList');
        $txnList->addAttribute('count', 1); // One transaction per request supported by current API.

        $transaction = $txnList->addChild('Txn');
        $transaction->addAttribute('ID', 1); // One transaction per request supported by current API.
        $transaction->addChild('txnType', $this->txnType);
        $transaction->addChild('txnSource', 23); // Must always be 23 for SecureXML.
        $transaction->addChild('amount', $this->getAmountInteger());
        $transaction->addChild('currency', $this->getCurrency());
        $transaction->purchaseOrderNo = $this->getTransactionId();

        return $xml;
    }
protected function getBasePaymentXML ( ) { $ xml = $ this -> getBaseXML ( ) ; $ payment = $ xml -> addChild ( 'Payment' ) ; $ txnList = $ payment -> addChild ( 'TxnList' ) ; $ txnList -> addAttribute ( 'count' , 1 ) ; // One transaction per request supported by current API. $ transaction = $ txnList -> addChild ( 'Txn' ) ; $ transaction -> addAttribute ( 'ID' , 1 ) ; // One transaction per request supported by current API. $ transaction -> addChild ( 'txnType' , $ this -> txnType ) ; $ transaction -> addChild ( 'txnSource' , 23 ) ; // Must always be 23 for SecureXML. $ transaction -> addChild ( 'amount' , $ this -> getAmountInteger ( ) ) ; $ transaction -> addChild ( 'currency' , $ this -> getCurrency ( ) ) ; $ transaction -> purchaseOrderNo = $ this -> getTransactionId ( ) ; return $ xml ; }
XML template of a SecurePayMessage Payment.

@return \SimpleXMLElement SecurePayMessage with transaction details.
XML template of a SecurePayMessage Payment .