Show billing for comp'd accounts.
parent
8a0ed4169a
commit
484892b1fe
|
@ -32,27 +32,29 @@
|
|||
<div class="def" data-title="Plan">
|
||||
{{ name }}
|
||||
</div>
|
||||
<div class="def" data-title="Price">
|
||||
${{ amount|currency_convert }}.00 USD / {{ interval }}
|
||||
</div>
|
||||
<div class="def" data-title="Card">
|
||||
xxxx-xxxx-xxxx-{{ last4 }}
|
||||
</div>
|
||||
<div class="def" data-title="Status">
|
||||
{{ status }}
|
||||
</div>
|
||||
<div class="def" data-title="Team since">
|
||||
{{ team.created|date:'M d, Y' }}
|
||||
</div>
|
||||
<div class="def" data-title="Next bill date" ng-show="user.stripeAccount.status != 'inactive'">
|
||||
{{ nextBill|to_date|date:'M d, Y' }}
|
||||
</div>
|
||||
<form class="alert alert-info group" style="margin: 15px; padding-right: 8px;" id="cancel-team-subscription" action="/{{ team.slug }}/billing/cancel/" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger pull-right">
|
||||
Cancel subscription
|
||||
</button>
|
||||
</form>
|
||||
{% if status != 'inactive' %}
|
||||
<div class="def" data-title="Price">
|
||||
${{ amount|currency_convert }}.00 USD / {{ interval }}
|
||||
</div>
|
||||
<div class="def" data-title="Card">
|
||||
xxxx-xxxx-xxxx-{{ last4 }}
|
||||
</div>
|
||||
<div class="def" data-title="Status">
|
||||
{{ status }}
|
||||
</div>
|
||||
<div class="def" data-title="Team since">
|
||||
{{ team.created|date:'M d, Y' }}
|
||||
</div>
|
||||
<div class="def" data-title="Next bill date" ng-show="user.stripeAccount.status != 'inactive'">
|
||||
{{ nextBill|to_date|date:'M d, Y' }}
|
||||
</div>
|
||||
<form class="alert alert-info group" style="margin: 15px; padding-right: 8px;" id="cancel-team-subscription" action="/{{ team.slug }}/billing/cancel/" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger pull-right">
|
||||
Cancel subscription
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue