This is a small code of paypal controller i cakephp
its working fine in my localhost but its give me error in live
if you need more information then write in comment
undefine index username
Notice (8): Undefined index: username [APP/Controller/PaymentsController.php]
public function _initPaypal() {
$config = $this->User->findByUsername('admin');
$config = $config['Username'];
App::import('Vendor', 'Paypal/paypal');
$this->paypal = new Paypal($config['paypal_api_username'], $config['paypal_api_password'], $config['paypal_signature']);
}
its give me error like
notice(8) undefine index user name in localhost its working fine
thanks