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 {% 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 %} https://{{ current_site.domain }}{% url download transaction.campaign.work.id %}

View File

@ -8,13 +8,13 @@
{% block comments_graphical %} {% block comments_graphical %}
{% ifequal transaction.host 'credit' %} {% ifequal transaction.host 'credit' %}
Your Unglue.it transaction has completed and ${{transaction.max_amount|intcomma}} has been deducted from your Unglue.it credit balance. 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 %} {% else %}
{% if transaction.max_amount > transaction.amount %} {% if transaction.max_amount > transaction.amount %}
Your transaction for ${{transaction.max_amount|intcomma}} has completed. Your transaction for ${{transaction.max_amount|intcomma}} has completed.
Your credit card has been charged ${{transaction.amount}} and the Your credit card has been charged ${{transaction.amount}} and the
rest has been deducted from your unglue.it credit balance. 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 %} {% else %}
Your Unglue.it credit card transaction has completed and your credit card has been charged ${{ transaction.amount|intcomma }}. Your Unglue.it credit card transaction has completed and your credit card has been charged ${{ transaction.amount|intcomma }}.
{% endif %} {% endif %}

View File

@ -159,7 +159,7 @@
<input name="pledge" type="submit" value="Buy Now" id="pledgesubmit" class="loader-gif" /> <input name="pledge" type="submit" value="Buy Now" id="pledgesubmit" class="loader-gif" />
<input name="decoy" type="submit" id="fakepledgesubmit" disabled="disabled" /> <input name="decoy" type="submit" id="fakepledgesubmit" disabled="disabled" />
{% if request.user.credit.available > 0 %} {% 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 %} {% endif %}
</form> </form>

View File

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

View File

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