我正在开发一个发货模块。 在system.xml
我设置了一些字段为backend_encrypted
。这里是节点:在magento中解密/使用存储为config_backend_encrypted的配置值
<client_id translate="label">
<label>Client ID</label>
<frontend_type>obscure</frontend_type>
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</client_id>
我需要用价值卷曲传递到航运API,但是,当我尝试使用$this->getConfigData('client_id');
找回它,它出来的加密。
我在寻找其他模块,我发现存储的值相同但不知何故,他们设法获得正确的值。
任何想法如何得到它?
作品,谢谢。但为什么我没有看到任何其他模块解密的参考?如果你能帮忙,我错误地使用它,它不应该在哪里? – Ovidiu 2011-12-20 14:39:39
你一切正常。如果您将搜索Magento代码进行“解密”,您将获得大量参考资料。 – 2011-12-20 14:44:55
再次感谢Laurent。 – Ovidiu 2011-12-20 14:51:46