-
Notifications
You must be signed in to change notification settings - Fork 11
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
AppPlans.set() doesn't remove old plan. #8
Comments
@MichaelJCole We can look into it more easily if you can post as much as possible of the plan definitions and what the plan settings are in Stripe, and the reproduction steps (I'm assuming just call The code appears to remove all existing plans first, so a detailed reproduction is necessary to figure out where there might be a bug for your use case. |
Hi @aldeed, I ended up rolling my own. There was some logic in upgrading/downgrading that was specific to my app (upgrades are pro-rated. downgrades finish the month). I implemented "finish the month" as cancelling at the end of the period, then setting up a "trialing" subscription for the next month plan. This blog post about await and async made npm Stripe much easier to work with. Here's the basics if you're interested. (I kept using AppPlans as the name because it's a good name). AppPlans.sync() fetches the stripe customer to a private property (user.privateStripeCustomer), then summarizes the plans in a public property to be sent to the client (user.appPlans.current and .next). Anyways, thanks for this package, it was very helpful to design a direction :-)
Then these Methods on the server called directly from client code:
|
@MichaelJCole Thanks for the details. This pkg does finish the month when you cancel also, but I think it needs work in the area of switching from one paid plan to another like you said. I will reopen so we can take a look eventually. |
Hi @aldeed I'm here with my app that has the option to upgrade plans. Maybe I just need to change the billing process, but the upsell on my app is from $10 to $50. The issue is that the subscription is not being ended. |
// BROKEN? |
`
` |
Okay so been digging in this code all night. My eyes hurt. Great plugin, I must say. Unsubscribing doesn't IMMEDIATELY end your subscription. It waits until the subscription duration has passed. It makes sense, we took their money, let them have service until such a time. It appears though, upon doing a SYNC, this is when the use will truely drop out of being enrolled in that plan on your Meteor install. So, the code is correct. That's the way you want it. What we need is a SWAP, which has been identified in another issue. |
So it appear to be almost 2.5 years later and I am back to this issue lol. I have gotten smarter, and realize your package needs some additional methods that will help solve this: membership_highest_role("paid") for example `
}); Template.registerHelper('membership_has_cancellation_date',() => {
}); Template.registerHelper('membership_highest_role_cancellation_date',() => {
}); |
I haven't been using this lately and don't remember much about it, but if you or anyone wants to submit a pull request, I can review and merge it. Or if somebody out there wants to maintain this package, let me know. |
Hi, I have three plans: freemium, theDeal, tooExpensive
The intention is that they are exclusive. A user can have only one - default is freemium
If a user does freemium -> theDeal -> tooExpensive -> freemium, they end up with two active subscriptions, both cancelling at the end of the month.
I'm not sure where this fits into the API for this module. Is it still under active development?
The text was updated successfully, but these errors were encountered: