{% extends 'layouts/app.html' %} {% import 'macros/form.html' as f with context %} {% set plan_name = request.args.get('plan', '') %} {% set is_create = request.endpoint.endswith('create') %} {% if is_create %} {% set title = 'Enter payment information' %} {% set endpoint = 'billing.create' %} {% set button = 'Process payment' %} {% else %} {% set title = 'Update payment information' %} {% set endpoint = 'billing.update_payment_method' %} {% set button = 'Update payment method' %} {% endif %} {% block title %}{{ title }}{% endblock %} {% block body %}
{% call f.form_tag(endpoint, fid='payment_form') %} {% if is_create %} {{ plan_name | title }} subscription
This plan costs ${{ plan.amount | format_currency }} / {{ plan.interval }} {% else %} {{ title }} {% endif %}
{% if is_create %}
{{ form.coupon_code.label }} {{ f.field(form.coupon_code) }}
{% endif %} {% call f.form_group(form.name, css_class='sm-margin-bottom', autofocus='autofocus') %} {% endcall %}

Visa Mastercard American Express J.C.B Diner's Club
Protected by 128-bit SSL encryption
{% endcall %}
{% endblock %}