src/Omnipay/Ecopayz/Message/CompletePurchaseRequest.php
public function sendData($data)
    {
        if (isset($data->StatusReport)) {

            if (in_array($data->StatusReport->Status, array(1, 2, 3))) {
                $response = $this->createResponse('OK', 0, 'OK');
            } elseif (in_array($data->StatusReport->Status, array(4, 5))) {
                $response = $this->createResponse('Confirmed', 0, 'Confirmed');
            } else {
                $response = $this->createResponse('InvalidRequest', 99, 'Invalid StatusReport/Status');
            }

            header('Content-Type: text/xml; charset=utf-8');
            echo $response;
            die();

        } else {
            return new CompletePurchaseResponse($this, $data);
        }
    }
public function sendData($data)
    {
        if (isset($data->StatusReport)) {

            if (in_array($data->StatusReport->Status, array(1, 2, 3))) {
                $response = $this->createResponse('OK', 0, 'OK');
            } elseif (in_array($data->StatusReport->Status, array(4, 5))) {
                $response = $this->createResponse('Confirmed', 0, 'Confirmed');
            } else {
                $response = $this->createResponse('InvalidRequest', 99, 'Invalid StatusReport/Status');
            }

            header('Content-Type: text/xml; charset=utf-8');
            echo $response;
            die();

        } else {
            return new CompletePurchaseResponse($this, $data);
        }
    }
Send the request with specified data

@param  mixed                    $data The data to send
@return FetchTransactionResponse