[T3278] Split payment order line by retention state and avoid line iteration for custom code

Merged Macarena Meldi requested to merge T3278 into 15.0

Merge request reports