thephpleague / omnipay-paypal

PayPal driver for the Omnipay PHP payment processing library
MIT License
299 stars 176 forks source link

REST GET requests are discarding the parameters #252

Open cetetesoft opened 3 years ago

cetetesoft commented 3 years ago

The AbstractRestRequest::sendData() method is building the URL for GET requests like so: $requestUrl = $this->getEndpoint() . '?' . http_build_query($data); But this URL is used nowhere after this. Instead, the request is using $this->getEndpoint() as the URL.

This:

            $httpResponse = $this->httpClient->request(
                $this->getHttpMethod(),
                $this->getEndpoint(),

Should be replaced with:

            $httpResponse = $this->httpClient->request(
                $this->getHttpMethod(),
                $requestUrl,