public function filterpaymentmethod(Varien_Event_Observer $observer) {
/* call get payment method */
$method = $observer->getEvent()->getMethodInstance();
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
$roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
$role = Mage::getSingleton('customer/group')->load($roleId)->getData('customer_group_code');
if($method->getCode()=='purchaseorder'){
$quote = $observer->getEvent()->getQuote();
if($role=$yourcustomergroupid$role == $yourcustomergroupid){
$result = $observer->getEvent()->getResult();
$result->isAvailable = true;
return;
}else{
$result = $observer->getEvent()->getResult();
$result->isAvailable = false;
}
}
if($method->getCode()=='checkmo'){
$quote = $observer->getEvent()->getQuote();
if($role=$yourcustomergroupid$role == $yourcustomergroupid){
$result = $observer->getEvent()->getResult();
$result->isAvailable = true;
return;
}else{
$result = $observer->getEvent()->getResult();
$result->isAvailable = false;
}
}
}
}