forked from CGM_Public/pretix_original
Prevent order changes that interfer with a pending payment that can't be aborted (Z#23179178) (#4765)
This commit is contained in:
@@ -1650,6 +1650,13 @@ class OrderChangeMixin:
|
||||
raise OrderError(_('You may not change your order in a way that increases the total price since '
|
||||
'payments are no longer being accepted for this event.'))
|
||||
|
||||
if ocm._totaldiff > Decimal('0.00') and self.order.status == Order.STATUS_PENDING:
|
||||
for p in self.order.payments.filter(state=OrderPayment.PAYMENT_STATE_PENDING):
|
||||
if not p.payment_provider.abort_pending_allowed:
|
||||
raise OrderError(_('You may not change your order in a way that requires additional payment while '
|
||||
'we are processing your current payment. Please check back after your current '
|
||||
'payment has been accepted.'))
|
||||
|
||||
|
||||
@method_decorator(xframe_options_exempt, 'dispatch')
|
||||
class OrderChange(OrderChangeMixin, EventViewMixin, OrderDetailMixin, TemplateView):
|
||||
|
||||
Reference in New Issue
Block a user