Skip to content

Commit a102fe1

Browse files
committed
Add missing template and finish an if statement I forgot about.
1 parent c5a5929 commit a102fe1

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<html lang="en">
2+
<head></head>
3+
<body>
4+
<p>You may close this window.</p>
5+
<noscript>...you'll need to close the window manually because you do not have javascript enabled. Sorry!</noscript>
6+
<script>window.close();</script>
7+
</body>
8+
</html>

src/thunderbird_accounts/subscription/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ def subscription_complete(request: HttpRequest, paddle: Client):
4848
transaction_id = request.session.pop(SESSION_PADDLE_TRANSACTION_ID)
4949
payment_type = request.session.pop(SESSION_PADDLE_PAYMENT_TYPE)
5050

51+
# Hmm this shouldn't happen...send them home. (They'll be redirected to subscribe if they're not subscribed anyways.)
5152
if not transaction_id or not payment_type:
52-
pass
53+
return HttpResponseRedirect('/')
5354

5455
transaction = paddle.transactions.get(transaction_id=transaction_id)
5556
status = transaction.status.value

0 commit comments

Comments
 (0)