Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
118 lines (114 sloc) 4.14 KB
{% extends "notification/base.eml" %}
{#
Implementation Note:
Here a copy/paste of the charge_detail.html.
This might not be the best idea but it is necessary to produce
consistent HTML emails through various email clients.
#}
{% block subject %}
{% trans name=provider.printable_name|safe %}Receipt from {{name}}{% endtrans %}{% if refunded %} - {% trans %}Refund{% endtrans %}{% endif %}
{% endblock %}
{% block html_content %}
<h3>{{provider.printable_name}}{% if refunded %} {% trans %}Refund{% endtrans %}{% else %} {% trans %}Charge{% endtrans %}{% endif %} {% trans %}Receipt{% endtrans %}</h3>
<div id="status">
{% if charge.is_paid %}
<p>
{% trans created_at=charge.created_at|short_date, price=charge.price|humanize_money %}On {{created_at}}, the credit card has been charged
for an amount of {{price}}.{% endtrans %}
{% trans %}Payment Information:{% endtrans %}
</p>
{% elif charge.is_failed %}
<p>
{% trans created_at=charge.created_at|short_date, price=charge.price|humanize_money %}On {{created_at}}, we attempted to charge your card for
{{price}}. The charge failed.{% endtrans %}
</p>
{% elif charge.is_disputed %}
<p>
{% trans created_at=charge.created_at|short_date, price=charge.price|humanize_money %}On {{created_at}}, we attempted to charge your card for
{{price}}. The charge was disputed.{% endtrans %}
</p>
{% elif charge.is_progress %}
<p>
{% trans created_at=charge.created_at|short_date, price=charge.price|humanize_money %}On {{created_at}}, we attempted to charge your card for
{{price}}. The charge is in progress...{% endtrans %}
</p>
{% endif %}
</div>
<div class="info">
<table>
<thead>
</thead>
<tbody>
<tr>
<th class="info-row-header" style="text-transform:upper;">{% trans %}reference{% endtrans %}&nbsp;&nbsp;</th>
<td>#{{charge.processor_key}}</td>
</tr>
<tr>
<th class="info-row-header" style="text-transform:upper;">{% trans %}amount{% endtrans %}&nbsp;&nbsp;</th>
<td>{% if refunded %}{% trans amount=charge.invoiced_total_after_refund|humanize_money %}{{amount}} (after refund){% endtrans %}{% else %}{{charge.price|humanize_money}}{% endif %}</td>
</tr>
{% if charge.card_name %}
<tr>
<th class="info-row-header "style="text-transform:upper;">{% trans %}name{% endtrans %}&nbsp;&nbsp;</th>
<td>{{charge.card_name}}</td>
</tr>
{% endif %}
<tr>
<th class="info-row-header" style="text-transform:upper;">{% trans %}card{% endtrans %}&nbsp;&nbsp;</th>
<td>**** - {{charge.last4}}</td>
</tr>
<tr>
<th class="info-row-header" style="text-transform:upper;">{% trans %}EXPIRES{% endtrans %}&nbsp;&nbsp;</th>
<td>{{charge.exp_date}}</td>
</tr>
</tbody>
</table>
</div>
<hr class="horizontal-divide">
<div id="invoiced_items">
<table class="table table-striped">
<thead>
<tr>
<th class="amount-header">{% trans %}Amount{% endtrans %}</th>
<th class="description-header">{% trans %}Description{% endtrans %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for line in charge_items %}
<tr>
<td>{{line.invoiced.dest_price|humanize_money}}</td>
<td>{{line.invoiced|describe}}</td>
<td></td>
</tr>
{% for refund in line.refunded %}
<tr>
<td>-{{refund.orig_price|humanize_money}}</td>
<td>{{refund|describe}}</td>
<td></td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
<hr />
<div>
{% if charge.created_by %}
<p>
{% trans %}This charge was initiated by{% endtrans %} <a href="{{urls.charge.created_by}}">{{charge.created_by.get_full_name()}}.</a>
</p>
{% endif %}
{% if email_by %}
<p>
{% trans name=email_by.printable_name %}This email was triggered by {{name}}.{% endtrans %}
</p>
{% endif %}
</div>
<div id="support">
<p>
{% trans %}Thank you for your continued business. If you have any questions or comments,
email us at{% endtrans %} <a href="mailto:{{provider.email}}">{{provider.email}}</a>.
</p>
</div>
{% endblock %}
You can’t perform that action at this time.