编程语言
首页 > 编程语言> > php-Magento:在代码中获取保存的贝宝凭证

php-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凭证.

我已经测试过了

标签:magento-1-9,magento,php
来源: https://codeday.me/bug/20191108/2009146.html