Do you accept the payment and profit or can you refuse the transaction? A parent comment claimed we must process all transactions, legal or not.
And there are also cases in which you can clearly know something is illegal. Someone purchasing guns in a country where guns are not legal doesn't need a judge, jury, and court process for a payment processor to decide they don't want to be involved. It's not arbitrary. And your right to make purchases using a credit card is not a basic human right.
In reality I don’t think there is any chance of a law requiring payment processors to process all legal transactions and definitely nothing about illegal transactions. If that were a possibility, I would back off my statement that they should be forced to process illegal transactions.