{# Implementation Note: #} {# Here we have a copy/paste of the CSS from the site as well #} {# as a copy/paste of the charge_detail.html. #} {# This might not be the best idea but it is necessary to produce #} {# consistent PDF receipts. #} {# #} {# Workaround: #} {# The PDF library has issues with formatted dl/dt/dd so we replaced #} {# the info section with a table as well. #} {# Actually the XML2PDF library has a lot of trouble with many CSS stuff. #} {# Fortunately we switched to WeasyPrint (support for Python3 and ACID2) #}

{{provider.printable_name}} Charge Receipt

{% if charge.is_paid %}

On {{charge.created_at}}, the credit card has been charged for an amount of {{charge.price|humanize_money}}. Payment Information:

{% elif charge.is_failed %}

On {{charge.created_at}}, we attempted to charge your card for {{charge.price|humanize_money}}. The charge failed.

{% elif charge.is_disputed %}

On {{charge.created_at}}, we attempted to charge your card for {{charge.price|humanize_money}}. The charge was disputed.

{% elif charge.is_progress %}

On {{charge.created_at}}, we attempted to charge your card for {{charge.price|humanize_money}}. The charge is in progress...

{% endif %}
REFERENCE   #{{charge.processor_key}}
AMOUNT   {{charge.price|humanize_money}}
CARD   **** - {{charge.last4}}
EXPIRES   {{charge.exp_date}}

{% for line in charge_items %} {% for refund in line.refunded %} {% endfor %} {% endfor %}
Amount Description
{{line.invoiced.dest_price|humanize_money}} {{line.invoiced|describe}}
-{{refund.orig_price|humanize_money}} {{refund|describe}}

Thank you for your continued business. If you have any questions or comments, email us at {{provider.email}}.