diff --git a/teams/templates/teams/team-billing.html b/teams/templates/teams/team-billing.html index 64e330c..b6cedbf 100644 --- a/teams/templates/teams/team-billing.html +++ b/teams/templates/teams/team-billing.html @@ -32,27 +32,29 @@
{{ name }}
-
- ${{ amount|currency_convert }}.00 USD / {{ interval }} -
-
- xxxx-xxxx-xxxx-{{ last4 }} -
-
- {{ status }} -
-
- {{ team.created|date:'M d, Y' }} -
-
- {{ nextBill|to_date|date:'M d, Y' }} -
-
- {% csrf_token %} - -
+ {% if status != 'inactive' %} +
+ ${{ amount|currency_convert }}.00 USD / {{ interval }} +
+
+ xxxx-xxxx-xxxx-{{ last4 }} +
+
+ {{ status }} +
+
+ {{ team.created|date:'M d, Y' }} +
+
+ {{ nextBill|to_date|date:'M d, Y' }} +
+
+ {% csrf_token %} + +
+ {% endif %} {% endblock %} diff --git a/teams/views.py b/teams/views.py index 73393eb..1e5beb5 100644 --- a/teams/views.py +++ b/teams/views.py @@ -80,6 +80,12 @@ def team_billing(request, username): if team.owner != request.user: raise Http404 + if team.stripe_id == 'COMP': + return { + 'name': 'Promotional trial', + 'team': team + } + stripe.api_key = os.environ.get('STRIPE_SECRET_KEY', settings.STRIPE_SECRET_KEY) customer = stripe.Customer.retrieve(team.stripe_id)