{% extends "shop/checkout/base_confirm.html" %} {% load i18n %} {% load satchmo_util %} {% load smart_if %} {# this is the Paypal confirm template #} {% block payment_step %}{% trans "Payment" %}{% endblock %} {% block payment_display %}

{% trans "Payment" %}

{% if not PAYMENT_LIVE %}PAYMENT TEST MODE
{% endif %} {% trans "Your payment will be processed through PayPal." %} {% endblock %} {% block payment_form %} {% if order.paid_in_full %}
{% else %}
{% csrf_token %} {% if subscription %} {% if subscription.trial1 %} {% endif %} {% if subscription.product.trial2_price %} {% endif %} {% if subscription.product.recurring %} {% endif %} {% else %} {% if order.partially_paid %} {% else %} {% for item in order.orderitem_set.all %}{% spaceless %} {% if item.discount %} {% if item.line_total > item.discount %} {% else %} {# paypal doesn't like 100% discounts, so skip this item if it has zero cost. #} {# BUT, if this is the only thing in the cart, then we still need to put *something* #} {# in the cart, so lets do handling as a line item #} {% if order.discounted_sub_total <= 0 %} {% endif %} {% endif %} {% else %} {# no discount #} {% endif %} {% endspaceless %} {% endfor %} {# LEAVE THE HANDLING CHARGE ALONE! PAYPAL SHIPPING WILL INEVITABLY BE MESSED UP IF YOU USE THEIR SHIPPING METHODS #} {# To work around their bizarre system, we are telling Paypal "no shipping" and adding all shipping charges as handling #} {% spaceless %}{% if order.discounted_sub_total > 0 %} {# don't add handling if we already used it above - see the 100% discount section above #} {% endif %}{% endspaceless %} {% endif %} {% endif %} {% if order.contact.billing_address %}{% with order.contact.billing_address as address %} {# only U.S. abbreviations may be used here #}{% ifequal address.country.iso2_code|lower 'us' %}{% ifequal address.state|length 2 %}{% endifequal %}{% endifequal %} {% endwith %}{% endif %}
{% endif %} {% endblock %}