diff --git a/frontend/templates/notification/purchase_complete/full.txt b/frontend/templates/notification/purchase_complete/full.txt index 7ccfb3af..54669b62 100644 --- a/frontend/templates/notification/purchase_complete/full.txt +++ b/frontend/templates/notification/purchase_complete/full.txt @@ -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 %} diff --git a/frontend/templates/notification/purchase_complete/notice.html b/frontend/templates/notification/purchase_complete/notice.html index 4447554e..6e2c5ffb 100644 --- a/frontend/templates/notification/purchase_complete/notice.html +++ b/frontend/templates/notification/purchase_complete/notice.html @@ -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 %} diff --git a/frontend/templates/purchase.html b/frontend/templates/purchase.html index 11dd8f72..80fed3ca 100644 --- a/frontend/templates/purchase.html +++ b/frontend/templates/purchase.html @@ -159,7 +159,7 @@ {% if request.user.credit.available > 0 %} -
You have an available gift credit of ${{ request.user.credit.available }} which will be applied to your purchase.
+
You have an available gift credit of ${{ request.user.credit.available|intcomma }} which will be applied to your purchase.
{% endif %} diff --git a/frontend/templates/trans_summary.html b/frontend/templates/trans_summary.html index a743b4a4..e253a094 100644 --- a/frontend/templates/trans_summary.html +++ b/frontend/templates/trans_summary.html @@ -27,13 +27,13 @@ {% ifequal transaction.host 'credit' %} Amount: ${{transaction.max_amount|intcomma}}.
This amount 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 %} Total: ${{transaction.max_amount|intcomma}}.
{% if transaction.max_amount > transaction.amount %} Your credit card has been charged ${{transaction.amount}}.
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 %} This amount has been charged to your credit card.
{% endif %} diff --git a/payment/manager.py b/payment/manager.py index 406eb148..4c9da63b 100644 --- a/payment/manager.py +++ b/payment/manager.py @@ -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