Open
Description
Hi team,
I was integrating the SDK and was glad to see support for granular response code handling. However, it appears this isn’t actually used due to the call to ->returnApiResponse()
:
PayPal-PHP-Server-SDK/src/Controllers/PaymentsController.php
Lines 123 to 133 in 671a2b2
This forces the implementing app to manually check isSuccessful()
and handle errors without context, which can be cumbersome.
I understand that removing ->returnApiResponse()
would be a breaking change, but doing so would also unlock better type safety and IDE support by allowing response models to be proper return types.
Metadata
Metadata
Assignees
Labels
No labels