Skip to content
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

PayPal Subscriptions #16

Open
bar-amir opened this issue Apr 28, 2019 · 4 comments
Open

PayPal Subscriptions #16

bar-amir opened this issue Apr 28, 2019 · 4 comments

Comments

@bar-amir
Copy link

Any plans to work with PayPal subscriptions anytime soon? Stripe don't operate in many countries, including mine. Thanks.

@andris-sevcenko
Copy link
Contributor

There are no immediate plans for subscriptions for PayPal. Leaving this open as a feature request.

@lennartlott
Copy link

Any news for future plans?

@lukeholder
Copy link
Member

@lennartlott nothing to share at the moment sorry.

We are busy working on other improvements to commerce, we welcome a PR on this free plugin.

@Anubarak
Copy link

Anubarak commented Jul 11, 2022

@lukeholder Is Craft even made for this feature via PayPal?
I'm trying to include PayPal subscriptions right now because I need the feature but I'm a little bit lost how to implement it.

The PayPal API has an event to add a subscription https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_create however Craft does not really like to use "offSite" subscriptions.
In order to do this it seems you have to work against Craft and create custom Controllers to send the subscription data and the Gateways subscribe function then kinda seems to do nothing at all?

At least I don't really see a way to redirect the user correctly in my subscribe function and there doesn't seem to be any logic regarding that case in your functions https://github.com/craftcms/commerce/blob/develop/src/services/Subscriptions.php#L493

So I guess the correct way would be

  • create a form to a custom controller and call PayPals endpoint
  • return the user to PayPals approval URL
  • receive PayPals Response in a custom Controller function and call the Subscribtions::createSubscribtion by myself
  • grab PayPals response token in the URL in my subscribe function and just return it

Is that intended cause to be honest it feels all the way wrong but I don't know what your intentions with subscriptions were.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants