Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
rarog committed May 8, 2014
1 parent 9b9d296 commit 2d9e875
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 203 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ media/.htaccess
media/import/
media/xmlconnect/
media/catalog/product/cache/
api.php
nbproject/
pear
pear/
Expand All @@ -118,4 +117,3 @@ skin/frontend/default/iphone/
skin/frontend/default/modern/
skin/frontend/enterprise
skin/install/
var/
249 changes: 48 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions app/code/community/AndrejSinicyn/Decryptor/Helper/Data.php
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
{
}
27 changes: 27 additions & 0 deletions app/code/community/AndrejSinicyn/Decryptor/Model/Api.php
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;
}
}
37 changes: 37 additions & 0 deletions app/code/community/AndrejSinicyn/Decryptor/etc/api.xml
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>
36 changes: 36 additions & 0 deletions app/code/community/AndrejSinicyn/Decryptor/etc/config.xml
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>
29 changes: 29 additions & 0 deletions app/etc/modules/AndrejSinicyn_Decryptor.xml
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>
94 changes: 94 additions & 0 deletions var/connect/AndrejSinicyn_Decryptor.xml
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 &quot;cc_number_enc&quot;.

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(&apos;https://myserver.tld/api/soap/?wsdl&apos;);
$session = $client-&gt;login(&apos;MyUser&apos;, &apos;MyPassword&apos;);
$decodedData = $client-&gt;call($session, &apos;decryptor.decrypt&apos;, &apos;s0m3EnCrYpt3dD474&apos;);</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>
</_>

0 comments on commit 2d9e875

Please sign in to comment.