{% load url from future %}
{% load bootstrap_tags %}

<div class="subscribe-form">
    <h2>Purchase a Subscription</h2>
    <p class="lead">Provide your payment details to start your subscription today.</p>
    {% if error %}
        <div class="alert alert-error">{{ error }}</div>
    {% endif %}
    <form action="{% url 'payments_ajax_subscribe' %}" class="form ajax"  data-stripe-key="{{ STRIPE_PUBLIC_KEY }}" data-replace-closest=".subscribe-form" method="POST">
        {% csrf_token %}
        {{ form|as_bootstrap }}
        <input name="stripe_token" type="hidden" />
        <div class="form-actions">
            <button type="submit" class="btn btn-primary">Subscribe</button>
        </div>
    </form>
</div>