{% extends 'base.html' %}
{% load static i18n adyen_tags %}

{% block content %}
{% comment %}
    Example of status template with
{% endcomment %}

{% adyen_status_polling order=order status_url=status_url %}
{% if object.succeeded %}
    <h1>Order was a success</h1>

    {% if object.donation_token %}
        {% if not object.donation_order or object.donation_order.status == "created" %}
        <h2>Would you like to Donate?</h2>
        {% adyen_donation_component language=adyen_language campaign=campaign redirect_url=redirect_url %}
        {% else %}
            <h2>Donation already ordered</h2>
            <p>Click here to see the result</p>
        {% endif %}
    {% endif %}
{% elif order.status == "pending" %}
    <h1>Order is in process</h1>
{% else %}
    <h1>Order has some error</h1>
{% endif %}

{% endblock %}
