Mage_Ogone_Official - Version 1.0.1

Version Notes

1.0.0

Download this release

Release Info

Developer Magento Core Team
Extension Mage_Ogone_Official
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/core/Mage/Ogone/Helper/Data.php CHANGED
@@ -29,7 +29,6 @@
29
  */
30
  class Mage_Ogone_Helper_Data extends Mage_Core_Helper_Abstract
31
  {
32
- const CRYPT_ALGORITHM = 'sha1';
33
 
34
  /**
35
  * Crypt Data by SHA1 ctypting algorithm by secret key
@@ -41,9 +40,9 @@ class Mage_Ogone_Helper_Data extends Mage_Core_Helper_Abstract
41
  public function shaCrypt($data, $key='')
42
  {
43
  if (is_array($data)) {
44
- return Zend_Crypt::hash(self::CRYPT_ALGORITHM, implode("", $data));
45
  }if (is_string($data)) {
46
- return Zend_Crypt::hash(self::CRYPT_ALGORITHM, $data);
47
  } else {
48
  return "";
49
  }
@@ -60,9 +59,9 @@ class Mage_Ogone_Helper_Data extends Mage_Core_Helper_Abstract
60
  public function shaCryptValidation($data, $hash, $key='')
61
  {
62
  if (is_array($data)) {
63
- return (bool) (strtoupper(Zend_Crypt::hash(self::CRYPT_ALGORITHM, implode("", $data)))== $hash);
64
  } elseif (is_string($data)) {
65
- return (bool) (strtoupper(Zend_Crypt::hash(self::CRYPT_ALGORITHM, $data))== $hash);
66
  } else {
67
  return false;
68
  }
29
  */
30
  class Mage_Ogone_Helper_Data extends Mage_Core_Helper_Abstract
31
  {
 
32
 
33
  /**
34
  * Crypt Data by SHA1 ctypting algorithm by secret key
40
  public function shaCrypt($data, $key='')
41
  {
42
  if (is_array($data)) {
43
+ return bin2hex(mhash(MHASH_SHA1, implode("", $data), $key));
44
  }if (is_string($data)) {
45
+ return bin2hex(mhash(MHASH_SHA1, $data, $key));
46
  } else {
47
  return "";
48
  }
59
  public function shaCryptValidation($data, $hash, $key='')
60
  {
61
  if (is_array($data)) {
62
+ return (bool) (strtoupper(bin2hex(mhash(MHASH_SHA1, implode("", $data), $key)))== $hash);
63
  } elseif (is_string($data)) {
64
+ return (bool) (strtoupper(bin2hex(mhash(MHASH_SHA1, $data, $key)))== $hash);
65
  } else {
66
  return false;
67
  }
app/code/core/Mage/Ogone/etc/config.xml CHANGED
@@ -45,11 +45,24 @@
45
  </ogone_mysql4>
46
  </models>
47
  <resources>
48
- <ogone_setup>
49
  <setup>
50
  <module>Mage_Ogone</module>
51
  </setup>
 
 
 
52
  </ogone_setup>
 
 
 
 
 
 
 
 
 
 
53
  </resources>
54
  <blocks>
55
  <ogone>
45
  </ogone_mysql4>
46
  </models>
47
  <resources>
48
+ <ogone_setup>
49
  <setup>
50
  <module>Mage_Ogone</module>
51
  </setup>
52
+ <connection>
53
+ <use>core_setup</use>
54
+ </connection>
55
  </ogone_setup>
56
+ <ogone_write>
57
+ <connection>
58
+ <use>core_write</use>
59
+ </connection>
60
+ </ogone_write>
61
+ <ogone_read>
62
+ <connection>
63
+ <use>core_read</use>
64
+ </connection>
65
+ </ogone_read>
66
  </resources>
67
  <blocks>
68
  <ogone>