1
0
mirror of synced 2026-08-03 13:46:54 +00:00
Commit Graph

4 Commits

Author SHA1 Message Date
Justin DiRose 6ce6e85ef4 Make rubocop happy 2020-08-19 15:11:16 -05:00
Justin DiRose a868e6b838 FEATURE: Cancel payments at end of subscription vs immediately
Previously, when a user canceled a subscription, the access would revoke
immediately on Discourse vs. at the end of the billing period. This
commit changes the behavior to remove membership at the end of the
billing period using Stripe's `cancel_at_period_end` attribute on the
Subscription object.

This commit now requires the setup of webhooks for subscription
processing to occur correctly.
2020-08-19 14:37:47 -05:00
Justin DiRose c9ff55b46a REFACTOR: Use the Prices API in place of Plans (#17)
Stripe has a newer API called Prices where you can create a price for any product and it can either be recurring or one-time. The easy part is existing Plans work with the Prices API by passing a Plan ID, but objects are returned in the slightly-different Prices API object format.

This commit is a refactor to the new API to handle the data in its new form, and lays the foundation for a one time payment plan to be added to any subscriptions product.
2020-07-15 08:44:40 -05:00
Justin DiRose fb4f50478d REFACTOR: Use engine to load files, add constraint (#14) 2020-07-06 11:11:04 -05:00