{% extends "pretixpresale/event/base.html" %}
{% load i18n %}
{% load eventurl %}
{% load static %}
{% block title %}{% trans "Pay order" %}{% endblock %}
{% block custom_header %}
    {{ block.super }}
    {% include "pretixplugins/stripe/presale_head.html" with settings=stripe_settings %}
    <script type="text/plain" id="stripe_payment_intent_action_type">{{ payment_intent_action_type }}</script>
    <script type="text/plain" id="stripe_payment_intent_client_secret">{{ payment_intent_client_secret }}</script>
    {% if payment_intent_next_action_redirect_url %}
        <script type="text/plain" id="stripe_payment_intent_next_action_redirect_url">{{ payment_intent_next_action_redirect_url }}</script>
    {% endif %}}
    {% if payment_intent_redirect_action_handling %}
        <script type="text/plain" id="stripe_payment_intent_redirect_action_handling">{{ payment_intent_redirect_action_handling }}</script>
    {% endif %}
{% endblock %}
{% block content %}
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">
                {% blocktrans trimmed with code=order.code %}
                    Confirm payment: {{ code }}
                {% endblocktrans %}
            </h3>
        </div>
        <div class="stripe-errors sr-only panel-body">

        </div>
        <div class="panel-body embed-responsive embed-responsive-sca" id="scacontainer">

        </div>
    </div>
    <div class="row checkout-button-row">
        <div class="col-md-4">
            <a class="btn btn-block btn-default btn-lg"
               href="{% eventurl request.event "presale:event.order" secret=order.secret order=order.code %}">
                {% trans "Cancel" %}
            </a>
        </div>
        <div class="col-md-4 col-md-offset-4">
            <a class="btn btn-block btn-primary btn-lg hidden"
               href="{% eventurl request.event "presale:event.order" secret=order.secret order=order.code %}"
               id="continuebutton">
                {% trans "Continue" %}
            </a>
        </div>
        <div class="clearfix"></div>
    </div>
{% endblock %}
