Add a display alert that shows when the trial period ends (if applicable). Also change the name of the Subscribe buttons to "Start Trial" when no existing subscription is found
This commit is contained in:
parent
189903ffe9
commit
a5c2fc7185
3 changed files with 23 additions and 7 deletions
|
@ -17,13 +17,17 @@ def carderror_response(exc):
|
|||
|
||||
|
||||
def subscription_view(stripe_subscription, used_repos):
|
||||
return {
|
||||
view = {
|
||||
'currentPeriodStart': stripe_subscription.current_period_start,
|
||||
'currentPeriodEnd': stripe_subscription.current_period_end,
|
||||
'plan': stripe_subscription.plan.id,
|
||||
'usedPrivateRepos': used_repos,
|
||||
'trialStart': stripe_subscription.trial_start,
|
||||
'trialEnd': stripe_subscription.trial_end
|
||||
}
|
||||
|
||||
return view
|
||||
|
||||
|
||||
def subscribe(user, plan, token, require_business_plan):
|
||||
if not features.BILLING:
|
||||
|
|
Reference in a new issue