Turn off all references and API calls to billing if the feature is disabled
This commit is contained in:
parent
c374e8146a
commit
19a20a6c94
12 changed files with 135 additions and 62 deletions
|
@ -6,6 +6,7 @@ from endpoints.common import check_repository_usage
|
|||
from data import model
|
||||
from data.plans import PLANS
|
||||
|
||||
import features
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -24,6 +25,9 @@ def subscription_view(stripe_subscription, used_repos):
|
|||
|
||||
|
||||
def subscribe(user, plan, token, require_business_plan):
|
||||
if not features.BILLING:
|
||||
return
|
||||
|
||||
plan_found = None
|
||||
for plan_obj in PLANS:
|
||||
if plan_obj['stripeId'] == plan:
|
||||
|
|
Reference in a new issue