Search code examples
phppaypal

'paypal/paypal-checkout-sdk' has been abandoned.Composer(abandoned)


Hello I am updating a PHP project that was built several years ago and I encountered an error while running composer install.

The error message states that the paypal/paypal-checkout-sdk package has been abandoned and is no longer maintained. I have tried to find an alternative package, but none have been suggested. Is there a solution to this issue?


Solution

  • Expanding on the comment answer, there were two REST SDKs for PHP

    Both of them are deprecated and should not be used for new integrations.

    The v2/checkout/orders API is still very much current, there just are no currently maintained SDKs (in any language) that implement it for you. So to use it you need to implement the HTTPS calls yourself, typically by first creating a helper function to obtain an access_token (which can cache it for the allotted time if desired).

    The standard checkout integration guide gives a sample example backend in node.js (the index.js file), since JavaScript is the most widely-understood language; this is useful as a starting point to see how the simple backend routes to create and capture an order should work when paired with the frontend HTML/JS button approval. For more detail of what can be done from the backend see the v2/checkout/orders API reference itself.