public function sendRequest($data)
    {
        return $this->httpClient->request(
            $this->getHttpMethod(),
            $this->getEndpoint(),
            [
                'Accept' => 'application/json',
                'Authorization' => $this->getServiceKey(),
                'Content-Type' => 'application/json',
            ],
            json_encode($data)
        );
    }
public function sendRequest($data)
    {
        return $this->httpClient->request(
            $this->getHttpMethod(),
            $this->getEndpoint(),
            [
                'Accept' => 'application/json',
                'Authorization' => $this->getServiceKey(),
                'Content-Type' => 'application/json',
            ],
            json_encode($data)
        );
    }
public function sendRequest ( $ data ) { return $ this -> httpClient -> request ( $ this -> getHttpMethod ( ) , $ this -> getEndpoint ( ) , [ 'Accept' => 'application/json' , 'Authorization' => $ this -> getServiceKey ( ) , 'Content-Type' => 'application/json' , ] , json_encode ( $ data ) ) ; }
Make the actual request to WorldPay

@param mixed $data  The data to encode and send to the API endpoint

@return \Psr\Http\Message\ResponseInterface HTTP response object
Make the actual request to WorldPay