src/Omnipay/Ecopayz/Message/PayoutRequest.php
public function getData()
    {
        $this->validate(
            'merchantId',
            'merchantPassword',
            'merchantAccountNumber',
            'clientAccountNumber',
            'transactionId',
            'amount',
            'currency'
        );

        $document = new \DOMDocument('1.0', 'utf-8');
        $document->formatOutput = false;

        $envelope = $document->appendChild(
            $document->createElementNS('http://schemas.xmlsoap.org/soap/envelope/', 'soapenv:Envelope')
        );
        $envelope->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
        $envelope->setAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema');
        $envelope->setAttribute('xmlns:q0', 'http://www.ecocard.com/merchantAPI/');

        $body = $envelope->appendChild(
            $document->createElement('soapenv:Body')
        );

        $payout = $body->appendChild(
            $document->createElement('q0:Payout')
        );

        $request = $payout->appendChild(
            $document->createElement('q0:PayoutRequest')
        );

        $request->appendChild(
            $document->createElement('q0:MerchantID', $this->getMerchantId())
        );

        $request->appendChild(
            $document->createElement('q0:MerchantPassword', $this->getMerchantPassword())
        );

        $request->appendChild(
            $document->createElement('q0:MerchantAccountNumber', $this->getMerchantAccountNumber())
        );

        $request->appendChild(
            $document->createElement('q0:ClientAccountNumber', $this->getClientAccountNumber())
        );

        $request->appendChild(
            $document->createElement('q0:Amount', $this->getAmountInteger())
        );

        $request->appendChild(
            $document->createElement('q0:TxID', $this->getTransactionId())
        );

        $request->appendChild(
            $document->createElement('q0:Currency', strtoupper($this->getCurrency()))
        );

        if ($clientAccountNumberAtMerchant = $this->getClientAccountNumberAtMerchant()) {
            $request->appendChild(
                $document->createElement('q0:ClientAccountNumberAtMerchant', $clientAccountNumberAtMerchant)
            );
        }

        if ($description = $this->getDescription()) {
            $request->appendChild(
                $document->createElement('q0:TransactionDescription', $description)
            );
        }

        return $document->saveXML();
    }
public function getData()
    {
        $this->validate(
            'merchantId',
            'merchantPassword',
            'merchantAccountNumber',
            'clientAccountNumber',
            'transactionId',
            'amount',
            'currency'
        );

        $document = new \DOMDocument('1.0', 'utf-8');
        $document->formatOutput = false;

        $envelope = $document->appendChild(
            $document->createElementNS('http://schemas.xmlsoap.org/soap/envelope/', 'soapenv:Envelope')
        );
        $envelope->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
        $envelope->setAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema');
        $envelope->setAttribute('xmlns:q0', 'http://www.ecocard.com/merchantAPI/');

        $body = $envelope->appendChild(
            $document->createElement('soapenv:Body')
        );

        $payout = $body->appendChild(
            $document->createElement('q0:Payout')
        );

        $request = $payout->appendChild(
            $document->createElement('q0:PayoutRequest')
        );

        $request->appendChild(
            $document->createElement('q0:MerchantID', $this->getMerchantId())
        );

        $request->appendChild(
            $document->createElement('q0:MerchantPassword', $this->getMerchantPassword())
        );

        $request->appendChild(
            $document->createElement('q0:MerchantAccountNumber', $this->getMerchantAccountNumber())
        );

        $request->appendChild(
            $document->createElement('q0:ClientAccountNumber', $this->getClientAccountNumber())
        );

        $request->appendChild(
            $document->createElement('q0:Amount', $this->getAmountInteger())
        );

        $request->appendChild(
            $document->createElement('q0:TxID', $this->getTransactionId())
        );

        $request->appendChild(
            $document->createElement('q0:Currency', strtoupper($this->getCurrency()))
        );

        if ($clientAccountNumberAtMerchant = $this->getClientAccountNumberAtMerchant()) {
            $request->appendChild(
                $document->createElement('q0:ClientAccountNumberAtMerchant', $clientAccountNumberAtMerchant)
            );
        }

        if ($description = $this->getDescription()) {
            $request->appendChild(
                $document->createElement('q0:TransactionDescription', $description)
            );
        }

        return $document->saveXML();
    }
Get the data for this request.

@return \DOMDocument request data