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

Support for subscriptions #15

Open
aseigo opened this issue Jan 30, 2017 · 3 comments
Open

Support for subscriptions #15

aseigo opened this issue Jan 30, 2017 · 3 comments

Comments

@aseigo
Copy link

aseigo commented Jan 30, 2017

Major gateway portals include support for subscriptions, see:

https://developer.paypal.com/docs/classic/use-cases/uc_subscriptions-subscription-payments/
https://stripe.com/docs/subscriptions/quickstart

Some significant questions for subscription support:

  • how to handle the async notifications (e.g. success/failure of payment); as these are implemented as service-specific web-hooks, it perhaps makes sense to provide per-gateway Plug.Router implementations that can be used for this with an interface defined for callbacks that must be implemented by the host application (since database access, email generation, service cancellation, etc need to be handled but are all application specific).

  • should Subscriptions be a new module, or added to the existing gateway interface? My gut feeling is that this should be a new module that uses a gateway, but which provides the various bits of plumbing for Subscriptions. This way, those who do not need Subscriptions can ignore them, and one has a nice separation of concerns between payment mechanics and subscription/recurring payments

@swelham
Copy link
Owner

swelham commented Jan 30, 2017

This would be a great addition to the library and I agree this should be a new module that builds on top of the basic gateway interface.

I think this would be a good post v1 release feature, as by that point we will have a stable gateway interface and we will have more time to fully work out the answers to these questions.

I think it would be valuable for us to come up with some client usage scenarios that would help us shape the interface for this module and identify the points of the lifecycle where callbacks would be needed.

@aseigo
Copy link
Author

aseigo commented Jan 30, 2017

I think this would be a good post v1 release feature,

Makes sense :)

I think it would be valuable for us to come up with some client usage scenarios

Happy to do this, as I have at least one practical / real-world application for this in the immediate future.

@swelham
Copy link
Owner

swelham commented Jan 30, 2017

👍

That would great @aseigo

@aseigo aseigo mentioned this issue Jan 30, 2017
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

2 participants