In order to get at the product types on the order, you have to look inside the commerce-order token at the line items it contains. Specifically, in your actions section you can loop over the commerce-order:commerce-line-items token and pass each individual line item to a separate rules component that checks the type of the referenced product and then enables the payment method if necessary.
To truly prototype this, we would need to know your site setup - for example, can the user ever have more than one product in the cart, and if so might they differ in which payment method applies to them? How would you handle such a conflict?
If you're only allowing one product in the cart at the time or can trust products in the cart to always use the same payment method, your other option besides using the loop on commerce-order:commerce-line-items would be to use the condition we provide titled Order contains a particular product, which has the ability to look for particular SKUs inside the line items without depending on a secondary rules component. Very handy.
Comments
But if I add a payment method and I add the loop, a error message appears in payment method page.
I want to give a role based discount of 30% which I have successfully configured EXCEPT I need to exclude certain product types (student fees), which I have tried to do by
NOT Order contains a particular product
Parameter: Order: [commerce-line-item:order], Product SKU: FEE-DUES-ANN ..
Do I need to create a separate condition for each SKU? I listed them each on a different line, i.e.
FEE-DUES-ANN
FEE-DUES-LIF
FEE-DUES-SNR
etc.
Or do I need a loop? Still barely getting to know Commerce.