Closed MonsieurV closed 1 year ago
In https://github.com/202ecommerce/paypal/blob/develop/classes/API/Request/PaypalAccessTokenRequest.php#L57 when Paypal return JSON errors not containing the property error_description, the error handling code throw a notice:
error_description
Notice: Undefined property: stdClass::$error_description
After patching, here the JSON returned by Paypal:
{"name":"RATE_LIMIT_REACHED","debug_id":"XXXXXX","message":"Too many requests. Blocked due to rate limiting.","links":[]}
The handling code should handle errors without the property error_description
1.7.6.8
7.2
Thank you. It's a good suggestion. Not easy to plan during our tests !
Thank you @MonsieurV these changes are implemented on 6.0.0.
Describe the bug and add screenshots
In https://github.com/202ecommerce/paypal/blob/develop/classes/API/Request/PaypalAccessTokenRequest.php#L57 when Paypal return JSON errors not containing the property
error_description
, the error handling code throw a notice:After patching, here the JSON returned by Paypal:
Expected behavior
The handling code should handle errors without the property
error_description
Steps to reproduce
PrestaShop version(s) where the bug happened
1.7.6.8
PHP version(s) where the bug happened
7.2