Get saved paypal credential in observer?

Viewed 34

I have enabled paypal in Magnto 1.9 Now I want to call another paypal API in my Observer, for that I need paypal user,password and signature which I already saved while enabling paypal.

I want to fetch these details from admin to my code using config.

I have tried with below code but its not working.

$store = Mage::app()->getStore(Mage::app()->getStore()->getStoreId()); 
$Settings = Mage::getStoreConfig('paypal_payments/payment/required_settings/express',$store);

Is that possible?

1 Answers

I have tested below code. Its working well..

$store = Mage::app()->getStore(Mage::app()->getStore()->getStoreId()); 

$Email = Mage::getStoreConfig('paypal/general/business_paypal/general/business_accountaccount');
$UserName = Mage::getStoreConfig('paypal/wpp/api_username',$store);
$Password = Mage::getStoreConfig('paypal/wpp/api_password',$store);
$Signature = Mage::getStoreConfig('paypal/wpp/api_signature',$store);
Related