Add a function in FormChooser whose arguments are two arrays, the querystring and a list of processors (presumably already narrowed down by country/currency/method support). The function should consult a config variable with a list of rules and return a single processor.
Potential format for rules:
$wgDonationInterfaceProcessorPriorityRules = [ [ 'condition' => [ 'utm_medium' => 'endowment' ], 'processors' => [ 'ingenico' ] ], [ 'condition' => [ 'country' => 'FR' ], 'processors' => [ 'adyen' ] ], [ 'condition' => 'default', 'processors' => [ 'ingenico', 'adyen', 'paypal' ] ] ];
A rule could include values for any of the URL parameters. Rules would be evaluated from first to last, and the first matching rule would be used to determine the processor priority.