Make pm restriction code generic.

Made the payment method restriction code usable by all adapters.