diff --git a/frontend/views.py b/frontend/views.py index 545fe88..294671f 100644 --- a/frontend/views.py +++ b/frontend/views.py @@ -9,6 +9,8 @@ from django.http import Http404 from smsauth.views import requestToken from buyer.views import getCard, sendStatus from ledger.models import Payment +from dbsettings.functions import getValue +from decimal import Decimal def makeCardURL(card): return CardURL.objects.create(card=card) # pylint: disable=E1101 @@ -32,7 +34,7 @@ class SMSAuthView(LoginRequiredMixin, FormView): except: return redirect("unavailable") if not card.delivered: - Payment.objects.create(description="Paysafecard", amount=11, card=card) # pylint: disable=E1101 + Payment.objects.create(description=getValue("ledger.description", "Paysafecard"), amount=Decimal(getValue("ledger.amount", 11)), card=card) # pylint: disable=E1101 return redirect(return_url) class CardView(LoginRequiredMixin, DetailView): @@ -51,4 +53,4 @@ class CardView(LoginRequiredMixin, DetailView): return obj class UnavailableView(LoginRequiredMixin, TemplateView): - template_name = "frontend/unavailable.html" \ No newline at end of file + template_name = "frontend/unavailable.html"