Magento:在代码中获取保存的贝宝凭证

用户名

我已经在Magnto 1.9中启用了paypal,现在我想在Observer中调用另一个paypal API,因为我需要在启用paypal时已经保存的paypal用户,密码和签名。

我想使用配置从管理员那里获取这些详细信息。

我已经尝试使用以下代码,但无法正常工作。

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

那可能吗?

用户名

终于我得到了答案。

$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);

通过上面的代码,我们可以获取明智的PayPal凭证。

我已经测试过了

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章