I have been getting this error in my log for a while, the code is just below. Can anyone explain to me what happens at (line 27 ) $allowed_method_codes ? Specifically in get getActiveMethods(Mage::app()->getStore($store_code)->getId()). Whats it looking for in getStore? Why is there a variable in there? Thanks for any help.
ERR (3): Notice: Undefined variable: store_code in Paymenttype/Model/Observer.php on line 27
$geoip_currency = $geoipHelper->getCookie('currency_code');
if( $geoip_currency =='USD') {
$store_code = 'default';
}
if( $geoip_currency =='CAD') {
$store_code = 'canada';
}
$allowed_method_codes = array_keys(Mage::getModel('payment/config')->getActiveMethods(Mage::app()->getStore($store_code)->getId()));
Loooks like it works perfectly.