Commit 71797f6d authored by Job Doesburg's avatar Job Doesburg

Change handling of error for double payment attempt

parent ed81d6e2
......@@ -308,7 +308,11 @@ class RenewalPayView(View):
renewal = get_object_or_404(Renewal, member=self.request.member,
status=Entry.STATUS_ACCEPTED)
services.process_tpay_payment(renewal)
try:
services.process_tpay_payment(renewal)
except ValueError as e:
messages.error(request, str(e))
messages.success(request, _("You have paid with Thalia Pay."))
return redirect('registrations:renew-completed')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment