{% load i18n %}

{% if payment_info %}
    {% if order.status == "p" %}
        <p>{% blocktrans trimmed %}
            This order has been paid via PayPal.
        {% endblocktrans %}</p>
    {% elif order.status == "r" %}
        <p>{% blocktrans trimmed %}
            This order has been planned to be paid via PayPal and has been marked as refunded.
        {% endblocktrans %}</p>
    {% else %}
        <p>{% blocktrans trimmed %}
            This order has been planned to be paid via PayPal, but the payment has not yet been completed.
        {% endblocktrans %}</p>
    {% endif %}
    <dl class="dl-horizontal">
        <dt>{% trans "Payment ID" %}</dt>
        <dd>{{ payment_info.id }}</dd>
        <dt>{% trans "Payer" %}</dt>
        <dd>{{ payment_info.payer.payer_info.email }}</dd>
        <dt>{% trans "Last update" %}</dt>
        <dd>{{ payment_info.update_time }}</dd>
        <dt>{% trans "Total value" %}</dt>
        <dd>{{ payment_info.transactions.0.amount.total }}</dd>
        <dt>{% trans "Currency" %}</dt>
        <dd>{{ payment_info.transactions.0.amount.currency }}</dd>
    </dl>
{% else %}
    <p>{% blocktrans trimmed %}
        This order has been planned to be paid via PayPal, but the payment has not yet been completed.
    {% endblocktrans %}</p>
{% endif %}
