All of the Payment Modules have a line similar to:
$this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);
What you need is a function to control the $this->enabled beyond the simple test of is it installed ...
Writing a function to test the conditions of what the Shipping Module is that the customer has selected and set that value to false to turn off a Payment Module when it should not show ...
The Shipping Modules use something similar to control when the Free Shipping freeshipper should show or not show and whether the other Shipping Modules should show or not show ...
For example the Item Rate item Shipping Modules uses:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
}
If the function returns a false value, then the Item Rate item Shipping Module will turn off or hide from display ...
If the function returns a true value, then the Item Rate item Shipping Module will turn on or show on the display ...