Quadra_Cybermut - Version 2.0.6

Version Notes

Changelog:

2.0.6:
- Fixed order state not saved on notification (thanks to @real34)
- Design and skin files moved in base directory (thanks to @fusco)
- Use getNotifyURL instead of Mage::getUrl() to generate the correct url_retour parameter (thanks to @lenybernard)
- Update license
- Update version

2.0.5:
- Fixe bug with complete state order

2.0.4:
- Add cancel status in the configuration

2.0.3:
- Bug fixed with multishipping

2.0.2:
- Some fields in the configuration of the module are now configurable in store view
- The field "empty cart" was added

2.0.1:
- Stable version

2.0.0:
- Magento 1.5 compatibility
- Multishipping compatibility
- Bug fixed with magento 1.4
- Beta version

Download this release

Release Info

Developer Quadra Informatique
Extension Quadra_Cybermut
Version 2.0.6
Comparing to
See all releases


Code changes from version 2.0.5 to 2.0.6

Files changed (36) hide show
  1. app/code/community/Quadra/Cybermut/Block/Error.php +9 -9
  2. app/code/community/Quadra/Cybermut/Block/Form.php +9 -8
  3. app/code/community/Quadra/Cybermut/Block/Redirect.php +9 -9
  4. app/code/community/Quadra/Cybermut/Helper/Data.php +7 -8
  5. app/code/community/Quadra/Cybermut/Model/Api/Debug.php +10 -9
  6. app/code/community/Quadra/Cybermut/Model/Config/Data/Cybermut.php +11 -9
  7. app/code/community/Quadra/Cybermut/Model/Mysql4/Api/Debug.php +10 -9
  8. app/code/community/Quadra/Cybermut/Model/Mysql4/Api/Debug/Collection.php +10 -9
  9. app/code/community/Quadra/Cybermut/Model/Mysql4/Setup.php +8 -8
  10. app/code/community/Quadra/Cybermut/Model/Observer.php +8 -8
  11. app/code/community/Quadra/Cybermut/Model/Payment.php +86 -84
  12. app/code/community/Quadra/Cybermut/Model/Source/Bank.php +9 -11
  13. app/code/community/Quadra/Cybermut/Model/Source/Language.php +9 -11
  14. app/code/community/Quadra/Cybermut/Model/Source/Terms.php +9 -11
  15. app/code/community/Quadra/Cybermut/Model/System/Config/Backend/Keyencrypted.php +9 -8
  16. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status.php +9 -8
  17. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Accepted.php +9 -8
  18. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Canceled.php +9 -8
  19. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/New.php +9 -8
  20. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Refused.php +9 -8
  21. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Version.php +8 -8
  22. app/code/community/Quadra/Cybermut/controllers/PaymentController.php +52 -87
  23. app/code/community/Quadra/Cybermut/etc/config.xml +7 -8
  24. app/code/community/Quadra/Cybermut/etc/system.xml +6 -7
  25. app/code/community/Quadra/Cybermut/sql/cybermut_setup/mysql4-install-0.1.0.php +8 -9
  26. app/code/community/Quadra/Cybermut/sql/cybermut_setup/mysql4-upgrade-1.0.1-1.0.2.php +7 -8
  27. app/design/frontend/base/default/layout/cybermut.xml +31 -0
  28. app/design/frontend/{default → base}/default/template/cybermut/error.phtml +6 -7
  29. app/design/frontend/base/default/template/cybermut/form.phtml +47 -0
  30. app/design/frontend/default/default/layout/cybermut.xml +0 -32
  31. app/design/frontend/default/default/template/cybermut/form.phtml +0 -48
  32. app/etc/modules/Quadra_Cybermut.xml +7 -8
  33. package.xml +13 -6
  34. skin/frontend/{default → base}/default/images/media/cybermut/cb.gif +0 -0
  35. skin/frontend/{default → base}/default/images/media/cybermut/master.gif +0 -0
  36. skin/frontend/{default → base}/default/images/media/cybermut/visa.gif +0 -0
app/code/community/Quadra/Cybermut/Block/Error.php CHANGED
@@ -1,20 +1,20 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Block_Error extends Mage_Core_Block_Template
19
  {
20
- }
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Block_Error extends Mage_Core_Block_Template
18
  {
19
+
20
+ }
app/code/community/Quadra/Cybermut/Block/Form.php CHANGED
@@ -1,25 +1,26 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Block_Form extends Mage_Payment_Block_Form
19
  {
 
20
  protected function _construct()
21
  {
22
  $this->setTemplate('cybermut/form.phtml');
23
  parent::_construct();
24
  }
 
25
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Block_Form extends Mage_Payment_Block_Form
18
  {
19
+
20
  protected function _construct()
21
  {
22
  $this->setTemplate('cybermut/form.phtml');
23
  parent::_construct();
24
  }
25
+
26
  }
app/code/community/Quadra/Cybermut/Block/Redirect.php CHANGED
@@ -1,20 +1,19 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Block_Redirect extends Mage_Core_Block_Abstract
19
  {
20
 
@@ -47,4 +46,5 @@ class Quadra_Cybermut_Block_Redirect extends Mage_Core_Block_Abstract
47
 
48
  return $html;
49
  }
50
- }
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Block_Redirect extends Mage_Core_Block_Abstract
18
  {
19
 
46
 
47
  return $html;
48
  }
