Skip to content

Commit

Permalink
Encrypt fixer.io API Key in system config (#24)
Browse files Browse the repository at this point in the history
Encrypted key feature. Thanks @df2k2 and @sprankhub
  • Loading branch information
philwinkle authored Jun 5, 2018
2 parents 2cd71f4 + d44ae55 commit 10f4106
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/code/community/Philwinkle/Fixerio/Model/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct()
*/
protected function _getConfigAccessKey()
{
if ($accessKey = Mage::getStoreConfig('currency/fixerio/access_key')) {
if ($accessKey = Mage::helper('core')->decrypt(Mage::getStoreConfig('currency/fixerio/access_key'))) {
return $accessKey;
}

Expand Down
3 changes: 2 additions & 1 deletion app/code/community/Philwinkle/Fixerio/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<access_key translate="label">
<label>API Access Key from fixer.io</label>
<comment><![CDATA[Sign up for a free account at <a href="https://fixer.io/signup/free" target="_blank">Fixer.io</a>]]></comment>
<frontend_type>text</frontend_type>
<frontend_type>obscure</frontend_type>
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
Expand Down

0 comments on commit 10f4106

Please sign in to comment.