-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
291 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
app/code/community/AndrejSinicyn/Decryptor/Helper/Data.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* Magento | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @category AndrejSinicyn | ||
* @package AndrejSinicyn_CatalogTuner | ||
* @copyright Copyright (c) 2012-2014 Andrej Sinicyn | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
?> | ||
<?php | ||
class AndrejSinicyn_Decryptor_Helper_Data extends Mage_Core_Helper_Abstract | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Magento | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @category AndrejSinicyn | ||
* @package AndrejSinicyn_CatalogTuner | ||
* @copyright Copyright (c) 2012-2014 Andrej Sinicyn | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
?> | ||
<?php | ||
class AndrejSinicyn_Decryptor_Model_Api extends Mage_Api_Model_Resource_Abstract | ||
{ | ||
public function decrypt($data) | ||
{ | ||
if ($data) { | ||
return Mage::helper('core')->decrypt($data); | ||
} | ||
return $data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Magento | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @category AndrejSinicyn | ||
* @package AndrejSinicyn_CatalogTuner | ||
* @copyright Copyright (c) 2012-2014 Andrej Sinicyn | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
--> | ||
<config> | ||
<api> | ||
<resources> | ||
<decryptor translate="title" module="decryptor"> | ||
<title>Decryptor</title> | ||
<model>AndrejSinicyn_Decryptor_Model_Api</model> | ||
<methods> | ||
<decrypt translate="title" module="decryptor"> | ||
<title>Decrypt encoded data</title> | ||
</decrypt> | ||
</methods> | ||
</decryptor> | ||
</resources> | ||
<v2> | ||
<resources_function_prefix> | ||
<decryptor>decryptor</decryptor> | ||
</resources_function_prefix> | ||
</v2> | ||
</api> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Magento | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @category AndrejSinicyn | ||
* @package AndrejSinicyn_CatalogTuner | ||
* @copyright Copyright (c) 2012-2014 Andrej Sinicyn | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
--> | ||
<config> | ||
<modules> | ||
<AndrejSinicyn_Decryptor> | ||
<version>1.0.0</version> | ||
</AndrejSinicyn_Decryptor> | ||
</modules> | ||
<global> | ||
<helpers> | ||
<decryptor> | ||
<class>AndrejSinicyn_Decryptor_Helper</class> | ||
</decryptor> | ||
</helpers> | ||
<models> | ||
<decryptor> | ||
<class>AndrejSinicyn_Decryptor_Model</class> | ||
</decryptor> | ||
</models> | ||
</global> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Magento | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* @category AndrejSinicyn | ||
* @package AndrejSinicyn_CatalogTuner | ||
* @copyright Copyright (c) 2012-2014 Andrej Sinicyn | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
--> | ||
<config> | ||
<modules> | ||
<AndrejSinicyn_Decryptor> | ||
<active>true</active> | ||
<codePool>community</codePool> | ||
<depends> | ||
<Mage_Api /> | ||
</depends> | ||
<version>1.0.0</version> | ||
</AndrejSinicyn_Decryptor> | ||
</modules> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<_> | ||
<form_key>bW0NnPxQnZWxLpr6</form_key> | ||
<name>AndrejSinicyn_Decryptor</name> | ||
<channel>community</channel> | ||
<version_ids> | ||
<version_ids>2</version_ids> | ||
<version_ids>1</version_ids> | ||
</version_ids> | ||
<summary>Allows decryption of encrypted order data via SOAP api.</summary> | ||
<description>This little module allows decryption of encoded order data fields like "cc_number_enc". | ||
|
||
It should be ensured that the SOAP communication happens via encoded connection (SSL), else everyone could read the sensitive data by intercepting the connection. | ||
|
||
Example call with PHP and Soap-Api v1: | ||
|
||
$client = new SoapClient('https://myserver.tld/api/soap/?wsdl'); | ||
$session = $client->login('MyUser', 'MyPassword'); | ||
$decodedData = $client->call($session, 'decryptor.decrypt', 's0m3EnCrYpt3dD474');</description> | ||
<license>Academic Free License (AFL 3.0)</license> | ||
<license_uri>http://opensource.org/licenses/afl-3.0.php</license_uri> | ||
<version>1.0.0</version> | ||
<stability>stable</stability> | ||
<notes>v1.0.0 Initial version</notes> | ||
<authors> | ||
<name> | ||
<name>Andrej Sinicyn</name> | ||
</name> | ||
<user> | ||
<user>rarog</user> | ||
</user> | ||
<email> | ||
<email>[email protected]</email> | ||
</email> | ||
</authors> | ||
<depends_php_min>5.3.0</depends_php_min> | ||
<depends_php_max>6.0.0</depends_php_max> | ||
<depends> | ||
<package> | ||
<name> | ||
<name/> | ||
</name> | ||
<channel> | ||
<channel/> | ||
</channel> | ||
<min> | ||
<min/> | ||
</min> | ||
<max> | ||
<max/> | ||
</max> | ||
<files> | ||
<files> </files> | ||
</files> | ||
</package> | ||
<extension> | ||
<name> | ||
<name>Core</name> | ||
</name> | ||
<min> | ||
<min/> | ||
</min> | ||
<max> | ||
<max/> | ||
</max> | ||
</extension> | ||
</depends> | ||
<contents> | ||
<target> | ||
<target>magelocal</target> | ||
<target>mageetc</target> | ||
<target>magecommunity</target> | ||
</target> | ||
<path> | ||
<path/> | ||
<path>/modules/AndrejSinicyn_Decryptor.xml</path> | ||
<path>AndrejSinicyn/Decryptor</path> | ||
</path> | ||
<type> | ||
<type>file</type> | ||
<type>file</type> | ||
<type>dir</type> | ||
</type> | ||
<include> | ||
<include/> | ||
<include/> | ||
<include/> | ||
</include> | ||
<ignore> | ||
<ignore/> | ||
<ignore/> | ||
<ignore/> | ||
</ignore> | ||
</contents> | ||
</_> |