Allow a stripe plan to be superseded

If a plan has a direct corrolary, show that one as the selected plan
instead of showing the plan as deprecated even though it has the same
details
This commit is contained in:
Jake Moshenko 2015-08-12 10:48:40 -04:00
parent a5d0569e35
commit ec6bee35b6
4 changed files with 44 additions and 3 deletions

View file

@ -148,6 +148,13 @@ function(KeyService, UserService, CookieService, ApiService, Features, Config) {
});
};
planService.getPlanImmediately = function(planId) {
// Get the plan by name, without bothering to check if the plans are loaded.
// This method will return undefined if planId is undefined or null, or if
// the planDict has not yet been loaded.
return planDict[planId];
};
planService.getMinimumPlan = function(privateCount, isBusiness, callback) {
planService.getPlans(function(plans) {
for (var i = 0; i < plans.length; i++) {