Admin notification if card unavailable
This commit is contained in:
parent
f28f13dea1
commit
0d8c98c214
1 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@ from frontend.models import CardURL
|
|||
from django.utils import timezone
|
||||
from datetime import timedelta
|
||||
from django.http import Http404
|
||||
from smsauth.views import requestToken
|
||||
from smsauth.views import requestToken, SELLER, sendMessage
|
||||
from buyer.views import getCard, sendStatus
|
||||
from ledger.models import Payment
|
||||
from dbsettings.functions import getValue
|
||||
|
@ -54,3 +54,7 @@ class CardView(LoginRequiredMixin, DetailView):
|
|||
|
||||
class UnavailableView(LoginRequiredMixin, TemplateView):
|
||||
template_name = "frontend/unavailable.html"
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
sendMessage("Failed to sell %s. None in stock." % getValue("ledger.description", "Paysafecard"))
|
||||
return super().get(*args, **kwargs)
|
||||
|
|
Loading…
Reference in a new issue