Code Monkey home page Code Monkey logo

Comments (4)

lennartlott avatar lennartlott commented on June 12, 2024 2

Any news for future plans?

from commerce-paypal.

andris-sevcenko avatar andris-sevcenko commented on June 12, 2024

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

from commerce-paypal.

lukeholder avatar lukeholder commented on June 12, 2024

@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.

from commerce-paypal.

Anubarak avatar Anubarak commented on June 12, 2024

@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.

from commerce-paypal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.