Paypal Fehler unsupported response type Gambio

If you encounter problems with payment via PayPal Plus in a Gambio online shop and the PayPal error logs contain the message USER NOTICE: "ERROR performing request: unsupported response type application/json;charset=UTF-8", this may be due to an outdated shop version / PayPal plugin version. First, we locate the file that generates the error mentioned above and then try to make the online shop compatible with PayPal again by modifying the problematic section.

 

 We find it here in the file

 

\system\classes\external\paypal3\PayPalRestResponse.inc.php

 

In this file, the error is generated if (among other things) the Content-Type of the response is not "application/json". However, in our case it is "application/json;charset=UTF-8", so we also need to take this case into account. Therefore, (for security reasons, using a slightly different notation) we can change, for example,

 

protected function parseResponse()

{

                $curlInfo = $this->getCurlInfo();

                switch($curlInfo['content_type'])

                {

                               case 'application/json':

 

dann einfach

 

protected function parseResponse()

{

                $curlInfo = $this->getCurlInfo();

                switch($curlInfo['content_type'])

                {

                               case 'application/json':

                               case 'application/json; charset=utf-8':

                               case 'application/json;charset=UTF-8':

 

This makes PayPal work normally again, and everything functions perfectly. Seen at our web agency in an online shop using the Gambio v3.3.2.0 shop system.