public function buildCurlClient()
    {
        //
        // Use PHP Native cURL because the various Soap clients (BeSimple,
        // PHP native SoapClient) can't handle the WSDL file.
        //
        $this->curl = curl_init($this->getEndPoint());

        $sslCertificate = $this->getSslCertificate();
        $sslKey         = $this->getSslKey();
        $sslKeyPassword = $this->getSslKeyPassword();
        $userName       = $this->getUsername();
        $password       = $this->getPassword();
        $headers        = $this->getHeaders();

        // configuring cURL not to verify the server certificate
        curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 0);

        // setting the path where cURL can find the client certificate
        curl_setopt($this->curl, CURLOPT_SSLCERT, $sslCertificate);

        // setting the path where cURL can find the client certificate’s
        // private key
        curl_setopt($this->curl, CURLOPT_SSLKEY, $sslKey);

        // setting the key password
        curl_setopt($this->curl, CURLOPT_SSLKEYPASSWD, $sslKeyPassword);

        // setting the request type to POST
        curl_setopt($this->curl, CURLOPT_POST, 1);

        // setting the content type
        curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);

        // setting the authorization method to BASIC
        curl_setopt($this->curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

        // supplying your credentials
        curl_setopt($this->curl, CURLOPT_USERPWD, $userName . ':' . $password);

        // telling cURL to return the HTTP response body as operation result
        // value when calling curl_exec
        curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);

        return $this->curl;
    }