fix payment
This commit is contained in:
1 parent
4f7486152c
commit
bb3ddd1610
47 files changed
+2137
-51
No files matched your search
@@ -29,6 +29,8 @@ def open_link(request, token):
|
||||
logout(request)
|
||||
if not request.user.is_authenticated:
|
||||
access.grant_payment_access(request, link)
|
||||
# Retain the token across redirects in the session; the link model still stores only its hash.
|
||||
request.session[access.SHARE_SESSION_KEY] = {'link_id': link.pk, 'token': token}
|
||||
with transaction.atomic():
|
||||
PaymentAccessLink.objects.filter(pk=link.pk).update(view_count=F('view_count') + 1, last_used_at=timezone.now())
|
||||
services.audit(None, 'PAYMENT_LINK_OPENED', link, {
|
||||
|
||||
Reference in new issue
Block a user