49
+
50
+ }
app/code/community/Quadra/Cybermut/Helper/Data.php CHANGED
@@ -1,20 +1,19 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Helper_Data extends Mage_Core_Helper_Abstract
19
  {
20
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Helper_Data extends Mage_Core_Helper_Abstract
18
  {
19
 
app/code/community/Quadra/Cybermut/Model/Api/Debug.php CHANGED
@@ -1,24 +1,25 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Api_Debug extends Mage_Core_Model_Abstract
19
  {
 
20
  protected function _construct()
21
  {
22
  $this->_init('cybermut/api_debug');
23
  }
24
- }
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Api_Debug extends Mage_Core_Model_Abstract
18
  {
19
+
20
  protected function _construct()
21
  {
22
  $this->_init('cybermut/api_debug');
23
  }
24
+
25
+ }
app/code/community/Quadra/Cybermut/Model/Config/Data/Cybermut.php CHANGED
@@ -1,23 +1,24 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Config_Data_Cybermut extends Mage_Core_Model_Config_Data
19
  {
20
- public function _beforeSave() {
 
 
21
  $filename = BP . DS . 'app' . DS . 'code' . DS . 'local' . DS . 'Mage' . DS . 'Cybermut' . DS . 'etc' . DS . 'config.xml';
22
 
23
  if (file_exists($filename)) {
@@ -26,4 +27,5 @@ class Quadra_Cybermut_Model_Config_Data_Cybermut extends Mage_Core_Model_Config_
26
 
27
  return $this;
28
  }
 
29
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Config_Data_Cybermut extends Mage_Core_Model_Config_Data
18
  {
19
+
20
+ public function _beforeSave()
21
+ {
22
  $filename = BP . DS . 'app' . DS . 'code' . DS . 'local' . DS . 'Mage' . DS . 'Cybermut' . DS . 'etc' . DS . 'config.xml';
23
 
24
  if (file_exists($filename)) {
27
 
28
  return $this;
29
  }
30
+
31
  }
app/code/community/Quadra/Cybermut/Model/Mysql4/Api/Debug.php CHANGED
@@ -1,24 +1,25 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
19
  {
 
20
  protected function _construct()
21
  {
22
  $this->_init('cybermut/api_debug', 'debug_id');
23
  }
24
- }
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
18
  {
19
+
20
  protected function _construct()
21
  {
22
  $this->_init('cybermut/api_debug', 'debug_id');
23
  }
24
+
25
+ }
app/code/community/Quadra/Cybermut/Model/Mysql4/Api/Debug/Collection.php CHANGED
@@ -1,24 +1,25 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
19
  {
 
20
  protected function _construct()
21
  {
22
  $this->_init('cybermut/api_debug');
23
  }
24
- }
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
18
  {
19
+
20
  protected function _construct()
21
  {
22
  $this->_init('cybermut/api_debug');
23
  }
24
+
25
+ }
app/code/community/Quadra/Cybermut/Model/Mysql4/Setup.php CHANGED
@@ -1,20 +1,20 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
19
  {
 
20
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
18
  {
19
+
20
  }
app/code/community/Quadra/Cybermut/Model/Observer.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Observer
19
  {
 
20
  /**
21
  * Can redirect to Cybermut payment
22
  */
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Observer
18
  {
19
+
20
  /**
21
  * Can redirect to Cybermut payment
22
  */
app/code/community/Quadra/Cybermut/Model/Payment.php CHANGED
@@ -1,41 +1,40 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
19
  {
20
- protected $_code = 'cybermut_payment';
 
21
  protected $_formBlockType = 'cybermut/form';
22
 
23
  // Cybermut return codes of payment
24
- const RETURN_CODE_ACCEPTED = 'paiement';
25
  const RETURN_CODE_TEST_ACCEPTED = 'payetest';
26
- const RETURN_CODE_ERROR = 'Annulation';
27
 
28
  // Payment configuration
29
- protected $_isGateway = false;
30
- protected $_canAuthorize = true;
31
- protected $_canCapture = true;
32
- protected $_canCapturePartial = false;
33
- protected $_canRefund = false;
34
- protected $_canVoid = false;
35
- protected $_canUseInternal = false;
36
- protected $_canUseCheckout = true;
37
- protected $_canUseForMultishipping = true;
38
-
39
  // Order instance
40
  protected $_order = null;
41
 
@@ -122,7 +121,8 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
122
  *
123
  * @return Mage_Sales_Model_Quote
124
  */
125
- public function getQuote() {
 
126
  if (!$this->_quote) {
127
  $quoteId = Mage::getSingleton('checkout/session')->getLastQuoteId();
128
  $this->_quote = Mage::getModel('sales/quote')->load($quoteId);
@@ -196,7 +196,8 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
196
  return Mage::getUrl('cybermut/payment/redirect');
197
  }
198
 
199
- public function getAmount() {
 
200
  if ($this->getQuote()->getIsMultiShipping()) {
201
  $amount = $this->getQuote()->getBaseGrandTotal();
202
  } else {
@@ -231,13 +232,13 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
231
  'texte-libre' => $description,
232
  'lgue' => $this->_getLanguageCode(),
233
  'societe' => $this->getConfigData('site_code'),
234
- 'url_retour' => Mage::getUrl(),
235
  'url_retour_ok' => $this->getSuccessURL(),
236
  'url_retour_err' => $this->getErrorURL(),
237
  'bouton' => 'ButtonLabel'
238
  );
239
 
240
- if (((int) $this->getVersion()) >= 3) {
241
  $fields['mail'] = $order->getCustomerEmail();
242
  }
243
 
@@ -264,23 +265,23 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
264
  $fields['nbrech'] = $nbTerms;
265
 
266
  $terms = array(
267
- 'montantech1' => round($amount/$nbTerms, 2),
268
  'dateech1' => date('d/m/Y'));
269
 
270
- for ($i=2; $i<$nbTerms+1; $i++) {
271
- $terms['montantech'.$i] = $terms['montantech1'];
272
- $dateech = '+ '.($i-1).' month';
273
- $terms['dateech'.$i] = date('d/m/Y', strtotime($dateech));
274
  }
275
 
276
- if ($terms['montantech1']*$nbTerms != $amount) {
277
- $result = $terms['montantech1']*($nbTerms-1);
278
- $terms['montantech1'] = $amount-$result;
279
  }
280
 
281
  $order = $this->getOrder();
282
- for ($i=1; $i<$nbTerms+1; $i++) {
283
- $terms['montantech'.$i] = sprintf('%.2f', $terms['montantech'.$i]) . $order->getBaseCurrencyCode();
284
  }
285
 
286
  $fields = array_merge($fields, $terms);
@@ -330,7 +331,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
330
  */
331
  protected function _getMAC($data)
332
  {
333
- if (((int) $this->getVersion()) >= 3) {
334
  $string = sprintf('%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*', $data['TPE'], $data['date'], $data['montant'], $data['reference'], $data['texte-libre'], $data['version'], $data['lgue'], $data['societe'], $data['mail'], "", "", "", "", "", "", "", "", "");
335
  } else {
336
  $string = sprintf('%s*%s*%s*%s*%s*%s*%s*%s*', $data['TPE'], $data['date'], $data['montant'], $data['reference'], $data['texte-libre'], $data['version'], $data['lgue'], $data['societe']);
@@ -347,7 +348,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
347
  */
348
  public function getResponseMAC($data)
349
  {
350
- if (((int) $this->getVersion()) >= 3) {
351
  if (!array_key_exists('numauto', $data)) {
352
  $data['numauto'] = "";
353
  }
@@ -412,16 +413,16 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
412
  * @param none
413
  * @return string encrypted key
414
  */
415
- /*protected function _getKeyEncrypted()
416
- {
417
- $key = $this->getConfigData('key_encrypted');
418
- $key = Mage::helper('core')->decrypt($key);
419
 
420
- $avant_dernier_tranforme = (ord(substr($key, strlen($key) - 2, 1)) - 23);
421
- $key = substr($key, 0, strlen($key) - 2) . chr($avant_dernier_tranforme) . substr($key, strlen($key) - 1, 1);
422
 
423
- return pack("H*", $key);
424
- }*/
425
 
426
  protected function _getKeyEncrypted()
427
  {
@@ -470,7 +471,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
470
  */
471
  protected function _CMCIC_hmac_KeyEncrypted($string)
472
  {
473
- $key = $this->_getKeyEncrypted();
474
 
475
  $length = 64; // block length for SHA1
476
  if (strlen($key) > $length) {
@@ -483,7 +484,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
483
  $k_ipad = $key ^ $ipad;
484
  $k_opad = $key ^ $opad;
485
 
486
- return sha1($k_opad . pack("H*",sha1($k_ipad . $string)));
487
  }
488
 
489
  /**
@@ -495,7 +496,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
495
  */
496
  protected function _CMCIC_hmac_KeyPassphrase($string)
497
  {
498
- $pass = $this->_getSHAKey();
499
  $k1 = pack("H*", sha1($this->_getSHAKey()));
500
  $l1 = strlen($k1);
501
  $k2 = pack("H*", $this->_getKey());
@@ -528,7 +529,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
528
  $k_ipad = $key ^ $ipad;
529
  $k_opad = $key ^ $opad;
530
 
531
- return sha1($k_opad . pack("H*",sha1($k_ipad . $string)));
532
  }
533
 
534
  /**
@@ -537,24 +538,24 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
537
  * @param none
538
  * @return string MAC
539
  */
540
- /* <FONCTION OBSOLETE>
541
- protected function _CMCIC_hmac($string)
542
- {
543
- $pass = $this->_getSHAKey();
544
- $k1 = pack("H*", sha1($this->_getSHAKey()));
545
- $l1 = strlen($k1);
546
- $k2 = pack("H*", $this->_getKey());
547
- $l2 = strlen($k2);
548
- if ($l1 > $l2) {
549
- $k2 = str_pad($k2, $l1, chr(0x00));
550
- } elseif ($l2 > $l1) {
551
- $k1 = str_pad($k1, $l2, chr(0x00));
552
- }
553
 
554
- return strtolower($this->_hmacSHA1($k1 ^ $k2, $string));
555
- }
556
 
557
- <FONCTION OBSOLETE> */
558
 
559
  /**
560
  * MAC generation algorithm
@@ -563,23 +564,23 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
563
  * @return string MAC
564
  */
565
  /* <FONCTION OBSOLETE>
566
- protected function _hmacSHA1($key, $string)
567
- {
568
- $length = 64; // block length for SHA1
569
- if (strlen($key) > $length) {
570
- $key = pack("H*", sha1($key));
571
- }
572
 
573
- $key = str_pad($key, $length, chr(0x00));
574
- $ipad = str_pad('', $length, chr(0x36));
575
- $opad = str_pad('', $length, chr(0x5c));
576
- $k_ipad = $key ^ $ipad;
577
- $k_opad = $key ^ $opad;
578
 
579
- return sha1($k_opad . pack("H*",sha1($k_ipad . $string)));
580
- }
581
 
582
- </FONCTIONS OBSOLETES> */
583
 
584
  /**
585
  * Return authorized languages by CyberMUT
@@ -666,7 +667,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
666
  */
667
  public function getSuccessResponse()
668
  {
669
- if (((int) $this->getVersion()) >= 3) {
670
  $response = array(
671
  'version=2',
672
  'cdr=0'
@@ -691,7 +692,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
691
  */
692
  public function getErrorResponse()
693
  {
694
- if (((int) $this->getVersion()) >= 3) {
695
  $response = array(
696
  'version=2',
697
  'cdr=1'
@@ -712,7 +713,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
712
  {
713
  $msg = Mage::helper('cybermut')->__('Payment accepted by Cybermut');
714
 
715
- if (((int) $this->getVersion()) >= 3 && array_key_exists('numauto', $postData)) {
716
  $msg .= "<br />" . Mage::helper('cybermut')->__('Number of authorization: %s', $postData['numauto']);
717
  $msg .= "<br />" . Mage::helper('cybermut')->__('Was the visual cryptogram seized: %s', $postData['cvx']);
718
  $msg .= "<br />" . Mage::helper('cybermut')->__('Validity of the card: %s', $postData['vld']);
@@ -726,7 +727,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
726
  {
727
  $msg = Mage::helper('cybermut')->__('Payment refused by Cybermut');
728
 
729
- if (((int) $this->getVersion()) >= 3 && array_key_exists('motifrefus', $postData)) {
730
  $msg .= "<br />" . Mage::helper('cybermut')->__('Motive for refusal: %s', $postData['motifrefus']);
731
  $msg .= "<br />" . Mage::helper('cybermut')->__('Was the visual cryptogram seized: %s', $postData['cvx']);
732
  $msg .= "<br />" . Mage::helper('cybermut')->__('Validity of the card: %s', $postData['vld']);
@@ -735,4 +736,5 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
735
 
736
  return $msg;
737
  }
738
- }
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
18
  {
19
+
20
+ protected $_code = 'cybermut_payment';
21
  protected $_formBlockType = 'cybermut/form';
22
 
23
  // Cybermut return codes of payment
24
+ const RETURN_CODE_ACCEPTED = 'paiement';
25
  const RETURN_CODE_TEST_ACCEPTED = 'payetest';
26
+ const RETURN_CODE_ERROR = 'Annulation';
27
 
28
  // Payment configuration
29
+ protected $_isGateway = false;
30
+ protected $_canAuthorize = true;
31
+ protected $_canCapture = true;
32
+ protected $_canCapturePartial = false;
33
+ protected $_canRefund = false;
34
+ protected $_canVoid = false;
35
+ protected $_canUseInternal = false;
36
+ protected $_canUseCheckout = true;
37
+ protected $_canUseForMultishipping = true;
 
38
  // Order instance
39
  protected $_order = null;
40
 
121
  *
122
  * @return Mage_Sales_Model_Quote
123
  */
124
+ public function getQuote()
125
+ {
126
  if (!$this->_quote) {
127
  $quoteId = Mage::getSingleton('checkout/session')->getLastQuoteId();
128
  $this->_quote = Mage::getModel('sales/quote')->load($quoteId);
196
  return Mage::getUrl('cybermut/payment/redirect');
197
  }
198
 
199
+ public function getAmount()
200
+ {
201
  if ($this->getQuote()->getIsMultiShipping()) {
202
  $amount = $this->getQuote()->getBaseGrandTotal();
203
  } else {
232
  'texte-libre' => $description,
233
  'lgue' => $this->_getLanguageCode(),
234
  'societe' => $this->getConfigData('site_code'),
235
+ 'url_retour' => $this->getNotifyURL(),
236
  'url_retour_ok' => $this->getSuccessURL(),
237
  'url_retour_err' => $this->getErrorURL(),
238
  'bouton' => 'ButtonLabel'
239
  );
240
 
241
+ if (((int)$this->getVersion()) >= 3) {
242
  $fields['mail'] = $order->getCustomerEmail();
243
  }
244
 
265
  $fields['nbrech'] = $nbTerms;
266
 
267
  $terms = array(
268
+ 'montantech1' => round($amount / $nbTerms, 2),
269
  'dateech1' => date('d/m/Y'));
270
 
271
+ for ($i = 2; $i < $nbTerms + 1; $i++) {
272
+ $terms['montantech' . $i] = $terms['montantech1'];
273
+ $dateech = '+ ' . ($i - 1) . ' month';
274
+ $terms['dateech' . $i] = date('d/m/Y', strtotime($dateech));
275
  }
276
 
277
+ if ($terms['montantech1'] * $nbTerms != $amount) {
278
+ $result = $terms['montantech1'] * ($nbTerms - 1);
279
+ $terms['montantech1'] = $amount - $result;
280
  }
281
 
282
  $order = $this->getOrder();
283
+ for ($i = 1; $i < $nbTerms + 1; $i++) {
284
+ $terms['montantech' . $i] = sprintf('%.2f', $terms['montantech' . $i]) . $order->getBaseCurrencyCode();
285
  }
286
 
287
  $fields = array_merge($fields, $terms);
331
  */
332
  protected function _getMAC($data)
333
  {
334
+ if (((int)$this->getVersion()) >= 3) {
335
  $string = sprintf('%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*%s*', $data['TPE'], $data['date'], $data['montant'], $data['reference'], $data['texte-libre'], $data['version'], $data['lgue'], $data['societe'], $data['mail'], "", "", "", "", "", "", "", "", "");
336
  } else {
337
  $string = sprintf('%s*%s*%s*%s*%s*%s*%s*%s*', $data['TPE'], $data['date'], $data['montant'], $data['reference'], $data['texte-libre'], $data['version'], $data['lgue'], $data['societe']);
348
  */
349
  public function getResponseMAC($data)
350
  {
351
+ if (((int)$this->getVersion()) >= 3) {
352
  if (!array_key_exists('numauto', $data)) {
353
  $data['numauto'] = "";
354
  }
413
  * @param none
414
  * @return string encrypted key
415
  */
416
+ /* protected function _getKeyEncrypted()
417
+ {
418
+ $key = $this->getConfigData('key_encrypted');
419
+ $key = Mage::helper('core')->decrypt($key);
420
 
421
+ $avant_dernier_tranforme = (ord(substr($key, strlen($key) - 2, 1)) - 23);
422
+ $key = substr($key, 0, strlen($key) - 2) . chr($avant_dernier_tranforme) . substr($key, strlen($key) - 1, 1);
423
 
424
+ return pack("H*", $key);
425
+ } */
426
 
427
  protected function _getKeyEncrypted()
428
  {
471
  */
472
  protected function _CMCIC_hmac_KeyEncrypted($string)
473
  {
474
+ $key = $this->_getKeyEncrypted();
475
 
476
  $length = 64; // block length for SHA1
477
  if (strlen($key) > $length) {
484
  $k_ipad = $key ^ $ipad;
485
  $k_opad = $key ^ $opad;
486
 
487
+ return sha1($k_opad . pack("H*", sha1($k_ipad . $string)));
488
  }
489
 
490
  /**
496
  */
497
  protected function _CMCIC_hmac_KeyPassphrase($string)
498
  {
499
+ $pass = $this->_getSHAKey();
500
  $k1 = pack("H*", sha1($this->_getSHAKey()));
501
  $l1 = strlen($k1);
502
  $k2 = pack("H*", $this->_getKey());
529
  $k_ipad = $key ^ $ipad;
530
  $k_opad = $key ^ $opad;
531
 
532
+ return sha1($k_opad . pack("H*", sha1($k_ipad . $string)));
533
  }
534
 
535
  /**
538
  * @param none
539
  * @return string MAC
540
  */
541
+ /* <FONCTION OBSOLETE>
542
+ protected function _CMCIC_hmac($string)
543
+ {
544
+ $pass = $this->_getSHAKey();
545
+ $k1 = pack("H*", sha1($this->_getSHAKey()));
546
+ $l1 = strlen($k1);
547
+ $k2 = pack("H*", $this->_getKey());
548
+ $l2 = strlen($k2);
549
+ if ($l1 > $l2) {
550
+ $k2 = str_pad($k2, $l1, chr(0x00));
551
+ } elseif ($l2 > $l1) {
552
+ $k1 = str_pad($k1, $l2, chr(0x00));
553
+ }
554
 
555
+ return strtolower($this->_hmacSHA1($k1 ^ $k2, $string));
556
+ }
557
 
558
+ <FONCTION OBSOLETE> */
559
 
560
  /**
561
  * MAC generation algorithm
564
  * @return string MAC
565
  */
566
  /* <FONCTION OBSOLETE>
567
+ protected function _hmacSHA1($key, $string)
568
+ {
569
+ $length = 64; // block length for SHA1
570
+ if (strlen($key) > $length) {
571
+ $key = pack("H*", sha1($key));
572
+ }
573
 
574
+ $key = str_pad($key, $length, chr(0x00));
575
+ $ipad = str_pad('', $length, chr(0x36));
576
+ $opad = str_pad('', $length, chr(0x5c));
577
+ $k_ipad = $key ^ $ipad;
578
+ $k_opad = $key ^ $opad;
579
 
580
+ return sha1($k_opad . pack("H*",sha1($k_ipad . $string)));
581
+ }
582
 
583
+ </FONCTIONS OBSOLETES> */
584
 
585
  /**
586
  * Return authorized languages by CyberMUT
667
  */
668
  public function getSuccessResponse()
669
  {
670
+ if (((int)$this->getVersion()) >= 3) {
671
  $response = array(
672
  'version=2',
673
  'cdr=0'
692
  */
693
  public function getErrorResponse()
694
  {
695
+ if (((int)$this->getVersion()) >= 3) {
696
  $response = array(
697
  'version=2',
698
  'cdr=1'
713
  {
714
  $msg = Mage::helper('cybermut')->__('Payment accepted by Cybermut');
715
 
716
+ if (((int)$this->getVersion()) >= 3 && array_key_exists('numauto', $postData)) {
717
  $msg .= "<br />" . Mage::helper('cybermut')->__('Number of authorization: %s', $postData['numauto']);
718
  $msg .= "<br />" . Mage::helper('cybermut')->__('Was the visual cryptogram seized: %s', $postData['cvx']);
719
  $msg .= "<br />" . Mage::helper('cybermut')->__('Validity of the card: %s', $postData['vld']);
727
  {
728
  $msg = Mage::helper('cybermut')->__('Payment refused by Cybermut');
729
 
730
+ if (((int)$this->getVersion()) >= 3 && array_key_exists('motifrefus', $postData)) {
731
  $msg .= "<br />" . Mage::helper('cybermut')->__('Motive for refusal: %s', $postData['motifrefus']);
732
  $msg .= "<br />" . Mage::helper('cybermut')->__('Was the visual cryptogram seized: %s', $postData['cvx']);
733
  $msg .= "<br />" . Mage::helper('cybermut')->__('Validity of the card: %s', $postData['vld']);
736
 
737
  return $msg;
738
  }
739
+
740
+ }
app/code/community/Quadra/Cybermut/Model/Source/Bank.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Source_Bank
19
  {
 
20
  public function toOptionArray()
21
  {
22
  return array(
@@ -25,7 +25,5 @@ class Quadra_Cybermut_Model_Source_Bank
25
  array('value' => 'obc', 'label' => Mage::helper('cybermut')->__('OBC')),
26
  );
27
  }
28
- }
29
-
30
-
31
 
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Source_Bank
18
  {
19
+
20
  public function toOptionArray()
21
  {
22
  return array(
25
  array('value' => 'obc', 'label' => Mage::helper('cybermut')->__('OBC')),
26
  );
27
  }
 
 
 
28
 
29
+ }
app/code/community/Quadra/Cybermut/Model/Source/Language.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Source_Language
19
  {
 
20
  public function toOptionArray()
21
  {
22
  return array(
@@ -28,7 +28,5 @@ class Quadra_Cybermut_Model_Source_Language
28
  array('value' => 'NL', 'label' => Mage::helper('cybermut')->__('Dutch')),
29
  );
30
  }
31
- }
32
-
33
-
34
 
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Source_Language
18
  {
19
+
20
  public function toOptionArray()
21
  {
22
  return array(
28
  array('value' => 'NL', 'label' => Mage::helper('cybermut')->__('Dutch')),
29
  );
30
  }
 
 
 
31
 
32
+ }
app/code/community/Quadra/Cybermut/Model/Source/Terms.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_Source_Terms
19
  {
 
20
  public function toOptionArray()
21
  {
22
  return array(
@@ -25,7 +25,5 @@ class Quadra_Cybermut_Model_Source_Terms
25
  array('value' => '4', 'label' => Mage::helper('cybermut')->__('Payment 4 times')),
26
  );
27
  }
28
- }
29
-
30
-
31
 
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_Source_Terms
18
  {
19
+
20
  public function toOptionArray()
21
  {
22
  return array(
25
  array('value' => '4', 'label' => Mage::helper('cybermut')->__('Payment 4 times')),
26
  );
27
  }
 
 
 
28
 
29
+ }
app/code/community/Quadra/Cybermut/Model/System/Config/Backend/Keyencrypted.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_System_Config_Backend_Keyencrypted extends Mage_Core_Model_Config_Data
19
  {
 
20
  /**
21
  * Enter description here...
22
  *
@@ -39,4 +39,5 @@ class Quadra_Cybermut_Model_System_Config_Backend_Keyencrypted extends Mage_Core
39
  }
40
  }
41
  }
 
42
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_System_Config_Backend_Keyencrypted extends Mage_Core_Model_Config_Data
18
  {
19
+
20
  /**
21
  * Enter description here...
22
  *
39
  }
40
  }
41
  }
42
+
43
  }
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status
19
  {
 
20
  // set null to enable all possible
21
  protected $_stateStatuses = array();
22
 
@@ -40,4 +40,5 @@ class Quadra_Cybermut_Model_System_Config_Source_Order_Status
40
  }
41
  return $options;
42
  }
 
43
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status
18
  {
19
+
20
  // set null to enable all possible
21
  protected $_stateStatuses = array();
22
 
40
  }
41
  return $options;
42
  }
43
+
44
  }
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Accepted.php CHANGED
@@ -1,26 +1,27 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Accepted extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
19
  {
 
20
  // set null to enable all possible
21
  protected $_stateStatuses = array(
22
  Mage_Sales_Model_Order::STATE_NEW,
23
  Mage_Sales_Model_Order::STATE_PROCESSING,
24
  Mage_Sales_Model_Order::STATE_COMPLETE
25
  );
 
26
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Accepted extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
18
  {
19
+
20
  // set null to enable all possible
21
  protected $_stateStatuses = array(
22
  Mage_Sales_Model_Order::STATE_NEW,
23
  Mage_Sales_Model_Order::STATE_PROCESSING,
24
  Mage_Sales_Model_Order::STATE_COMPLETE
25
  );
26
+
27
  }
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Canceled.php CHANGED
@@ -1,25 +1,26 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Canceled extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
19
  {
 
20
  // set null to enable all possible
21
  protected $_stateStatuses = array(
22
  Mage_Sales_Model_Order::STATE_HOLDED,
23
  Mage_Sales_Model_Order::STATE_CANCELED
24
  );
 
25
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Canceled extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
18
  {
19
+
20
  // set null to enable all possible
21
  protected $_stateStatuses = array(
22
  Mage_Sales_Model_Order::STATE_HOLDED,
23
  Mage_Sales_Model_Order::STATE_CANCELED
24
  );
25
+
26
  }
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/New.php CHANGED
@@ -1,25 +1,26 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status_New extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
19
  {
 
20
  // set null to enable all possible
21
  protected $_stateStatuses = array(
22
  Mage_Sales_Model_Order::STATE_NEW,
23
  Mage_Sales_Model_Order::STATE_PROCESSING
24
  );
 
25
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status_New extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
18
  {
19
+
20
  // set null to enable all possible
21
  protected $_stateStatuses = array(
22
  Mage_Sales_Model_Order::STATE_NEW,
23
  Mage_Sales_Model_Order::STATE_PROCESSING
24
  );
25
+
26
  }
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Refused.php CHANGED
@@ -1,25 +1,26 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Refused extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
19
  {
 
20
  // set null to enable all possible
21
  protected $_stateStatuses = array(
22
  Mage_Sales_Model_Order::STATE_HOLDED,
23
  Mage_Sales_Model_Order::STATE_CANCELED
24
  );
 
25
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Refused extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
18
  {
19
+
20
  // set null to enable all possible
21
  protected $_stateStatuses = array(
22
  Mage_Sales_Model_Order::STATE_HOLDED,
23
  Mage_Sales_Model_Order::STATE_CANCELED
24
  );
25
+
26
  }
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Version.php CHANGED
@@ -1,20 +1,19 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  class Quadra_Cybermut_Model_System_Config_Source_Version
19
  {
20
 
@@ -37,4 +36,5 @@ class Quadra_Cybermut_Model_System_Config_Source_Version
37
 
38
  return $options;
39
  }
 
40
  }
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  class Quadra_Cybermut_Model_System_Config_Source_Version
18
  {
19
 
36
 
37
  return $options;
38
  }
39
+
40
  }
app/code/community/Quadra/Cybermut/controllers/PaymentController.php CHANGED
@@ -1,22 +1,21 @@
1
  <?php
2
 
3
- /*
4
- * 1997-2012 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
14
- * @copyright 1997-2013 Quadra Informatique
15
- * @version Release: $Revision: 2.0.5 $
16
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
-
19
- class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Action {
20
 
21
  protected $_cybermutResponse = null;
22
  protected $_realOrderIds;
@@ -27,7 +26,8 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
27
  *
28
  * @return Mage_Sales_Model_Quote
29
  */
30
- public function getQuote() {
 
31
  if (!$this->_quote) {
32
  $session = Mage::getSingleton('checkout/session');
33
  $this->_quote = Mage::getModel('sales/quote')->load($session->getCybermutPaymentQuoteId());
@@ -48,7 +48,8 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
48
  *
49
  * @return array
50
  */
51
- public function getRealOrderIds() {
 
52
  if (!$this->_realOrderIds) {
53
  if ($this->_cybermutResponse) {
54
  $this->_realOrderIds = explode(',', $this->_cybermutResponse['reference']);
@@ -67,7 +68,8 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
67
  * @param array $response
68
  * @return object $this
69
  */
70
- protected function setCybermutResponse($response) {
 
71
  if (count($response)) {
72
  $this->_cybermutResponse = $response;
73
  }
@@ -78,7 +80,8 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
78
  * When a customer chooses Cybermut on Checkout/Payment page
79
  *
80
  */
81
- public function redirectAction() {
 
82
  $session = Mage::getSingleton('checkout/session');
83
  $session->setCybermutPaymentQuoteId($session->getLastQuoteId());
84
 
@@ -99,10 +102,7 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
99
  return;
100
  }
101
 
102
- $order->addStatusToHistory(
103
- $order->getStatus(),
104
- Mage::helper('cybermut')->__('Customer was redirected to Cybermut')
105
- );
106
  $order->save();
107
  }
108
 
@@ -121,7 +121,8 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
121
  * @param none
122
  * @return void
123
  */
124
- public function notifyAction() {
 
125
  $model = Mage::getModel('cybermut/payment');
126
 
127
  if ($this->getRequest()->isPost()) {
@@ -176,8 +177,8 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
176
  $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, $status, $message);
177
  } else if ($status == Mage_Sales_Model_Order::STATE_COMPLETE) {
178
  $this->saveInvoice($order);
179
- if($order->canShip()) {
180
- $itemQty = $order->getItemsCollection()->count();
181
  $shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($itemQty);
182
  $shipment = new Mage_Sales_Model_Order_Shipment_Api();
183
  $shipment->create($order->getIncrementId());
@@ -188,12 +189,11 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
188
  }
189
  $order->addStatusToHistory($status, $message, true);
190
  }
 
191
 
192
  if (!$order->getEmailSent()) {
193
  $order->sendNewOrderEmail();
194
  }
195
-
196
- $order->save();
197
  }
198
  } else {
199
  foreach ($this->getRealOrderIds() as $realOrderId) {
@@ -209,14 +209,12 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
209
  $status = $order->getStatus();
210
  }
211
 
212
- $order->addStatusToHistory(
213
- $status, $messageError
214
- );
215
-
216
  if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
217
  $order->hold();
 
 
218
  }
219
-
220
  $order->save();
221
  }
222
  }
@@ -229,11 +227,9 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
229
  } else {
230
  foreach ($this->getRealOrderIds() as $realOrderId) {
231
  $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
232
- $order->addStatusToHistory(
233
- $order->getStatus(), Mage::helper('cybermut')->__('Returned MAC is invalid. Order cancelled.')
234
- );
235
  if ($order->canCancel())
236
  $order->cancel();
 
237
  $order->save();
238
  }
239
  $model->generateErrorResponse();
@@ -246,37 +242,23 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
246
  * @param Mage_Sales_Model_Order $order
247
  * @return boolean Can save invoice or not
248
  */
249
- protected function saveInvoice(Mage_Sales_Model_Order $order) {
 
250
  if ($order->canInvoice()) {
 
 
251
 
252
- $version = Mage::getVersion();
253
- $version = substr($version, 0, 5);
254
- $version = str_replace('.', '', $version);
255
- while (strlen($version) < 3) {
256
- $version .= "0";
257
- }
258
 
259
- if (((int) $version) < 111) {
260
- $convertor = Mage::getModel('sales/convert_order');
261
- $invoice = $convertor->toInvoice($order);
262
- foreach ($order->getAllItems() as $orderItem) {
263
- if (!$orderItem->getQtyToInvoice()) {
264
- continue;
265
- }
266
- $item = $convertor->itemToInvoiceItem($orderItem);
267
- $item->setQty($orderItem->getQtyToInvoice());
268
- $invoice->addItem($item);
269
- }
270
- $invoice->collectTotals();
271
- } else {
272
- $invoice = $order->prepareInvoice();
273
  }
274
 
275
- $invoice->register()->capture();
276
- Mage::getModel('core/resource_transaction')
277
- ->addObject($invoice)
278
- ->addObject($invoice->getOrder())
279
- ->save();
280
  return true;
281
  }
282
 
@@ -289,12 +271,12 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
289
  * @param none
290
  * @return void
291
  */
292
- public function successAction() {
 
293
  $session = Mage::getSingleton('checkout/session');
294
  $session->setQuoteId($session->getCybermutPaymentQuoteId());
295
  $session->unsCybermutPaymentQuoteId();
296
  $session->setCanRedirect(false);
297
-
298
  $session->setIsMultishipping(false);
299
 
300
  if ($this->getQuote()->getIsMultiShipping())
@@ -308,10 +290,7 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
308
  return;
309
  }
310
 
311
- $order->addStatusToHistory(
312
- $order->getStatus(), Mage::helper('cybermut')->__('Customer successfully returned from Cybermut')
313
- );
314
-
315
  $order->save();
316
 
317
  if ($this->getQuote()->getIsMultiShipping())
@@ -337,46 +316,29 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
337
  * @param none
338
  * @return void
339
  */
340
- public function errorAction() {
 
341
  $session = Mage::getSingleton('checkout/session');
342
  $model = Mage::getModel('cybermut/payment');
343
 
344
  $session->setIsMultishipping(false);
345
 
346
- if ($this->getQuote()->getIsMultiShipping())
347
- $orderIds = array();
348
-
349
  foreach ($this->getRealOrderIds() as $realOrderId) {
350
  $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
351
 
352
  if (!$order->getId()) {
353
-
354
- //$this->_redirect('checkout/onepage/error');
355
- //return;
356
  } else if ($order instanceof Mage_Sales_Model_Order && $order->getId()) {
357
- /* $order->addStatusToHistory(
358
- $model->getConfigData('order_status_payment_canceled'),
359
- Mage::helper('cybermut')->__('Customer returned from Cybermut.')
360
- );
361
-
362
- if ($model->getConfigData('order_status_payment_canceled') == Mage_Sales_Model_Order::STATE_CANCELED) {
363
- $order->cancel();
364
- } */
365
-
366
  if (!$status = $model->getConfigData('order_status_payment_canceled')) {
367
  $status = $order->getStatus();
368
  }
369
 
370
- $order->addStatusToHistory(
371
- $status, $this->__('Order was canceled by customer')
372
- );
373
-
374
  if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
375
  $order->hold();
376
- } else if ($status == Mage_Sales_Model_Order::STATE_CANCELED && $order->canCancel()) {
377
  $order->cancel();
378
  }
379
-
380
  $order->save();
381
  }
382
  }
@@ -388,7 +350,8 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
388
  $this->_redirect($this->_getErrorRedirect());
389
  }
390
 
391
- protected function _reorder() {
 
392
  $cart = Mage::getSingleton('checkout/cart');
393
  $cartTruncated = false;
394
  /* @var $cart Mage_Checkout_Model_Cart */
@@ -418,14 +381,16 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
418
  $cart->save();
419
  }
420
 
421
- protected function _getSuccessRedirect() {
 
422
  if ($this->getQuote()->getIsMultiShipping())
423
  return 'checkout/multishipping/success';
424
  else
425
  return 'checkout/onepage/success';
426
  }
427
 
428
- protected function _getErrorRedirect() {
 
429
  if ($this->getQuote()->getIsMultiShipping()) {
430
  return 'checkout/cart';
431
  } else {
1
  <?php
2
 
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
17
+ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Action
18
+ {
19
 
20
  protected $_cybermutResponse = null;
21
  protected $_realOrderIds;
26
  *
27
  * @return Mage_Sales_Model_Quote
28
  */
29
+ public function getQuote()
30
+ {
31
  if (!$this->_quote) {
32
  $session = Mage::getSingleton('checkout/session');
33
  $this->_quote = Mage::getModel('sales/quote')->load($session->getCybermutPaymentQuoteId());
48
  *
49
  * @return array
50
  */
51
+ public function getRealOrderIds()
52
+ {
53
  if (!$this->_realOrderIds) {
54
  if ($this->_cybermutResponse) {
55
  $this->_realOrderIds = explode(',', $this->_cybermutResponse['reference']);
68
  * @param array $response
69
  * @return object $this
70
  */
71
+ protected function setCybermutResponse($response)
72
+ {
73
  if (count($response)) {
74
  $this->_cybermutResponse = $response;
75
  }
80
  * When a customer chooses Cybermut on Checkout/Payment page
81
  *
82
  */
83
+ public function redirectAction()
84
+ {
85
  $session = Mage::getSingleton('checkout/session');
86
  $session->setCybermutPaymentQuoteId($session->getLastQuoteId());
87
 
102
  return;
103
  }
104
 
105
+ $order->addStatusHistoryComment(Mage::helper('cybermut')->__('Customer was redirected to Cybermut'));
 
 
 
106
  $order->save();
107
  }
108
 
121
  * @param none
122
  * @return void
123
  */
124
+ public function notifyAction()
125
+ {
126
  $model = Mage::getModel('cybermut/payment');
127
 
128
  if ($this->getRequest()->isPost()) {
177
  $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, $status, $message);
178
  } else if ($status == Mage_Sales_Model_Order::STATE_COMPLETE) {
179
  $this->saveInvoice($order);
180
+ if ($order->canShip()) {
181
+ $itemQty = $order->getItemsCollection()->count();
182
  $shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($itemQty);
183
  $shipment = new Mage_Sales_Model_Order_Shipment_Api();
184
  $shipment->create($order->getIncrementId());
189
  }
190
  $order->addStatusToHistory($status, $message, true);
191
  }
192
+ $order->save();
193
 
194
  if (!$order->getEmailSent()) {
195
  $order->sendNewOrderEmail();
196
  }
 
 
197
  }
198
  } else {
199
  foreach ($this->getRealOrderIds() as $realOrderId) {
209
  $status = $order->getStatus();
210
  }
211
 
 
 
 
 
212
  if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
213
  $order->hold();
214
+ } elseif ($status == Mage_Sales_Model_Order::STATE_CANCELED && $order->canCancel()) {
215
+ $order->cancel();
216
  }
217
+ $order->addStatusHistoryComment($messageError);
218
  $order->save();
219
  }
220
  }
227
  } else {
228
  foreach ($this->getRealOrderIds() as $realOrderId) {
229
  $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
 
 
 
230
  if ($order->canCancel())
231
  $order->cancel();
232
+ $order->addStatusHistoryComment(Mage::helper('cybermut')->__('Returned MAC is invalid. Order cancelled.'));
233
  $order->save();
234
  }
235
  $model->generateErrorResponse();
242
  * @param Mage_Sales_Model_Order $order
243
  * @return boolean Can save invoice or not
244
  */
245
+ protected function saveInvoice(Mage_Sales_Model_Order $order, $ship = false)
246
+ {
247
  if ($order->canInvoice()) {
248
+ $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
249
+ $invoice->register()->capture();
250
 
251
+ $transactionSave = Mage::getModel('core/resource_transaction')
252
+ ->addObject($invoice)
253
+ ->addObject($invoice->getOrder());
 
 
 
254
 
255
+ if ($ship && $order->canShip()) {
256
+ $shipment = Mage::getModel('sales/service_order', $order)->prepareShipment();
257
+ $shipment->register();
258
+ $transactionSave->addObject($shipment);
 
 
 
 
 
 
 
 
 
 
259
  }
260
 
261
+ $transactionSave->save();
 
 
 
 
262
  return true;
263
  }
264
 
271
  * @param none
272
  * @return void
273
  */
274
+ public function successAction()
275
+ {
276
  $session = Mage::getSingleton('checkout/session');
277
  $session->setQuoteId($session->getCybermutPaymentQuoteId());
278
  $session->unsCybermutPaymentQuoteId();
279
  $session->setCanRedirect(false);
 
280
  $session->setIsMultishipping(false);
281
 
282
  if ($this->getQuote()->getIsMultiShipping())
290
  return;
291
  }
292
 
293
+ $order->addStatusHistoryComment(Mage::helper('cybermut')->__('Customer successfully returned from Cybermut'));
 
 
 
294
  $order->save();
295
 
296
  if ($this->getQuote()->getIsMultiShipping())
316
  * @param none
317
  * @return void
318
  */
319
+ public function errorAction()
320
+ {
321
  $session = Mage::getSingleton('checkout/session');
322
  $model = Mage::getModel('cybermut/payment');
323
 
324
  $session->setIsMultishipping(false);
325
 
 
 
 
326
  foreach ($this->getRealOrderIds() as $realOrderId) {
327
  $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
328
 
329
  if (!$order->getId()) {
330
+ continue;
 
 
331
  } else if ($order instanceof Mage_Sales_Model_Order && $order->getId()) {
 
 
 
 
 
 
 
 
 
332
  if (!$status = $model->getConfigData('order_status_payment_canceled')) {
333
  $status = $order->getStatus();
334
  }
335
 
 
 
 
 
336
  if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
337
  $order->hold();
338
+ } elseif ($status == Mage_Sales_Model_Order::STATE_CANCELED && $order->canCancel()) {
339
  $order->cancel();
340
  }
341
+ $order->addStatusHistoryComment($this->__('Order was canceled by customer'));
342
  $order->save();
343
  }
344
  }
350
  $this->_redirect($this->_getErrorRedirect());
351
  }
352
 
353
+ protected function _reorder()
354
+ {
355
  $cart = Mage::getSingleton('checkout/cart');
356
  $cartTruncated = false;
357
  /* @var $cart Mage_Checkout_Model_Cart */
381
  $cart->save();
382
  }
383
 
384
+ protected function _getSuccessRedirect()
385
+ {
386
  if ($this->getQuote()->getIsMultiShipping())
387
  return 'checkout/multishipping/success';
388
  else
389
  return 'checkout/onepage/success';
390
  }
391
 
392
+ protected function _getErrorRedirect()
393
+ {
394
  if ($this->getQuote()->getIsMultiShipping()) {
395
  return 'checkout/cart';
396
  } else {
app/code/community/Quadra/Cybermut/etc/config.xml CHANGED
@@ -1,25 +1,24 @@
1
  <?xml version="1.0"?>
2
  <!--
3
- /*
4
- * 1997-2012 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
14
- * @copyright 1997-2013 Quadra Informatique
15
- * @version Release: $Revision: 2.0.5 $
16
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
20
  <modules>
21
  <Quadra_Cybermut>
22
- <version>2.0.5</version>
23
  </Quadra_Cybermut>
24
  </modules>
25
  <global>
1
  <?xml version="1.0"?>
2
  <!--
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
17
  -->
18
  <config>
19
  <modules>
20
  <Quadra_Cybermut>
21
+ <version>2.0.6</version>
22
  </Quadra_Cybermut>
23
  </modules>
24
  <global>
app/code/community/Quadra/Cybermut/etc/system.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <!--
3
- /*
4
- * 1997-2012 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
14
- * @copyright 1997-2013 Quadra Informatique
15
- * @version Release: $Revision: 2.0.5 $
16
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
1
  <?xml version="1.0"?>
2
  <!--
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
17
  -->
18
  <config>
app/code/community/Quadra/Cybermut/sql/cybermut_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,20 +1,19 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  $installer = $this;
19
  /* @var $installer Quadra_Cybermut_Model_Mysql4_Setup */
20
 
@@ -33,4 +32,4 @@ CREATE TABLE `{$this->getTable('cybermut_api_debug')}` (
33
 
34
  ");
35
 
36
- $installer->endSetup();
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  $installer = $this;
18
  /* @var $installer Quadra_Cybermut_Model_Mysql4_Setup */
19
 
32
 
33
  ");
34
 
35
+ $installer->endSetup();
app/code/community/Quadra/Cybermut/sql/cybermut_setup/mysql4-upgrade-1.0.1-1.0.2.php CHANGED
@@ -1,20 +1,19 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
 
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
-
18
  $installer = $this;
19
  /* @var $installer Mage_Core_Model_Resource_Setup */
20
 
1
  <?php
2
+
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
 
17
  $installer = $this;
18
  /* @var $installer Mage_Core_Model_Resource_Setup */
19
 
app/design/frontend/base/default/layout/cybermut.xml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0) that is available
9
+ * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
+ * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
+ *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
+ */
17
+ -->
18
+
19
+ <layout version="0.1.0">
20
+ <!--
21
+ Cybermut Failure Response Page
22
+ -->
23
+ <cybermut_payment_error>
24
+ <reference name="root">
25
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
26
+ </reference>
27
+ <reference name="content">
28
+ <block type="cybermut/error" name="cybermut_error" template="cybermut/error.phtml"></block>
29
+ </reference>
30
+ </cybermut_payment_error>
31
+ </layout>
app/design/frontend/{default → base}/default/template/cybermut/error.phtml RENAMED
@@ -1,18 +1,17 @@
1
  <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
  */
17
  ?>
18
  <div class="page-head">
1
  <?php
2
+ /**
3
+ * 1997-2015 Quadra Informatique
4
  *
5
  * NOTICE OF LICENSE
6
  *
7
  * This source file is subject to the Open Software License (OSL 3.0) that is available
8
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
  * If you are unable to obtain it through the world-wide-web, please send an email
10
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
11
  *
12
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
13
+ * @copyright 1997-2015 Quadra Informatique
14
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
15
  */
16
  ?>
17
  <div class="page-head">
app/design/frontend/base/default/template/cybermut/form.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * 1997-2015 Quadra Informatique
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0) that is available
8
+ * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
+ * If you are unable to obtain it through the world-wide-web, please send an email
10
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
11
+ *
12
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
13
+ * @copyright 1997-2015 Quadra Informatique
14
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
15
+ */
16
+ ?>
17
+
18
+ <img src="<?php echo $this->getSkinUrl('images/media/cybermut/cb.gif') ?>" alt="CB" />
19
+ <img src="<?php echo $this->getSkinUrl('images/media/cybermut/master.gif') ?>" alt="Mastercard" />
20
+ <img src="<?php echo $this->getSkinUrl('images/media/cybermut/visa.gif') ?>" alt="Visa" />
21
+ <br /><br />
22
+
23
+ <fieldset class="form-list">
24
+ <?php $_code = $this->getMethodCode() ?>
25
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
26
+ <?php if (Mage::getStoreConfig('payment/cybermut_payment/several_times_payment')): ?>
27
+ <li class="control">
28
+ <input type="checkbox" name="cybermut[several_implements]" id="cybermut:several_implements" value="<?php echo Mage::getStoreConfig('payment/cybermut_payment/terms') ?>" title="<?php echo $this->__('Payment %s times', Mage::getStoreConfig('payment/cybermut_payment/terms')) ?>" class="checkbox" onclick="setNbrech()" />
29
+ <label for="cybermut:several_implements"><?php echo $this->__('Payment %s times', Mage::getStoreConfig('payment/cybermut_payment/terms')) ?></label>
30
+ <input type="hidden" id="payment:nbrech" name="payment[nbrech]" value="1" />
31
+ </li>
32
+ <script type="text/javascript">
33
+ //<![CDATA[
34
+ function setNbrech() {
35
+ if ($('cybermut:several_implements').checked)
36
+ $('payment:nbrech').value = $('cybermut:several_implements').value;
37
+ else
38
+ $('payment:nbrech').value = 1;
39
+ }
40
+ //]]>
41
+ </script>
42
+ <?php endif; ?>
43
+ <li>
44
+ <?php echo $this->__('You will be redirected to Cybermut website when you place an order.') ?>
45
+ </li>
46
+ </ul>
47
+ </fieldset>
app/design/frontend/default/default/layout/cybermut.xml DELETED
@@ -1,32 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /*
4
- * 1997-2012 Quadra Informatique
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0) that is available
9
- * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
- * If you are unable to obtain it through the world-wide-web, please send an email
11
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
12
- *
13
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
14
- * @copyright 1997-2013 Quadra Informatique
15
- * @version Release: $Revision: 2.0.5 $
16
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
- */
18
- -->
19
-
20
- <layout version="0.1.0">
21
- <!--
22
- Cybermut Failure Response Page
23
- -->
24
- <cybermut_payment_error>
25
- <reference name="root">
26
- <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
27
- </reference>
28
- <reference name="content">
29
- <block type="cybermut/error" name="cybermut_error" template="cybermut/error.phtml"></block>
30
- </reference>
31
- </cybermut_payment_error>
32
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/default/default/template/cybermut/form.phtml DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- /*
3
- * 1997-2012 Quadra Informatique
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0) that is available
8
- * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
9
- * If you are unable to obtain it through the world-wide-web, please send an email
10
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
11
- *
12
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
13
- * @copyright 1997-2013 Quadra Informatique
14
- * @version Release: $Revision: 2.0.5 $
15
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
- */
17
- ?>
18
-
19
- <img src="<?php echo $this->getSkinUrl('images/media/cybermut/cb.gif') ?>" alt="CB" />
20
- <img src="<?php echo $this->getSkinUrl('images/media/cybermut/master.gif') ?>" alt="Mastercard" />
21
- <img src="<?php echo $this->getSkinUrl('images/media/cybermut/visa.gif') ?>" alt="Visa" />
22
- <br /><br />
23
-
24
- <fieldset class="form-list">
25
- <?php $_code = $this->getMethodCode() ?>
26
- <ul id="payment_form_<?php echo $_code ?>" style="display:none">
27
- <?php if (Mage::getStoreConfig('payment/cybermut_payment/several_times_payment')): ?>
28
- <li class="control">
29
- <input type="checkbox" name="cybermut[several_implements]" id="cybermut:several_implements" value="<?php echo Mage::getStoreConfig('payment/cybermut_payment/terms') ?>" title="<?php echo $this->__('Payment %s times', Mage::getStoreConfig('payment/cybermut_payment/terms')) ?>" class="checkbox" onclick="setNbrech()" />
30
- <label for="cybermut:several_implements"><?php echo $this->__('Payment %s times', Mage::getStoreConfig('payment/cybermut_payment/terms')) ?></label>
31
- <input type="hidden" id="payment:nbrech" name="payment[nbrech]" value="1" />
32
- </li>
33
- <script type="text/javascript">
34
- //<![CDATA[
35
- function setNbrech() {
36
- if ($('cybermut:several_implements').checked)
37
- $('payment:nbrech').value = $('cybermut:several_implements').value;
38
- else
39
- $('payment:nbrech').value = 1;
40
- }
41
- //]]>
42
- </script>
43
- <?php endif; ?>
44
- <li>
45
- <?php echo $this->__('You will be redirected to Cybermut website when you place an order.') ?>
46
- </li>
47
- </ul>
48
- </fieldset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/etc/modules/Quadra_Cybermut.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <!--
3
- /*
4
- * 1997-2012 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
- * to ecommerce@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
14
- * @copyright 1997-2012 Quadra Informatique
15
- * @version Release: $Revision: 2.0.5 $
16
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
@@ -27,4 +26,4 @@
27
  </depends>
28
  </Quadra_Cybermut>
29
  </modules>
30
- </config>
1
  <?xml version="1.0"?>
2
  <!--
3
+ /**
4
+ * 1997-2015 Quadra Informatique
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
  * This source file is subject to the Open Software License (OSL 3.0) that is available
9
  * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
  * If you are unable to obtain it through the world-wide-web, please send an email
11
+ * to modules@quadra-informatique.fr so we can send you a copy immediately.
12
  *
13
+ * @author Quadra Informatique <modules@quadra-informatique.fr>
14
+ * @copyright 1997-2015 Quadra Informatique
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 
16
  */
17
  -->
18
  <config>
26
  </depends>
27
  </Quadra_Cybermut>
28
  </modules>
29
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Quadra_Cybermut</name>
4
- <version>2.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -12,6 +12,13 @@ CyberMUT Paiement / Paiement CIC integration</summary>
12
  Compatible with CM-CIC versions 1.2 and 3.0.</description>
13
  <notes>Changelog:&#xD;
14
  &#xD;
 
 
 
 
 
 
 
15
  2.0.5:&#xD;
16
  - Fixe bug with complete state order&#xD;
17
  &#xD;
@@ -33,10 +40,10 @@ Compatible with CM-CIC versions 1.2 and 3.0.</description>
33
  - Multishipping compatibility&#xD;
34
  - Bug fixed with magento 1.4&#xD;
35
  - Beta version</notes>
36
- <authors><author><name>Quadra Informatique</name><user>quadrainfo</user><email>ecommerce@quadra-informatique.fr</email></author></authors>
37
- <date>2013-06-20</date>
38
- <time>14:52:00</time>
39
- <contents><target name="magecommunity"><dir name="Quadra"><dir name="Cybermut"><dir name="Block"><file name="Error.php" hash="92109cf747af23d45f00415908a28a13"/><file name="Form.php" hash="3a395d152b794a4c82b0e005c3563d37"/><file name="Redirect.php" hash="759fbad7784882eb9c0c44e3d2654b21"/></dir><dir name="Helper"><file name="Data.php" hash="6062666a01ed888e28c6bfbc071e9d08"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="93c1c358312598fce43d4b0ee2a937f1"/></dir><dir name="Config"><dir name="Data"><file name="Cybermut.php" hash="bddba2a6bc0e11add6612cc8dd2fbc11"/></dir></dir><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="a182c91875b96b9c43dbc73113bd4022"/></dir><file name="Debug.php" hash="565fcfa6bfed5a02b3a8a489646b65ea"/></dir><file name="Setup.php" hash="785285fde39d7f94097bf8755291327d"/></dir><file name="Observer.php" hash="f8c5d4710687395081496ccb2ddd5bea"/><file name="Payment.php" hash="286ba43e8d6a8749c1b682b94d24ffa4"/><dir name="Source"><file name="Bank.php" hash="ec374eccebed4894c1268c8ab858895e"/><file name="Language.php" hash="c2774e3426d38028c425f63390e929ef"/><file name="Terms.php" hash="6c1f8ac4bdf0d242b826c6a5c8a8c5bf"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Keyencrypted.php" hash="4143bd43ff885f2e5947bf6f249e0394"/></dir><dir name="Source"><dir name="Order"><dir name="Status"><file name="Accepted.php" hash="efab260c0ec7a7cdcd90ec65dcd89ef4"/><file name="Canceled.php" hash="783268c5415ed4aa3bef737997645aa3"/><file name="New.php" hash="774e89fe25768da3c766ffd405ab8ee1"/><file name="Refused.php" hash="0a98720988eee152f8ede312e2975c2e"/></dir><file name="Status.php" hash="7825aad5f8725da55572bb81909ff19b"/></dir><file name="Version.php" hash="38fccfc5ab5103d51b07dd728271c127"/></dir></dir></dir></dir><dir name="controllers"><file name="PaymentController.php" hash="fd9a2081af49b92f15f628619af06130"/></dir><dir name="etc"><file name="config.xml" hash="55a3f7cc5d263a5b0bc4526afef7ad8f"/><file name="system.xml" hash="635dd1c931b6cca2a1f3475ce2ef46be"/></dir><dir name="sql"><dir name="cybermut_setup"><file name="mysql4-install-0.1.0.php" hash="42017efe65b72a69d74a558ec2d41e85"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="7167a5dacf06e34c7f17702daab66267"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Quadra_Cybermut.xml" hash="1de9ed19ba67893ef62165b2e3d6d322"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="cybermut"><file name="error.phtml" hash="81ac01839115622d8b47a2e17519132b"/><file name="form.phtml" hash="d5ec0f1948a6c218dc6a39d6fe143120"/></dir></dir><dir name="layout"><file name="cybermut.xml" hash="7548d32985e7452658b2aabd3d9576df"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Quadra_Cybermut.csv" hash="447ff1cd9ee16019041ba52459de32f8"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="media"><dir name="cybermut"><file name="cb.gif" hash="297387b1588bc880bd9d9abe00db73c5"/><file name="master.gif" hash="1fd622c6300f37711c983074be1fdae5"/><file name="visa.gif" hash="d2b7afda7cfdf78ae63b0c71f99beac8"/></dir></dir></dir></dir></dir></dir></target></contents>
40
  <compatible/>
41
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Quadra_Extensions</name><channel>community</channel><min>1.0.0</min><max></max></package></required></dependencies>
42
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Quadra_Cybermut</name>
4
+ <version>2.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
12
  Compatible with CM-CIC versions 1.2 and 3.0.</description>
13
  <notes>Changelog:&#xD;
14
  &#xD;
15
+ 2.0.6:&#xD;
16
+ - Fixed order state not saved on notification (thanks to @real34)&#xD;
17
+ - Design and skin files moved in base directory (thanks to @fusco)&#xD;
18
+ - Use getNotifyURL instead of Mage::getUrl() to generate the correct url_retour parameter (thanks to @lenybernard)&#xD;
19
+ - Update license&#xD;
20
+ - Update version&#xD;
21
+ &#xD;
22
  2.0.5:&#xD;
23
  - Fixe bug with complete state order&#xD;
24
  &#xD;
40
  - Multishipping compatibility&#xD;
41
  - Bug fixed with magento 1.4&#xD;
42
  - Beta version</notes>
43
+ <authors><author><name>Quadra Informatique</name><user>quadrainfo</user><email>modules@quadra-informatique.fr</email></author></authors>
44
+ <date>2015-02-19</date>
45
+ <time>10:51:27</time>
46
+ <contents><target name="magecommunity"><dir name="Quadra"><dir name="Cybermut"><dir name="Block"><file name="Error.php" hash="4f04bbc09570fc24cf911e4de8702b2f"/><file name="Form.php" hash="e73df77eeff41a46bfbfb3eb044d3644"/><file name="Redirect.php" hash="d6f2b3f42eabb3877202b45c2bd78cf1"/></dir><dir name="Helper"><file name="Data.php" hash="6a6ffc83695e14e4ae59ed90c98b0d24"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="6f067180f8810915bfc73e9ebee13e69"/></dir><dir name="Config"><dir name="Data"><file name="Cybermut.php" hash="e502abfbef03c95ff069d8afabbe0447"/></dir></dir><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="743f08850b7f8d1d5b299d32afcd6daa"/></dir><file name="Debug.php" hash="2f07d4baffc0c8e9bca36001924c9637"/></dir><file name="Setup.php" hash="2c62bf39e91e0dc1d370ac5718049709"/></dir><file name="Observer.php" hash="7a2a60bc291cb63964dcceeae0af7053"/><file name="Payment.php" hash="342cb4a1d01447d9a63da82e1713f872"/><dir name="Source"><file name="Bank.php" hash="fdac9d195933c558267365d6a00eefe5"/><file name="Language.php" hash="b0c5565387da37f6d0552857c2b3e2b6"/><file name="Terms.php" hash="93acd6725ce244ac222adb0b165223e1"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Keyencrypted.php" hash="aea6fcb029ce9f46e3dc6c1426568e9c"/></dir><dir name="Source"><dir name="Order"><dir name="Status"><file name="Accepted.php" hash="04f97cac13ad710e29a183c8f08ff339"/><file name="Canceled.php" hash="cae43f7423ef0624658ed9d54cfe5ab8"/><file name="New.php" hash="22a02b745eb79358c91f5c0d9ac0f10c"/><file name="Refused.php" hash="a9df8dc9410313b853a838a48984e83d"/></dir><file name="Status.php" hash="a4c7398a13bae87ce4793a8a7dc465e5"/></dir><file name="Version.php" hash="c4273bbc92fd8c51feca05c26240cd9a"/></dir></dir></dir></dir><dir name="controllers"><file name="PaymentController.php" hash="7fb8881d9a35311801f8cfeb5581c96b"/></dir><dir name="etc"><file name="config.xml" hash="fc5d82bc33e1f24ab8479c70df8b57b9"/><file name="system.xml" hash="e95f4c54c74683d4f851fdec8b4a7640"/></dir><dir name="sql"><dir name="cybermut_setup"><file name="mysql4-install-0.1.0.php" hash="de0ad6c3d1a8e5d8aa5b553173a74746"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="3c56e3916ab1cc74ad2125aba411ce6e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Quadra_Cybermut.xml" hash="d116d58bcaea393812e423a5b8cead10"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="cybermut"><file name="error.phtml" hash="63ead134677386abceeb8b863892e608"/><file name="form.phtml" hash="90ce87aef318656543478dc76f7fa10a"/></dir></dir><dir name="layout"><file name="cybermut.xml" hash="341360c0a2fd524d267328391332f523"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Quadra_Cybermut.csv" hash="447ff1cd9ee16019041ba52459de32f8"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="media"><dir name="cybermut"><file name="cb.gif" hash="297387b1588bc880bd9d9abe00db73c5"/><file name="master.gif" hash="1fd622c6300f37711c983074be1fdae5"/><file name="visa.gif" hash="d2b7afda7cfdf78ae63b0c71f99beac8"/></dir></dir></dir></dir></dir></dir></target></contents>
47
  <compatible/>
48
+ <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php><package><name>Quadra_Extensions</name><channel>community</channel><min>1.0.0</min><max></max></package></required></dependencies>
49
  </package>
skin/frontend/{default → base}/default/images/media/cybermut/cb.gif RENAMED
File without changes
skin/frontend/{default → base}/default/images/media/cybermut/master.gif RENAMED
File without changes
skin/frontend/{default → base}/default/images/media/cybermut/visa.gif RENAMED
File without changes