Skip to content

PayPal Rest V2 Support #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

isaiahdahl
Copy link

Wanting to contribute Rest V2 support to this package as the v1 routes that PayPal_Rest uses are now deprecated.

Starting this draft PR to get some input from maintainers if there is anything we need to make sure is covered to get this merged.

@isaiahdahl
Copy link
Author

@barryvdh Sorry to ping you but I'm just trying to get some insight from a maintainer.

We migrated a fairly large project to use omnipay over and in the process added the latest from PayPal. Lots has changed/updated on the PayPal side since the package first came out, their v2/v3 stuff looks a lot more like stripe now.

We have our project running from our fork in this PR. Ideally, I'd love to get this merged upstream, but we're (my company) at the point now where it is working for what we need and so I don't want to invest a bunch of time into getting this ready to merge if it's just going to sit as an open PR for years... as it seems like that's been the case for a few other open ones in this repo. But totally willing to do what's necessary to get it merged, love omnipay and also think PayPal has a very robust offering now.

If you're not the guy maybe you could point me in the direction of someone who can help guide me?

@barryvdh
Copy link
Member

barryvdh commented Jan 7, 2025

Sorry I'm not really familiar with the PayPal API, so hard to test. But is there a reason we need to support V1 at all? How different is V1 from V2 from a Omnipay end-user point of view?
Is there a 1-on-1 conversion from V1 to V2 or does a lot of things need to be changed? Otherwise we could just bump the major version and remove V1 support. No need to keep supporting deprecated versions if they do not offer more functionality.

@isaiahdahl
Copy link
Author

@barryvdh thanks for your quick reply!

Yea it's a hard line to draw. From what I could see there are still V1 routes very much in use. For example the Subscriptions

In my company's case, we happen not to have been using omnipay before integrating with the new PayPal endpoints, but we were using a (now deprecated) PayPal SDK to interact with their billing agreements flow. When we wrote the code to bring in omnipay as the way to support V2 PayPal we had to still support the old billing agreements flow in parallel to allow us to deploy the new payment gateway support without breaking what was already there.

If we had been using OmniPay for the older PayPal routes, and wanted to move to v2 with simultaneous support for v1 it wouldn't be possible if the package didn't have support for both gateway keys.

So the for the main reason of not wanting to pigeon hole someone who needed to support both at the same time for a smooth upgrade migration process, I wanted it possible to interact with both versions at the same time.

From my conversations with PayPal it seems like they're "Deprecating" but without plans to actually "Deprecate" the routes, meaning they're not going to force people to are currently using /v1/checkout/orders to move to the v2 way.

Let me know if you need any more clarity, I'm open to alternate ideas of how to handle the version succession.

@isaiahdahl isaiahdahl marked this pull request as ready for review February 4, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants