public function sendData($data)
    {
        if ($this->sendData === null) {
            $this->sendData = $this->getData();
        }

        $data = $this->createSOAPEnvelope(
            $this->prepareParameters(
                $this->sendData
            )
        );

        $headers = array(
            'Content-Type' => 'text/xml; charset=utf-8',
            'SOAPAction' => $this->method
        );

        $httpResponse = $this->httpClient->post(
            $this->getEndpoint(),
            $headers,
            $data
        )->send();

        return $this->response = new Response($this, $httpResponse->getBody());
    }
public function sendData($data)
    {
        if ($this->sendData === null) {
            $this->sendData = $this->getData();
        }

        $data = $this->createSOAPEnvelope(
            $this->prepareParameters(
                $this->sendData
            )
        );

        $headers = array(
            'Content-Type' => 'text/xml; charset=utf-8',
            'SOAPAction' => $this->method
        );

        $httpResponse = $this->httpClient->post(
            $this->getEndpoint(),
            $headers,
            $data
        )->send();

        return $this->response = new Response($this, $httpResponse->getBody());
    }
public function sendData ( $ data ) { if ( $ this -> sendData === null ) { $ this -> sendData = $ this -> getData ( ) ; } $ data = $ this -> createSOAPEnvelope ( $ this -> prepareParameters ( $ this -> sendData ) ) ; $ headers = array ( 'Content-Type' => 'text/xml; charset=utf-8' , 'SOAPAction' => $ this -> method ) ; $ httpResponse = $ this -> httpClient -> post ( $ this -> getEndpoint ( ) , $ headers , $ data ) -> send ( ) ; return $ this -> response = new Response ( $ this , $ httpResponse -> getBody ( ) ) ; }
A helper function to send our request to the endpoint
A helper function to send our request to the endpoint