PayPal2: Refuse ISU-connection with unconfirmed email address

This commit is contained in:
Martin Gross
2022-09-28 13:20:20 +02:00
parent 814e8fc73b
commit 6a22cb3021

View File

@@ -240,13 +240,13 @@ def isu_return(request, *args, **kwargs):
if response.result.tracking_id != request.session['payment_paypal_isu_tracking_id']:
messages.error(request, _('An error occurred returning from PayPal: session parameter not matching. Please try again.'))
logger.exception('PayPal2 - tracking_id not matching session.payment_paypal_isu_tracking_id')
elif request.GET.get("isEmailConfirmed") == "false": # Yes - literal!
messages.error(
request,
_('The e-mail address on your PayPal account has not yet been confirmed. You will need to do '
'this before you can start accepting payments.')
)
else:
if request.GET.get("isEmailConfirmed") == "false": # Yes - literal!
messages.warning(
request,
_('The e-mail address on your PayPal account has not yet been confirmed. You will need to do '
'this before you can start accepting payments.')
)
messages.success(
request,
_('Your PayPal account is now connected to pretix. You can change the settings in detail below.')