You can use the function in the functions_lookups.php and test if there are Downloads in the Products with:
Code:
////
// check if Product is set to use downloads
// does not validate download filename
function zen_has_product_attributes_downloads_status($products_id) {
So, you can build a function to check the order contents and see if all products are downloads ...
Then if that is true, disable a payment module by setting the:
$this->enabled
to false ...
When that is false, then the Payment module does not show ...
This is a simplified method here ... it would need to be much more detailed for actual use ...
This is not hard to do, it is just time consuming code to write out and test ...
Hope it points you in the right direction ...