A validation must be added to Prepay Order, the payment rule Cash must not be allowed for this kind of order.
The problem is:
completing a prepay order set the status in "Wait for payment"
when a payment enters automatically creates an invoice
as the invoice is set with Cash payment rule it automatically creates a payment - which fails to be allocated with error "Validation Error Invoice Paid" - and the whole payment completion is left in a bad state.