make zeros show

pull/1/head
eric 2013-12-15 00:46:50 -05:00
parent 1598f181d8
commit 82443593ea
5 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{% load humanize %}{% ifequal transaction.host 'credit' %}Your Unglue.it transaction has completed and ${{transaction.max_amount|intcomma}} has been deducted from your Unglue.it credit balance. You have ${{request.user.credit.available}} of credit left. {% else %}{% if transaction.max_amount > transaction.amount %}Your transaction for ${{transaction.max_amount|intcomma}} has completed. Your credit card has been charged ${{transaction.amount}} and the rest has been deducted from your unglue.it credit balance. You have ${{request.user.credit.available}} of credit left. {% else %}Your Unglue.it credit card transaction has completed and your credit card has been charged ${{ transaction.amount|intcomma }}. {% endif %}{% endifequal %}
{% load humanize %}{% ifequal transaction.host 'credit' %}Your Unglue.it transaction has completed and ${{transaction.max_amount|intcomma}} has been deducted from your Unglue.it credit balance. You have ${{request.user.credit.available|intcomma}} of credit left. {% else %}{% if transaction.max_amount > transaction.amount %}Your transaction for ${{transaction.max_amount|intcomma}} has completed. Your credit card has been charged ${{transaction.amount}} and the rest has been deducted from your unglue.it credit balance. You have ${{request.user.credit.available|intcomma}} of credit left. {% else %}Your Unglue.it credit card transaction has completed and your credit card has been charged ${{ transaction.amount|intcomma }}. {% endif %}{% endifequal %}
{% ifequal transaction.offer.license 2 %}If you have not already done so, download your ebook at
https://{{ current_site.domain }}{% url download transaction.campaign.work.id %}

View File

@ -8,13 +8,13 @@
{% block comments_graphical %}
{% ifequal transaction.host 'credit' %}
Your Unglue.it transaction has completed and ${{transaction.max_amount|intcomma}} has been deducted from your Unglue.it credit balance.
You have ${{request.user.credit.available}} of credit left.
You have ${{request.user.credit.available|intcomma}} of credit left.
{% else %}
{% if transaction.max_amount > transaction.amount %}
Your transaction for ${{transaction.max_amount|intcomma}} has completed.
Your credit card has been charged ${{transaction.amount}} and the
rest has been deducted from your unglue.it credit balance.
You have ${{request.user.credit.available}} of credit left.
You have ${{request.user.credit.available|intcomma}} of credit left.
{% else %}
Your Unglue.it credit card transaction has completed and your credit card has been charged ${{ transaction.amount|intcomma }}.
{% endif %}

View File

@ -159,7 +159,7 @@
<input name="pledge" type="submit" value="Buy Now" id="pledgesubmit" class="loader-gif" />
<input name="decoy" type="submit" id="fakepledgesubmit" disabled="disabled" />
{% if request.user.credit.available > 0 %}
<div class="bigger" style="height:45px;clear:both"> You have an available gift credit of ${{ request.user.credit.available }} which will be applied to your purchase.</div>
<div class="bigger" style="height:45px;clear:both"> You have an available gift credit of ${{ request.user.credit.available|intcomma }} which will be applied to your purchase.</div>
{% endif %}
</form>

View File

@ -27,13 +27,13 @@
{% ifequal transaction.host 'credit' %}
Amount: ${{transaction.max_amount|intcomma}}.<br />
This amount has been deducted from your Unglue.it credit balance.<br />
You have ${{request.user.credit.available}} of credit left.<br />
You have ${{request.user.credit.available|intcomma}} of credit left.<br />
{% else %}
Total: ${{transaction.max_amount|intcomma}}.<br />
{% if transaction.max_amount > transaction.amount %}
Your credit card has been charged ${{transaction.amount}}.<br />
The rest has been deducted from your unglue.it credit balance.<br />
You have ${{request.user.credit.available}} of credit left.<br />
You have ${{request.user.credit.available|intcomma}} of credit left.<br />
{% else %}
This amount has been charged to your credit card.<br />
{% endif %}

View File

@ -461,6 +461,8 @@ class PaymentManager( object ):
# Mark as payment attempted so we will poll this periodically for status changes
transaction.set_payment()
# here's where we need to add handling for credit transactions in pledge campaigns
p = transaction.get_payment_class().Execute(transaction)
# Create a response for this