thephpleague / omnipay-paypal

PayPal driver for the Omnipay PHP payment processing library
MIT License
295 stars 174 forks source link

REST GET requests are discarding the parameters #252

Open cetetesoft opened 2 years ago

cetetesoft commented 2 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,