craftcms / commerce-paypal

PayPal payment gateway for Craft Commerce.
https://plugins.craftcms.com/commerce-paypal
MIT License
6 stars 9 forks source link

PayPal Subscriptions #16

Open bar-amir opened 5 years ago

bar-amir commented 5 years ago

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

andris-sevcenko commented 5 years ago

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

lennartlott commented 3 years ago

Any news for future plans?

lukeholder commented 3 years ago

@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 commented 2 years ago

@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

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