{% extends "base.html" %} {% load bootstrap_form from bootstrap3 %} {% load gross from prices_i18n %} {% load discount_amount_for from prices %} {% load i18n %} {% load staticfiles %} {% block title %}{% trans "Pay for order" %} {{ order }} — {{ block.super }}{% endblock %} {% block outerbreadcrumb %} {% if order.user == user %} {% endif %} {% endblock outerbreadcrumb %} {% block content %}
{% if order.user == user or not order.is_fully_paid %} {% if not order.is_fully_paid %}
{% if waiting_payment %}
{% trans "Payment pending" %}
{% csrf_token %}

{% trans "We are currently waiting for an external service to authorize your payment for this order." %}

{% trans "Current status" %}: {{ waiting_payment.get_status_display }}

{% trans "Unless you are absolutely sure that the process will not complete (for example you have closed the browser window before paying), you should wait before attempting a new payment. Please be warned that if you try again and the previous transaction succeeds you might end up being charged twice." %}

{% bootstrap_form waiting_payment_form %}
{% elif payment_form %}
{% trans "Pay for order" %} {{ order }}
{% csrf_token %} {{ payment_form }}
{% block form_submit %} {% endblock %}
{% else %}
{% trans "You've authorized transaction. Order is in processing" %}
{% endif %}
{% endif %} {% endif %}
{% if order.user == user %}
{% trans "Billing address" %}
{% include "userprofile/snippets/address-details.html" with address=order.billing_address %}
{% if order.is_shipping_required %}
{% trans "Shipping address" %}
{% include "userprofile/snippets/address-details.html" with address=order.shipping_address %}
{% endif %}
{% endif %}
{% for group in groups %}
{% blocktrans with number=forloop.counter %}Shipment #{{ number }}{% endblocktrans %}
{% for item in group %} {% endfor %} {% if group.shipping_price.gross %} {% endif %}
{% trans "Name" %} {% trans "Price" %} {% trans "Subtotal" %}
{% trans "Total" %} {% gross group.get_total %}
{{ item.product }}{% if item.quantity != 1 %} ×{{ item.quantity }}{% endif %} {% gross item.get_price_per_item %} {% gross item.get_total %}
{% trans "Shipping" %} {% gross group.shipping_price %} {% gross group.shipping_price %}
{% endfor %} {% if order.discount_amount %}
{{ order.discount_name }}
{% gross order.discount|discount_amount_for:order.total %}
{% endif %} {% if order.discount_amount or groups|length > 1 %}
{% trans "Total" %}
{% gross order.total %}
{% endif %} {% endblock content %}