]> git.parisson.com Git - teleforma.git/commitdiff
Fixed payment return
authorGael Le Mignot <gael@pilotsystems.net>
Thu, 3 Jun 2021 10:09:20 +0000 (12:09 +0200)
committerGael Le Mignot <gael@pilotsystems.net>
Thu, 3 Jun 2021 10:09:20 +0000 (12:09 +0200)
teleforma/views/payment.py

index d42d717f097fabfceb3bcf38b3eb03ac3fa82262..081c93913733c0eaead9c0114e9320c5721c68b4 100644 (file)
@@ -173,10 +173,9 @@ def bank_success(request, merchant_id):
     if check_payment_info(res):
         order_id = res[24]
         payment = Payment.objects.get(pk=order_id)
-        if payment.type == 'online' and payment.online_paid and (payment.student.user_id == request.user.pk or request.user.is_superuser):
+        if payment.type == 'online' and payment.online_paid:
             return render(request, 'payment/payment_validate.html',
-                                      {'payment': payment, },
-                                      context_instance=RequestContext(request))
+                                      {'payment': payment, })
     return HttpResponseRedirect('/echec-de-paiement')