]> 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)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 12 Apr 2023 09:45:57 +0000 (11:45 +0200)
teleforma/views/payment.py

index 3f34c55f01f9625f5abdffcb9965a95df1866e27..71c5a0c532be254d33156c3b3bc6f4ab8e2fcc2c 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')