Quadra_Cybermut - Version 2.0.3

Version Notes

Changelog:

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 Magento Core Team
Extension Quadra_Cybermut
Version 2.0.3
Comparing to
See all releases


Code changes from version 2.0.2 to 2.0.3

Files changed (32) hide show
  1. app/code/community/Quadra/Cybermut/Block/Error.php +10 -13
  2. app/code/community/Quadra/Cybermut/Block/Form.php +10 -13
  3. app/code/community/Quadra/Cybermut/Block/Redirect.php +10 -13
  4. app/code/community/Quadra/Cybermut/Helper/Data.php +10 -13
  5. app/code/community/Quadra/Cybermut/Model/Api/Debug.php +10 -13
  6. app/code/community/Quadra/Cybermut/Model/Config/Data/Cybermut.php +11 -14
  7. app/code/community/Quadra/Cybermut/Model/Mysql4/Api/Debug.php +10 -13
  8. app/code/community/Quadra/Cybermut/Model/Mysql4/Api/Debug/Collection.php +10 -13
  9. app/code/community/Quadra/Cybermut/Model/Mysql4/Setup.php +10 -13
  10. app/code/community/Quadra/Cybermut/Model/Observer.php +19 -29
  11. app/code/community/Quadra/Cybermut/Model/Payment.php +68 -51
  12. app/code/community/Quadra/Cybermut/Model/Source/Bank.php +10 -13
  13. app/code/community/Quadra/Cybermut/Model/Source/Language.php +10 -13
  14. app/code/community/Quadra/Cybermut/Model/Source/Terms.php +31 -0
  15. app/code/community/Quadra/Cybermut/Model/System/Config/Backend/Keyencrypted.php +10 -13
  16. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status.php +10 -13
  17. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Accepted.php +10 -13
  18. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Canceled.php +10 -13
  19. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/New.php +10 -13
  20. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Refused.php +10 -13
  21. app/code/community/Quadra/Cybermut/Model/System/Config/Source/Version.php +10 -13
  22. app/code/community/Quadra/Cybermut/controllers/PaymentController.php +179 -231
  23. app/code/community/Quadra/Cybermut/etc/config.xml +20 -20
  24. app/code/community/Quadra/Cybermut/etc/system.xml +30 -13
  25. app/code/community/Quadra/Cybermut/sql/cybermut_setup/mysql4-install-0.1.0.php +11 -15
  26. app/code/community/Quadra/Cybermut/sql/cybermut_setup/mysql4-upgrade-1.0.1-1.0.2.php +41 -0
  27. app/design/frontend/default/default/layout/cybermut.xml +10 -13
  28. app/design/frontend/default/default/template/cybermut/error.phtml +10 -13
  29. app/design/frontend/default/default/template/cybermut/form.phtml +10 -13
  30. app/etc/modules/Quadra_Cybermut.xml +10 -13
  31. app/locale/fr_FR/Quadra_Cybermut.csv +7 -2
  32. package.xml +24 -58
app/code/community/Quadra/Cybermut/Block/Error.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Block_Error
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Block_Error extends Mage_Core_Block_Template
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Block/Form.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Block_Form
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Block_Form extends Mage_Payment_Block_Form
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Block/Redirect.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Block_Redirect
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Block_Redirect extends Mage_Core_Block_Abstract
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Helper/Data.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Helper_Data
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Helper_Data extends Mage_Core_Helper_Abstract
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/Api/Debug.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Api_Debug
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Api_Debug extends Mage_Core_Model_Abstract
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/Config/Data/Cybermut.php CHANGED
@@ -1,25 +1,22 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Config_Data_Cybermut
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Config_Data_Cybermut extends Mage_Core_Model_Config_Data
22
- {
23
public function _beforeSave() {
24
$filename = BP . DS . 'app' . DS . 'code' . DS . 'local' . DS . 'Mage' . DS . 'Cybermut' . DS . 'etc' . DS . 'config.xml';
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/Mysql4/Api/Debug.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Mysql4_Api_Debug
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/Mysql4/Api/Debug/Collection.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Mysql4_Api_Debug_Collection
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/Mysql4/Setup.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Mysql4_Setup
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/Observer.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Observer
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Observer
@@ -27,7 +24,7 @@ class Quadra_Cybermut_Model_Observer
27
{
28
Mage::getSingleton('checkout/session')->setCanRedirect(true);
29
}
30
-
31
/**
32
* Return Orders Redirect URL
33
*
@@ -40,26 +37,18 @@ class Quadra_Cybermut_Model_Observer
40
$orderIdsTmp = $orderIds;
41
$key = array_pop($orderIdsTmp);
42
$order = Mage::getModel('sales/order')->loadByIncrementId($key);
43
-
44
- if (!(strpos($order->getPayment()->getMethod(), 'cybermut') === false)) {
45
- Mage::getSingleton('checkout/session')
46
- ->setLastOrderId($order->getId())
47
- ->setRedirectUrl(Mage::getUrl('checkout/multishipping/success'))
48
- ->setLastRealOrderId($order->getIncrementId())
49
- ->setIsMultishipping(true)
50
- ->setMultishippingOrderIds(implode(',', $orderIds));
51
52
Mage::app()->getResponse()->setRedirect(Mage::getUrl('cybermut/payment/redirect'));
53
- }
54
} else {
55
- Mage::getSingleton('checkout/session')
56
- ->unsetData('is_multishipping')
57
- ->unsetData('multishipping_order_ids');
58
}
59
60
return $this;
61
}
62
-
63
/**
64
* Disables sending email after the order creation
65
*
@@ -68,11 +57,12 @@ class Quadra_Cybermut_Model_Observer
68
public function disableEmailForMultishipping(Varien_Event_Observer $observer)
69
{
70
$order = $observer->getOrder();
71
-
72
if (!(strpos($order->getPayment()->getMethod(), 'cybermut') === false)) {
73
$order->setCanSendNewEmailFlag(false)->save();
74
}
75
-
76
return $this;
77
}
78
}
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
*/
17
18
class Quadra_Cybermut_Model_Observer
24
{
25
Mage::getSingleton('checkout/session')->setCanRedirect(true);
26
}
27
+
28
/**
29
* Return Orders Redirect URL
30
*
37
$orderIdsTmp = $orderIds;
38
$key = array_pop($orderIdsTmp);
39
$order = Mage::getModel('sales/order')->loadByIncrementId($key);
40
41
+ if (!(strpos($order->getPayment()->getMethod(), 'cybermut') === false)) {
42
+ Mage::getSingleton('checkout/session')->setRealOrderIds(implode(',', $orderIds));
43
Mage::app()->getResponse()->setRedirect(Mage::getUrl('cybermut/payment/redirect'));
44
+ }
45
} else {
46
+ Mage::getSingleton('checkout/session')->unsRealOrderIds();
47
}
48
49
return $this;
50
}
51
+
52
/**
53
* Disables sending email after the order creation
54
*
57
public function disableEmailForMultishipping(Varien_Event_Observer $observer)
58
{
59
$order = $observer->getOrder();
60
+
61
if (!(strpos($order->getPayment()->getMethod(), 'cybermut') === false)) {
62
$order->setCanSendNewEmailFlag(false)->save();
63
}
64
+
65
return $this;
66
}
67
+
68
}
app/code/community/Quadra/Cybermut/Model/Payment.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Payment
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
@@ -97,11 +94,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
97
*/
98
protected function getSuccessURL()
99
{
100
- if (Mage::getSingleton('checkout/session')->getIsMultishipping()) {
101
- return Mage::getUrl('cybermut/payment/multishippingSuccess', array('_secure' => true));
102
- } else {
103
- return Mage::getUrl('cybermut/payment/success', array('_secure' => true));
104
- }
105
}
106
107
/**
@@ -111,11 +104,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
111
*/
112
protected function getErrorURL()
113
{
114
- if (Mage::getSingleton('checkout/session')->getIsMultishipping()) {
115
- return Mage::getUrl('cybermut/payment/multishippingError', array('_secure' => true));
116
- } else {
117
- return Mage::getUrl('cybermut/payment/error', array('_secure' => true));
118
- }
119
}
120
121
/**
@@ -128,6 +117,32 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
128
return Mage::getUrl('cybermut/payment/notify', array('_secure' => true));
129
}
130
131
/**
132
* Capture payment
133
*
@@ -177,10 +192,20 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
177
public function getOrderPlaceRedirectUrl()
178
{
179
Mage::getSingleton('checkout/session')->setIsMultishipping(false);
180
-
181
return Mage::getUrl('cybermut/payment/redirect');
182
}
183
184
/**
185
* Return Standard Checkout Form Fields for request to Cybermut
186
*
@@ -195,14 +220,14 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
195
Mage::throwException($this->_getHelper()->__('Cannot retrieve order object'));
196
}
197
198
- $description = $this->getConfigData('description') ? $this->getConfigData('description') : Mage::helper('cybermut')->__('Order %s', $order->getRealOrderId());
199
200
$fields = array(
201
'version' => $this->getVersion(),
202
'TPE' => $this->getConfigData('tpe_no'),
203
'date' => date('d/m/Y:H:i:s'),
204
- //'montant' => sprintf('%.2f', $order->getBaseGrandTotal()) . $order->getBaseCurrencyCode(),
205
- 'reference' => $order->getRealOrderId(),
206
'texte-libre' => $description,
207
'lgue' => $this->_getLanguageCode(),
208
'societe' => $this->getConfigData('site_code'),
@@ -212,14 +237,6 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
212
'bouton' => 'ButtonLabel'
213
);
214
215
- if (Mage::getSingleton('checkout/session')->getIsMultishipping()) {
216
- $quote = Mage::getModel('sales/quote')->load($order->getQuoteId());
217
- $fields['montant'] = sprintf('%.2f', $quote->getBaseGrandTotal()) . $quote->getBaseCurrencyCode();
218
- //$fields['texte-libre'] = Mage::getSingleton('checkout/session')->getMultishippingOrderIds();
219
- } else {
220
- $fields['montant'] = sprintf('%.2f', $order->getBaseGrandTotal()) . $order->getBaseCurrencyCode();
221
- }
222
-
223
if (((int) $this->getVersion()) >= 3) {
224
$fields['mail'] = $order->getCustomerEmail();
225
}
@@ -277,7 +294,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
277
278
return $this->_CMCIC_hmac($string);
279
}
280
-
281
/**
282
* Return MAC string on basis of Cybermut response data
283
*
@@ -344,7 +361,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
344
{
345
return $this->getConfigData('key');
346
}
347
-
348
/**
349
* Return encrypted key
350
*
@@ -361,9 +378,9 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
361
362
return pack("H*", $key);
363
}*/
364
-
365
- protected function _getKeyEncrypted()
366
- {
367
$key = $this->getConfigData('key_encrypted');
368
$key = Mage::helper('core')->decrypt($key);
369
@@ -390,7 +407,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
390
*
391
* @param string
392
* @return string encrypted key
393
- */
394
protected function _CMCIC_hmac($string)
395
{
396
if ($this->getConfigData('key_encrypted')) {
@@ -399,9 +416,9 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
399
return $this->_CMCIC_hmac_KeyPassphrase($string);
400
}
401
}
402
-
403
/**
404
- * Return MAC string for payment authentification
405
* new system
406
*
407
* @param string
@@ -424,7 +441,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
424
425
return sha1($k_opad . pack("H*",sha1($k_ipad . $string)));
426
}
427
-
428
/**
429
* Return MAC string for payment authentification
430
* old HMAC system
@@ -447,7 +464,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
447
448
return strtolower($this->_hmacSHA1($k1 ^ $k2, $string));
449
}
450
-
451
/**
452
* Old HMAC SHA system
453
*
@@ -492,7 +509,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
492
493
return strtolower($this->_hmacSHA1($k1 ^ $k2, $string));
494
}
495
-
496
<FONCTION OBSOLETE> */
497
498
/**
@@ -517,9 +534,9 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
517
518
return sha1($k_opad . pack("H*",sha1($k_ipad . $string)));
519
}
520
-
521
</FONCTIONS OBSOLETES> */
522
-
523
/**
524
* Return authorized languages by CyberMUT
525
*
@@ -536,7 +553,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
536
537
return $languages;
538
}
539
-
540
/**
541
* Return language code to send to CyberMUT
542
*
@@ -646,7 +663,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
646
647
return implode("\n", $response) . "\n";
648
}
649
-
650
public function getSuccessfulPaymentMessage($postData)
651
{
652
$msg = Mage::helper('cybermut')->__('Payment accepted by Cybermut');
@@ -660,7 +677,7 @@ class Quadra_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract
660
661
return $msg;
662
}
663
-
664
public function getRefusedPaymentMessage($postData)
665
{
666
$msg = Mage::helper('cybermut')->__('Payment refused by Cybermut');
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
94
*/
95
protected function getSuccessURL()
96
{
97
+ return Mage::getUrl('cybermut/payment/success', array('_secure' => true));
98
}
99
100
/**
104
*/
105
protected function getErrorURL()
106
{
107
+ return Mage::getUrl('cybermut/payment/error', array('_secure' => true));
108
}
109
110
/**
117
return Mage::getUrl('cybermut/payment/notify', array('_secure' => true));
118
}
119
120
+ /**
121
+ * Get quote model
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);
129
+ }
130
+ return $this->_quote;
131
+ }
132
+
133
+ /**
134
+ * Get real order ids
135
+ *
136
+ * @return string
137
+ */
138
+ public function getOrderList()
139
+ {
140
+ if ($this->getQuote()->getIsMultiShipping())
141
+ return Mage::getSingleton('checkout/session')->getRealOrderIds();
142
+ else
143
+ return $this->getOrder()->getRealOrderId();
144
+ }
145
+
146
/**
147
* Capture payment
148
*
192
public function getOrderPlaceRedirectUrl()
193
{
194
Mage::getSingleton('checkout/session')->setIsMultishipping(false);
195
+
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 {
203
+ $amount = $this->getOrder()->getBaseGrandTotal();
204
+ }
205
+
206
+ return sprintf('%.2f', $amount);
207
+ }
208
+
209
/**
210
* Return Standard Checkout Form Fields for request to Cybermut
211
*
220
Mage::throwException($this->_getHelper()->__('Cannot retrieve order object'));
221
}
222
223
+ $description = $this->getConfigData('description') ? $this->getConfigData('description') : Mage::helper('cybermut')->__('Order %s', $this->getOrderList());
224
225
$fields = array(
226
'version' => $this->getVersion(),
227
'TPE' => $this->getConfigData('tpe_no'),
228
'date' => date('d/m/Y:H:i:s'),
229
+ 'montant' => $this->getAmount() . $order->getBaseCurrencyCode(),
230
+ 'reference' => $this->getOrderList(),
231
'texte-libre' => $description,
232
'lgue' => $this->_getLanguageCode(),
233
'societe' => $this->getConfigData('site_code'),
237
'bouton' => 'ButtonLabel'
238
);
239
240
if (((int) $this->getVersion()) >= 3) {
241
$fields['mail'] = $order->getCustomerEmail();
242
}
294
295
return $this->_CMCIC_hmac($string);
296
}
297
+
298
/**
299
* Return MAC string on basis of Cybermut response data
300
*
361
{
362
return $this->getConfigData('key');
363
}
364
+
365
/**
366
* Return encrypted key
367
*
378
379
return pack("H*", $key);
380
}*/
381
+
382
+ protected function _getKeyEncrypted()
383
+ {
384
$key = $this->getConfigData('key_encrypted');
385
$key = Mage::helper('core')->decrypt($key);
386
407
*
408
* @param string
409
* @return string encrypted key
410
+ */
411
protected function _CMCIC_hmac($string)
412
{
413
if ($this->getConfigData('key_encrypted')) {
416
return $this->_CMCIC_hmac_KeyPassphrase($string);
417
}
418
}
419
+
420
/**
421
+ * Return MAC string for payment authentification
422
* new system
423
*
424
* @param string
441
442
return sha1($k_opad . pack("H*",sha1($k_ipad . $string)));
443
}
444
+
445
/**
446
* Return MAC string for payment authentification
447
* old HMAC system
464
465
return strtolower($this->_hmacSHA1($k1 ^ $k2, $string));
466
}
467
+
468
/**
469
* Old HMAC SHA system
470
*
509
510
return strtolower($this->_hmacSHA1($k1 ^ $k2, $string));
511
}
512
+
513
<FONCTION OBSOLETE> */
514
515
/**
534
535
return sha1($k_opad . pack("H*",sha1($k_ipad . $string)));
536
}
537
+
538
</FONCTIONS OBSOLETES> */
539
+
540
/**
541
* Return authorized languages by CyberMUT
542
*
553
554
return $languages;
555
}
556
+
557
/**
558
* Return language code to send to CyberMUT
559
*
663
664
return implode("\n", $response) . "\n";
665
}
666
+
667
public function getSuccessfulPaymentMessage($postData)
668
{
669
$msg = Mage::helper('cybermut')->__('Payment accepted by Cybermut');
677
678
return $msg;
679
}
680
+
681
public function getRefusedPaymentMessage($postData)
682
{
683
$msg = Mage::helper('cybermut')->__('Payment refused by Cybermut');
app/code/community/Quadra/Cybermut/Model/Source/Bank.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Source_Bank
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Source_Bank
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/Source/Language.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_Source_Language
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_Source_Language
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/Source/Terms.php ADDED
@@ -0,0 +1,31 @@
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.4 $
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(
23
+ array('value' => '2', 'label' => Mage::helper('cybermut')->__('Payment 2 times')),
24
+ array('value' => '3', 'label' => Mage::helper('cybermut')->__('Payment 3 times')),
25
+ array('value' => '4', 'label' => Mage::helper('cybermut')->__('Payment 4 times')),
26
+ );
27
+ }
28
+ }
29
+
30
+
31
+
app/code/community/Quadra/Cybermut/Model/System/Config/Backend/Keyencrypted.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_System_Config_Backend_Keyencrypted
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_System_Config_Backend_Keyencrypted extends Mage_Core_Model_Config_Data
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_System_Config_Source_Order_Status
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_System_Config_Source_Order_Status
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Accepted.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_System_Config_Source_Order_Status_Accepted
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Accepted extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Canceled.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_System_Config_Source_Order_Status_Canceled
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Canceled extends Quadra_Cybermut_Model_System_Config_Source_Order_Status_Refused
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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_Refused
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/New.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_System_Config_Source_Order_Status_New
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_System_Config_Source_Order_Status_New extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Order/Status/Refused.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_System_Config_Source_Order_Status_Refused
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_System_Config_Source_Order_Status_Refused extends Quadra_Cybermut_Model_System_Config_Source_Order_Status
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/Model/System/Config/Source/Version.php CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_Model_System_Config_Source_Version
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_Model_System_Config_Source_Version
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
app/code/community/Quadra/Cybermut/controllers/PaymentController.php CHANGED
@@ -1,45 +1,80 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @name Quadra_Cybermut_PaymentController
18
- * @author Quadra Team
19
*/
20
21
class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Action
22
{
23
/**
24
- * Order instance
25
*/
26
- protected $_order;
27
- protected $_orderIds;
28
29
/**
30
- * Get order
31
*
32
- * @param none
33
- * @return Mage_Sales_Model_Order
34
*/
35
- public function getOrder()
36
{
37
- if ($this->_order == null) {
38
- $session = Mage::getSingleton('checkout/session');
39
- $this->_order = Mage::getModel('sales/order');
40
- $this->_order->loadByIncrementId($session->getLastRealOrderId());
41
}
42
- return $this->_order;
43
}
44
45
/**
@@ -49,25 +84,36 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
49
public function redirectAction()
50
{
51
$session = Mage::getSingleton('checkout/session');
52
- $session->setCybermutPaymentQuoteId($session->getQuoteId());
53
-
54
- $order = $this->getOrder();
55
56
- if (!$order->getId()) {
57
- $this->norouteAction();
58
- return;
59
}
60
61
- $order->addStatusToHistory(
62
$order->getStatus(), Mage::helper('cybermut')->__('Customer was redirected to Cybermut')
63
- );
64
- $order->save();
65
66
$this->getResponse()
67
- ->setBody($this->getLayout()
68
- ->createBlock('cybermut/redirect')
69
- ->setOrder($order)
70
- ->toHtml());
71
72
$session->unsQuoteId();
73
}
@@ -92,6 +138,8 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
92
$model->generateErrorResponse();
93
}
94
95
if ($model->getConfigData('debug_flag')) {
96
Mage::getModel('cybermut/api_debug')
97
->setResponseBody(print_r($postData, 1))
@@ -101,19 +149,18 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
101
$returnedMAC = $postData['MAC'];
102
$correctMAC = $model->getResponseMAC($postData);
103
104
- $order = Mage::getModel('sales/order')
105
- ->loadByIncrementId($postData['reference']);
106
107
- if (!$order->getId()) {
108
- $model->generateErrorResponse();
109
}
110
111
- $orderIds = $this->_getMultishippingOrderIds($order->getQuoteId());
112
-
113
if ($returnedMAC == $correctMAC) {
114
if ($model->isSuccessfulPayment($postData['code-retour'])) {
115
- foreach ($orderIds as $orderId) {
116
- $order = Mage::getModel('sales/order')->load($orderId);
117
118
// Déblocage de la commande si nécessaire
119
if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) {
@@ -153,16 +200,16 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
153
if (!$order->getEmailSent()) {
154
$order->sendNewOrderEmail();
155
}
156
-
157
if ($model->getConfigData('invoice_create')) {
158
$this->saveInvoice($order);
159
}
160
-
161
$order->save();
162
}
163
} else {
164
- foreach ($orderIds as $orderId) {
165
- $order = Mage::getModel('sales/order')->load($orderId);
166
/* $order->addStatusToHistory(
167
$model->getConfigData('order_status_payment_refused'),
168
$model->getRefusedPaymentMessage($postData)
@@ -193,15 +240,15 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
193
$order->save();
194
}
195
}
196
-
197
if ($method == 'post') {
198
$model->generateSuccessResponse();
199
} else if ($method == 'get') {
200
return;
201
}
202
} else {
203
- foreach ($orderIds as $orderId) {
204
- $order = Mage::getModel('sales/order')->load($orderId);
205
$order->addStatusToHistory(
206
$order->getStatus(), Mage::helper('cybermut')->__('Returned MAC is invalid. Order cancelled.')
207
);
@@ -271,171 +318,73 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
271
272
$session->setIsMultishipping(false);
273
274
- $order = $this->getOrder();
275
-
276
- if (!$order->getId()) {
277
- $this->norouteAction();
278
- return;
279
- }
280
-
281
- $order->addStatusToHistory(
282
- $order->getStatus(), Mage::helper('cybermut')->__('Customer successfully returned from Cybermut')
283
- );
284
-
285
- $order->save();
286
-
287
- $this->_redirect('checkout/onepage/success');
288
- }
289
-
290
- /**
291
- * Failure payment page
292
- *
293
- * @param none
294
- * @return void
295
- */
296
- public function errorAction()
297
- {
298
- $session = Mage::getSingleton('checkout/session');
299
- $model = Mage::getModel('cybermut/payment');
300
-
301
- $order = $this->getOrder();
302
-
303
- $session->setIsMultishipping(false);
304
-
305
- if (!$order->getId()) {
306
-
307
- //$this->_redirect('checkout/onepage/error');
308
- //return;
309
- } else if ($order instanceof Mage_Sales_Model_Order && $order->getId()) {
310
- /* $order->addStatusToHistory(
311
- $model->getConfigData('order_status_payment_canceled'),
312
- Mage::helper('cybermut')->__('Customer returned from Cybermut.')
313
- );
314
315
- if ($model->getConfigData('order_status_payment_canceled') == Mage_Sales_Model_Order::STATE_CANCELED) {
316
- $order->cancel();
317
- } */
318
319
- if (!$status = $model->getConfigData('order_status_payment_canceled')) {
320
- $status = $order->getStatus();
321
}
322
323
$order->addStatusToHistory(
324
- $status, $this->__('Order was canceled by customer')
325
);
326
327
- if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
328
- $order->hold();
329
- } else if ($status == Mage_Sales_Model_Order::STATE_CANCELED) {
330
- $order->cancel();
331
- }
332
-
333
$order->save();
334
-
335
- if (!$model->getConfigData('empty_cart')) {
336
- $this->_reorder(array($order->getId()));
337
- }
338
339
- $this->_redirect('checkout/cart');
340
}
341
342
- $this->_redirect('checkout/onepage/failure');
343
- }
344
-
345
- /**
346
- * Multishipping success payment page
347
- *
348
- * @param none
349
- * @return void
350
- */
351
- public function multishippingSuccessAction()
352
- {
353
- $session = Mage::getSingleton('checkout/session');
354
- $session->setQuoteId($session->getCybermutPaymentQuoteId());
355
- $session->unsCybermutPaymentQuoteId();
356
- $session->setCanRedirect(false);
357
-
358
- $order = $this->getOrder();
359
-
360
- if (!$order->getId()) {
361
- $this->norouteAction();
362
- return;
363
- }
364
-
365
- $orderIds = $this->_getMultishippingOrderIds($order->getQuoteId());
366
-
367
- foreach ($orderIds as $orderId) {
368
- $incrementId = Mage::getResourceModel('sales/order')->getIncrementId($orderId);
369
- $lastOrderIds[$orderId] = $incrementId;
370
- }
371
-
372
- Mage::getSingleton('checkout/type_multishipping')
373
- ->getCheckoutSession()
374
->setDisplaySuccess(true)
375
- ->setCybermutResponseCode('success');
376
-
377
- Mage::getSingleton('core/session')->setOrderIds($lastOrderIds);
378
-
379
- $session->setIsMultishipping(true);
380
381
- foreach ($orderIds as $orderId) {
382
- $order = Mage::getModel('sales/order')->load($orderId);
383
- $order->addStatusToHistory(
384
- $order->getStatus(), Mage::helper('cybermut')->__('Customer successfully returned from Cybermut')
385
- );
386
-
387
- $order->save();
388
}
389
390
- $this->_redirect('checkout/multishipping/success');
391
}
392
393
/**
394
- * Multishipping failure payment page
395
*
396
* @param none
397
* @return void
398
*/
399
- public function multishippingErrorAction()
400
{
401
$session = Mage::getSingleton('checkout/session');
402
$model = Mage::getModel('cybermut/payment');
403
404
- $order = $this->getOrder();
405
-
406
- $orderIds = $this->_getMultishippingOrderIds($order->getQuoteId());
407
-
408
- foreach ($orderIds as $orderId) {
409
- $incrementId = Mage::getResourceModel('sales/order')->getIncrementId($orderId);
410
- $lastOrderIds[$orderId] = $incrementId;
411
- }
412
-
413
- Mage::getSingleton('checkout/type_multishipping')
414
- ->getCheckoutSession()
415
- ->setCybermutResponseCode('error');
416
417
- Mage::getSingleton('core/session')->setOrderIds($lastOrderIds);
418
419
- $session->setIsMultishipping(false);
420
- $session->setLastRealOrderId($session->getMultishippingOrderIds());
421
422
- if (!$order->getId()) {
423
424
- //$this->_redirect('checkout/onepage/error');
425
- //return;
426
- } else if ($order instanceof Mage_Sales_Model_Order && $order->getId()) {
427
- /* $order->addStatusToHistory(
428
- $model->getConfigData('order_status_payment_canceled'),
429
- Mage::helper('cybermut')->__('Customer returned from Cybermut.')
430
- );
431
432
- if ($model->getConfigData('order_status_payment_canceled') == Mage_Sales_Model_Order::STATE_CANCELED) {
433
- $order->cancel();
434
- } */
435
436
- foreach ($orderIds as $orderId) {
437
- $order = Mage::getModel('sales/order')->load($orderId);
438
-
439
if (!$status = $model->getConfigData('order_status_payment_canceled')) {
440
$status = $order->getStatus();
441
}
@@ -450,65 +399,64 @@ class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Actio
450
$order->cancel();
451
}
452
453
- $order->save();
454
- }
455
-
456
- if (!$model->getConfigData('empty_cart')) {
457
- $this->_reorder($orderIds);
458
}
459
-
460
- $this->_redirect('checkout/cart');
461
}
462
463
- $this->_redirect('checkout/onepage/failure');
464
- }
465
-
466
- protected function _getMultishippingOrderIds($quoteId) {
467
- if ($this->_orderIds == null) {
468
- $orders = Mage::getResourceModel('sales/order_collection')
469
- ->addAttributeToSelect('entity_id')
470
- ->addFieldToFilter('quote_id', array('eq' => $quoteId));
471
-
472
- $orderIds = array();
473
-
474
- foreach ($orders as $order) {
475
- $orderIds[] = $order->getId();
476
- }
477
-
478
- $this->_orderIds = $orderIds;
479
}
480
481
- return $this->_orderIds;
482
}
483
-
484
- protected function _reorder($orderIds)
485
{
486
$cart = Mage::getSingleton('checkout/cart');
487
$cartTruncated = false;
488
/* @var $cart Mage_Checkout_Model_Cart */
489
-
490
- foreach ($orderIds as $orderId) {
491
- $order = Mage::getModel('sales/order')->load($orderId);
492
-
493
- $items = $order->getItemsCollection();
494
- foreach ($items as $item) {
495
- try {
496
- $cart->addOrderItem($item);
497
- } catch (Mage_Core_Exception $e){
498
- if (Mage::getSingleton('checkout/session')->getUseNotice(true)) {
499
- Mage::getSingleton('checkout/session')->addNotice($e->getMessage());
500
- }
501
- else {
502
- Mage::getSingleton('checkout/session')->addError($e->getMessage());
503
}
504
- } catch (Exception $e) {
505
- Mage::getSingleton('checkout/session')->addException($e,
506
- Mage::helper('checkout')->__('Cannot add the item to shopping cart.')
507
- );
508
}
509
}
510
}
511
512
- $cart->save();
513
}
514
}
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
*/
17
18
class Quadra_Cybermut_PaymentController extends Mage_Core_Controller_Front_Action
19
{
20
+
21
+ protected $_cybermutResponse = null;
22
+ protected $_realOrderIds;
23
+ protected $_quote;
24
+
25
/**
26
+ * Get quote model
27
+ *
28
+ * @return Mage_Sales_Model_Quote
29
*/
30
+ public function getQuote()
31
+ {
32
+ if (!$this->_quote) {
33
+ $session = Mage::getSingleton('checkout/session');
34
+ $this->_quote = Mage::getModel('sales/quote')->load($session->getCybermutPaymentQuoteId());
35
+
36
+ if (!$this->_quote->getId()) {
37
+ $realOrderIds = $this->getRealOrderIds();
38
+ if (count($realOrderIds)) {
39
+ $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderIds[0]);
40
+ $this->_quote = Mage::getModel('sales/quote')->load($order->getQuoteId());
41
+ }
42
+ }
43
+ }
44
+ return $this->_quote;
45
+ }
46
47
/**
48
+ * Get real order ids
49
*
50
+ * @return array
51
*/
52
+ public function getRealOrderIds()
53
{
54
+ if (!$this->_realOrderIds) {
55
+ if ($this->_cybermutResponse) {
56
+ $this->_realOrderIds = explode(',', $this->_cybermutResponse['reference']);
57
+ } elseif($realOrderIds = Mage::getSingleton('checkout/session')->getCybermutRealOrderIds()) {
58
+ $this->_realOrderIds = explode(',', $realOrderIds);
59
+ } else {
60
+ return array();
61
+ }
62
}
63
+ return $this->_realOrderIds;
64
+ }
65
+
66
+ /**
67
+ * seting response after returning from cybermut
68
+ *
69
+ * @param array $response
70
+ * @return object $this
71
+ */
72
+ protected function setCybermutResponse($response)
73
+ {
74
+ if (count($response)) {
75
+ $this->_cybermutResponse = $response;
76
+ }
77
+ return $this;
78
}
79
80
/**
84
public function redirectAction()
85
{
86
$session = Mage::getSingleton('checkout/session');
87
+ $session->setCybermutPaymentQuoteId($session->getLastQuoteId());
88
89
+ if ($this->getQuote()->getIsMultiShipping()) {
90
+ $realOrderIds = explode(',', $session->getRealOrderIds());
91
+ $session->setCybermutRealOrderIds($session->getRealOrderIds());
92
+ } else {
93
+ $realOrderIds = array($session->getLastRealOrderId());
94
+ $session->setCybermutRealOrderIds($session->getLastRealOrderId());
95
}
96
97
+ foreach ($realOrderIds as $realOrderId) {
98
+ $order = Mage::getModel('sales/order');
99
+ $order->loadByIncrementId($realOrderId);
100
+
101
+ if (!$order->getId()) {
102
+ $this->norouteAction();
103
+ return;
104
+ }
105
+
106
+ $order->addStatusToHistory(
107
$order->getStatus(), Mage::helper('cybermut')->__('Customer was redirected to Cybermut')
108
+ );
109
+ $order->save();
110
+ }
111
112
$this->getResponse()
113
+ ->setBody($this->getLayout()
114
+ ->createBlock('cybermut/redirect')
115
+ ->setOrder($order)
116
+ ->toHtml());
117
118
$session->unsQuoteId();
119
}
138
$model->generateErrorResponse();
139
}
140
141
+ $this->setCybermutResponse($postData);
142
+
143
if ($model->getConfigData('debug_flag')) {
144
Mage::getModel('cybermut/api_debug')
145
->setResponseBody(print_r($postData, 1))
149
$returnedMAC = $postData['MAC'];
150
$correctMAC = $model->getResponseMAC($postData);
151
152
+ foreach ($this->getRealOrderIds() as $realOrderId) {
153
+ $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
154
155
+ if (!$order->getId()) {
156
+ $model->generateErrorResponse();
157
+ }
158
}
159
160
if ($returnedMAC == $correctMAC) {
161
if ($model->isSuccessfulPayment($postData['code-retour'])) {
162
+ foreach ($this->getRealOrderIds() as $realOrderId) {
163
+ $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
164
165
// Déblocage de la commande si nécessaire
166
if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) {
200
if (!$order->getEmailSent()) {
201
$order->sendNewOrderEmail();
202
}
203
+
204
if ($model->getConfigData('invoice_create')) {
205
$this->saveInvoice($order);
206
}
207
+
208
$order->save();
209
}
210
} else {
211
+ foreach ($this->getRealOrderIds() as $realOrderId) {
212
+ $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
213
/* $order->addStatusToHistory(
214
$model->getConfigData('order_status_payment_refused'),
215
$model->getRefusedPaymentMessage($postData)
240
$order->save();
241
}
242
}
243
+
244
if ($method == 'post') {
245
$model->generateSuccessResponse();
246
} else if ($method == 'get') {
247
return;
248
}
249
} else {
250
+ foreach ($this->getRealOrderIds() as $realOrderId) {
251
+ $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
252
$order->addStatusToHistory(
253
$order->getStatus(), Mage::helper('cybermut')->__('Returned MAC is invalid. Order cancelled.')
254
);
318
319
$session->setIsMultishipping(false);
320
321
+ if ($this->getQuote()->getIsMultiShipping())
322
+ $orderIds = array();
323
324
+ foreach ($this->getRealOrderIds() as $realOrderId) {
325
+ $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
326
327
+ if (!$order->getId()) {
328
+ $this->norouteAction();
329
+ return;
330
}
331
332
$order->addStatusToHistory(
333
+ $order->getStatus(), Mage::helper('cybermut')->__('Customer successfully returned from Cybermut')
334
);
335
336
$order->save();
337
338
+ if ($this->getQuote()->getIsMultiShipping())
339
+ $orderIds[$order->getId()] = $realOrderId;
340
}
341
342
+ if ($this->getQuote()->getIsMultiShipping()) {
343
+ Mage::getSingleton('checkout/type_multishipping')
344
+ ->getCheckoutSession()
345
->setDisplaySuccess(true)
346
+ ->setPayboxResponseCode('success');
347
348
+ Mage::getSingleton('core/session')->setOrderIds($orderIds);
349
+ Mage::getSingleton('checkout/session')->setIsMultishipping(true);
350
}
351
352
+ $this->_redirect($this->_getSuccessRedirect());
353
}
354
355
/**
356
+ * Failure payment page
357
*
358
* @param none
359
* @return void
360
*/
361
+ public function errorAction()
362
{
363
$session = Mage::getSingleton('checkout/session');
364
$model = Mage::getModel('cybermut/payment');
365
366
+ $session->setIsMultishipping(false);
367
368
+ if ($this->getQuote()->getIsMultiShipping())
369
+ $orderIds = array();
370
371
+ foreach ($this->getRealOrderIds() as $realOrderId) {
372
+ $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
373
374
+ if (!$order->getId()) {
375
376
+ //$this->_redirect('checkout/onepage/error');
377
+ //return;
378
+ } else if ($order instanceof Mage_Sales_Model_Order && $order->getId()) {
379
+ /* $order->addStatusToHistory(
380
+ $model->getConfigData('order_status_payment_canceled'),
381
+ Mage::helper('cybermut')->__('Customer returned from Cybermut.')
382
+ );
383
384
+ if ($model->getConfigData('order_status_payment_canceled') == Mage_Sales_Model_Order::STATE_CANCELED) {
385
+ $order->cancel();
386
+ } */
387
388
if (!$status = $model->getConfigData('order_status_payment_canceled')) {
389
$status = $order->getStatus();
390
}
399
$order->cancel();
400
}
401
402
+ $order->save();
403
}
404
}
405
406
+ if (!$model->getConfigData('empty_cart')) {
407
+ $this->_reorder();
408
}
409
410
+ $this->_redirect($this->_getErrorRedirect());
411
}
412
+
413
+ protected function _reorder()
414
{
415
$cart = Mage::getSingleton('checkout/cart');
416
$cartTruncated = false;
417
/* @var $cart Mage_Checkout_Model_Cart */
418
+
419
+ foreach ($this->getRealOrderIds() as $realOrderId) {
420
+ $order = Mage::getModel('sales/order')->loadByIncrementId($realOrderId);
421
+
422
+ if ($order->getId()) {
423
+ $items = $order->getItemsCollection();
424
+ foreach ($items as $item) {
425
+ try {
426
+ $cart->addOrderItem($item);
427
+ } catch (Mage_Core_Exception $e){
428
+ if (Mage::getSingleton('checkout/session')->getUseNotice(true)) {
429
+ Mage::getSingleton('checkout/session')->addNotice($e->getMessage());
430
+ }
431
+ else {
432
+ Mage::getSingleton('checkout/session')->addError($e->getMessage());
433
+ }
434
+ } catch (Exception $e) {
435
+ Mage::getSingleton('checkout/session')->addException($e,
436
+ Mage::helper('checkout')->__('Cannot add the item to shopping cart.')
437
+ );
438
}
439
}
440
}
441
}
442
443
+ $cart->save();
444
+ }
445
+
446
+ protected function _getSuccessRedirect()
447
+ {
448
+ if ($this->getQuote()->getIsMultiShipping())
449
+ return 'checkout/multishipping/success';
450
+ else
451
+ return 'checkout/onepage/success';
452
+ }
453
+
454
+ protected function _getErrorRedirect()
455
+ {
456
+ if ($this->getQuote()->getIsMultiShipping()) {
457
+ return 'checkout/cart';
458
+ } else {
459
+ return 'checkout/onepage/failure';
460
+ }
461
}
462
}
app/code/community/Quadra/Cybermut/etc/config.xml CHANGED
@@ -1,27 +1,25 @@
1
<?xml version="1.0"?>
2
<!--
3
- /**
4
- * Magento
5
*
6
* NOTICE OF LICENSE
7
*
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
*
16
- * @category Quadra
17
- * @package Quadra_Cybermut
18
- * @author Quadra Team
19
*/
20
-->
21
<config>
22
<modules>
23
<Quadra_Cybermut>
24
- <version>1.0.1</version>
25
</Quadra_Cybermut>
26
</modules>
27
<global>
@@ -69,7 +67,7 @@
69
<use>core_read</use>
70
</connection>
71
</cybermut_read>
72
- </resources>
73
<payment>
74
<cybermut_payment>
75
<languages>
@@ -133,29 +131,29 @@
133
<events>
134
<checkout_controller_multishipping_shipping_post>
135
<observers>
136
- <cybermut_multishipping_init_redirect>
137
<type>model</type>
138
<class>cybermut/observer</class>
139
<method>initRedirect</method>
140
- </cybermut_multishipping_init_redirect>
141
</observers>
142
</checkout_controller_multishipping_shipping_post>
143
<sales_order_place_after>
144
<observers>
145
- <cybermut_multishipping_disable_email_for_multishipping>
146
<type>model</type>
147
<class>cybermut/observer</class>
148
<method>disableEmailForMultishipping</method>
149
- </cybermut_multishipping_disable_email_for_multishipping>
150
</observers>
151
</sales_order_place_after>
152
<checkout_multishipping_controller_success_action>
153
<observers>
154
- <cybermut_multishipping_redirect_url>
155
<type>model</type>
156
<class>cybermut/observer</class>
157
<method>multishippingRedirectUrl</method>
158
- </cybermut_multishipping_redirect_url>
159
</observers>
160
</checkout_multishipping_controller_success_action>
161
</events>
@@ -179,6 +177,8 @@
179
<allowspecific>0</allowspecific>
180
<transaction_type>O</transaction_type>
181
<empty_cart>1</empty_cart>
182
</cybermut_payment>
183
</payment>
184
</default>
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.3 $
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.3</version>
23
</Quadra_Cybermut>
24
</modules>
25
<global>
67
<use>core_read</use>
68
</connection>
69
</cybermut_read>
70
+ </resources>
71
<payment>
72
<cybermut_payment>
73
<languages>
131
<events>
132
<checkout_controller_multishipping_shipping_post>
133
<observers>
134
+ <cybermut>
135
<type>model</type>
136
<class>cybermut/observer</class>
137
<method>initRedirect</method>
138
+ </cybermut>
139
</observers>
140
</checkout_controller_multishipping_shipping_post>
141
<sales_order_place_after>
142
<observers>
143
+ <cybermut>
144
<type>model</type>
145
<class>cybermut/observer</class>
146
<method>disableEmailForMultishipping</method>
147
+ </cybermut>
148
</observers>
149
</sales_order_place_after>
150
<checkout_multishipping_controller_success_action>
151
<observers>
152
+ <cybermut>
153
<type>model</type>
154
<class>cybermut/observer</class>
155
<method>multishippingRedirectUrl</method>
156
+ </cybermut>
157
</observers>
158
</checkout_multishipping_controller_success_action>
159
</events>
177
<allowspecific>0</allowspecific>
178
<transaction_type>O</transaction_type>
179
<empty_cart>1</empty_cart>
180
+ <several_times_payment>0</several_times_payment>
181
+ <terms>3</terms>
182
</cybermut_payment>
183
</payment>
184
</default>
app/code/community/Quadra/Cybermut/etc/system.xml CHANGED
@@ -1,21 +1,19 @@
1
<?xml version="1.0"?>
2
<!--
3
- /**
4
- * Magento
5
*
6
* NOTICE OF LICENSE
7
*
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
*
16
- * @category Quadra
17
- * @package Quadra_Cybermut
18
- * @author Quadra Team
19
*/
20
-->
21
<config>
@@ -91,6 +89,25 @@
91
<show_in_website>1</show_in_website>
92
<show_in_store>0</show_in_store>
93
</bank>
94
<description translate="label comment">
95
<label>Transaction Description</label>
96
<comment>Order number will be used if left empty</comment>
@@ -199,7 +216,7 @@
199
<show_in_default>1</show_in_default>
200
<show_in_website>1</show_in_website>
201
<show_in_store>1</show_in_store>
202
- </specificcountry>
203
<sort_order translate="label">
204
<label>Sort order</label>
205
<frontend_type>text</frontend_type>
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.3 $
16
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
*/
18
-->
19
<config>
89
<show_in_website>1</show_in_website>
90
<show_in_store>0</show_in_store>
91
</bank>
92
+ <several_times_payment translate="label">
93
+ <label>Enabled several times payment</label>
94
+ <frontend_type>select</frontend_type>
95
+ <source_model>adminhtml/system_config_source_yesno</source_model>
96
+ <sort_order>71</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>0</show_in_store>
100
+ </several_times_payment>
101
+ <terms translate="label">
102
+ <label>Number of terms</label>
103
+ <comment>Only if several times payment is enabled</comment>
104
+ <frontend_type>select</frontend_type>
105
+ <source_model>cybermut/source_terms</source_model>
106
+ <sort_order>72</sort_order>
107
+ <show_in_default>1</show_in_default>
108
+ <show_in_website>1</show_in_website>
109
+ <show_in_store>0</show_in_store>
110
+ </terms>
111
<description translate="label comment">
112
<label>Transaction Description</label>
113
<comment>Order number will be used if left empty</comment>
216
<show_in_default>1</show_in_default>
217
<show_in_website>1</show_in_website>
218
<show_in_store>1</show_in_store>
219
+ </specificcountry>
220
<sort_order translate="label">
221
<label>Sort order</label>
222
<frontend_type>text</frontend_type>
app/code/community/Quadra/Cybermut/sql/cybermut_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,23 +1,20 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category Quadra
16
- * @package Quadra_Cybermut
17
- * @author Quadra Team
18
*/
19
20
-
21
$installer = $this;
22
/* @var $installer Quadra_Cybermut_Model_Mysql4_Setup */
23
@@ -32,7 +29,6 @@ CREATE TABLE `{$this->getTable('cybermut_api_debug')}` (
32
PRIMARY KEY (`debug_id`),
33
KEY `debug_at` (`debug_at`)
34
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35
-
36
- ");
37
38
$installer->endSetup();
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
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
29
PRIMARY KEY (`debug_id`),
30
KEY `debug_at` (`debug_at`)
31
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
32
+ ");
33
34
$installer->endSetup();
app/code/community/Quadra/Cybermut/sql/cybermut_setup/mysql4-upgrade-1.0.1-1.0.2.php ADDED
@@ -0,0 +1,41 @@
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.4 $
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
+
21
+ $installer->startSetup();
22
+
23
+ $data = $installer->getConnection()->fetchAll("SHOW COLUMNS FROM `{$installer->getTable('sales_flat_quote_payment')}`;");
24
+
25
+ $columnExist = false;
26
+
27
+ foreach ($data as $row) {
28
+ if ($row['Field'] == 'nbrech') {
29
+ $columnExist = true;
30
+ break;
31
+ }
32
+ }
33
+
34
+ if (!$columnExist) {
35
+ $installer->run("
36
+ ALTER TABLE `{$installer->getTable('sales_flat_quote_payment')}`
37
+ ADD COLUMN `nbrech` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'CyberMut';
38
+ ");
39
+ }
40
+
41
+ $installer->endSetup();
app/design/frontend/default/default/layout/cybermut.xml CHANGED
@@ -1,22 +1,19 @@
1
<?xml version="1.0"?>
2
<!--
3
- /**
4
- * Magento
5
*
6
* NOTICE OF LICENSE
7
*
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
*
16
- * @category design_default
17
- * @package Mage_Cybermut
18
- * @copyright Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
*/
21
-->
22
<layout version="0.1.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-2012 Quadra Informatique
15
+ * @version Release: $Revision: 2.0.3 $
16
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
*/
18
-->
19
<layout version="0.1.0">
app/design/frontend/default/default/template/cybermut/error.phtml CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category design_default
16
- * @package Mage_Cybermut
17
- * @copyright Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
*/
20
?>
21
<div class="page-head">
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
*/
17
?>
18
<div class="page-head">
app/design/frontend/default/default/template/cybermut/form.phtml CHANGED
@@ -1,21 +1,18 @@
1
<?php
2
- /**
3
- * Magento
4
*
5
* NOTICE OF LICENSE
6
*
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
*
15
- * @category design_default
16
- * @package Quadra_Cybermut
17
- * @copyright Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
18
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
*/
20
?>
21
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-2012 Quadra Informatique
14
+ * @version Release: $Revision: 2.0.3 $
15
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
16
*/
17
?>
18
app/etc/modules/Quadra_Cybermut.xml CHANGED
@@ -1,22 +1,19 @@
1
<?xml version="1.0"?>
2
<!--
3
- /**
4
- * Magento
5
*
6
* NOTICE OF LICENSE
7
*
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
*
16
- * @category Mage
17
- * @package Mage_Cybermut
18
- * @copyright Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
*/
21
-->
22
<config>
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.3 $
16
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
*/
18
-->
19
<config>
app/locale/fr_FR/Quadra_Cybermut.csv CHANGED
@@ -32,7 +32,7 @@
32
"Title","Titre"
33
"Transaction Description","Description de la transaction"
34
"You will be redirected to Cybermut in a few seconds.","Vous serez redirigé vers le site de Cybermut dans quelques secondes."
35
- "You will be redirected to Cybermut website when you place an order.","Vous serez redirigé vers le site de Cybermut à l\'issue de votre commande."
36
"Warning: the module Mage_Cybermut must be uninstalled.","Attention : le module Mage_Cybermut doit être désinstaller."
37
"Payment from applicable countries","Mode de paiement autorisé pour"
38
"Payment from Specific countries","Mode de paiement autorisé pour les pays spécifiques"
@@ -47,4 +47,9 @@
47
"Sort order","Ordre de tri"
48
"The payment was canceled.","Le paiement a été annulé."
49
"Create invoice when payment accepted","Créer une facture quand le paiement est accepté"
50
- "Empty cart when payment refused by Cybermut or canceled by customer","Vider le panier quand le paiement est refusé par Cybermut ou annulé par le client"
32
"Title","Titre"
33
"Transaction Description","Description de la transaction"
34
"You will be redirected to Cybermut in a few seconds.","Vous serez redirigé vers le site de Cybermut dans quelques secondes."
35
+ "You will be redirected to Cybermut website when you place an order.","Vous serez redirigé vers le site de Cybermut à l'issue de votre commande."
36
"Warning: the module Mage_Cybermut must be uninstalled.","Attention : le module Mage_Cybermut doit être désinstaller."
37
"Payment from applicable countries","Mode de paiement autorisé pour"
38
"Payment from Specific countries","Mode de paiement autorisé pour les pays spécifiques"
47
"Sort order","Ordre de tri"
48
"The payment was canceled.","Le paiement a été annulé."
49
"Create invoice when payment accepted","Créer une facture quand le paiement est accepté"
50
+ "Empty cart when payment refused by Cybermut or canceled by customer","Vider le panier quand le paiement est refusé par Cybermut ou annulé par le client"
51
+ "Enabled several times payment","Activer le paiement en plusieurs fois"
52
+ "Number of terms","Nombre d'échéances"
53
+ "Only if several times payment is enabled","Seulement si les paiement en plusieurs fois est activé"
54
+ "Order number will be used if left empty","Le numéro de commande sera utilisé par défaut"
55
+ "Preference will be given to store language chosen by the user","La préférence sera donnée à la langue du magasin choisi par l'utilisateur"
package.xml CHANGED
@@ -1,70 +1,36 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Quadra_Cybermut</name>
4
- <version>2.0.2</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>
8
<extends/>
9
- <summary>CM-CIC p@iement (version 2)
10
CyberMUT Paiement / Paiement CIC integration</summary>
11
- <description>This extension provides CM-CIC p@iement (CyberMUT / CIC payment) integration. For payments through Credit Mutuel Group (Credit Mutuel, CIC, OBC).
12
- Compatible with CM-CIC versions 1.2 and 3.0.
13
-
14
- Changelog :
15
- 2.0.2 :
16
- - Some fields in the configuration of the module are now configurable in store view
17
- - The field "empty cart" was added
18
-
19
- 2.0.1: Stable version
20
-
21
- 2.0.0:
22
- - Magento 1.5 compatibility
23
- - Multishipping compatibility
24
- - Bug fixed with magento 1.4
25
- - Beta version
26
-
27
- 1.0.1:
28
- - bug fixed on key encryption (thanks to Christophe)
29
- - bug fixed when browser previous button is used</description>
30
- <notes>Changelog :
31
- 2.0.2 :
32
- - Some fields in the configuration of the module are now configurable in store view
33
- - The field "empty cart" was added
34
-
35
- 2.0.1:
36
- Stable version
37
-
38
- 2.0.0:
39
- - Magento 1.5 compatibility
40
- - Multishipping compatibility
41
- - Bug fixed with magento 1.4
42
- - Beta version
43
-
44
- 1.0.1:
45
- - bug fixed on key encryption (thanks to Christophe)
46
- - bug fixed when browser previous button is used
47
-
48
- Features:
49
- - compatible with versions 1.2 and 3.0
50
- - easy back-end configuration
51
- - auto-selected front-end language
52
- - selectable order status on placing order
53
- - selectable order status on payment success
54
- - selectable order status on payment failure
55
- - selectable order status on customer cancellation
56
- - automatic payment confirmation
57
- - back-end french language
58
- - customer notification on payment success
59
- - put the order on "Order confirmation email sent" status when payment is accepted
60
- - order is cancelled when it passes in cancelled status
61
-
62
- URL CGI to communicate to CM/CIC is:
63
- http://www.domain.com/cybermut/payment/notify/</notes>
64
<authors><author><name>Quadra Informatique</name><user>auto-converted</user><email>ecommerce@quadra-informatique.fr</email></author></authors>
65
- <date>2011-07-29</date>
66
- <time>07:48:44</time>
67
- <contents><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><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="cybermut.xml" hash="67bd36d185041fb617740843cdda71db"/></dir><dir name="template"><dir name="cybermut"><file name="error.phtml" hash="baff7801312a42a9fa2e9e377b7df384"/><file name="form.phtml" hash="f6bc6dca124ec013fdaf56f9263372c1"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Quadra_Cybermut.csv" hash="e480b58c115f0feacc0cc270d44d62c8"/></dir></target><target name="mageetc"><dir name="modules"><file name="Quadra_Cybermut.xml" hash="c611bf9164edc0f89455d3476d15218c"/></dir></target><target name="magecommunity"><dir name="Quadra"><dir name="Cybermut"><dir name="Block"><file name="Error.php" hash="08e91b562f3f7008b722fe5ecfc43e7f"/><file name="Form.php" hash="b44c68bda1e58eb3c6e0d676285eb2a0"/><file name="Redirect.php" hash="1b543dd7984216602fd58095a1a68f6a"/></dir><dir name="controllers"><file name="PaymentController.php" hash="08ab8e15d5e8a8cc4a2b3f561922574b"/></dir><dir name="etc"><file name="config.xml" hash="ee146d0db20fc6b04c4652399f962d99"/><file name="system.xml" hash="923f1f07acfb3bcb3c0fe6f5b827dac9"/></dir><dir name="Helper"><file name="Data.php" hash="4f1c6d75a3e6ff2fbb6327276e5f0bbc"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="59a82e2a6fe19ec772c3176919565cea"/></dir><dir name="Config"><dir name="Data"><file name="Cybermut.php" hash="c92fc74d1f8843a563db3ea531bdcbbf"/></dir></dir><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="cf59a912327bc4dab17949c6110881ac"/></dir><file name="Debug.php" hash="3e3d04fafa09d8a8eb4700650a4e5210"/></dir><file name="Setup.php" hash="5a4b6bb84ef78c3c7da3e0d8b569fa09"/></dir><dir name="Source"><file name="Bank.php" hash="b760d06346265f772facca102f53e13c"/><file name="Language.php" hash="dbfc7cadd8877aa3aafebb548ceff7fc"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Keyencrypted.php" hash="1aaeaac93381b8282cc6a5062606b22c"/></dir><dir name="Source"><dir name="Order"><dir name="Status"><file name="Accepted.php" hash="d2a70679712bfa6d1c12e8076a11af68"/><file name="Canceled.php" hash="3b2273308fe861731ef2cee61b23b072"/><file name="New.php" hash="d44ca61705f2a9ba48f4612098712adb"/><file name="Refused.php" hash="d12f3c14cc466b98601641d17b0f1aa0"/></dir><file name="Status.php" hash="1469de41ba056374029e4a685881f745"/></dir><file name="Version.php" hash="f44ebcf14c9f833e9d696bd24ae042ac"/></dir></dir></dir><file name="Observer.php" hash="b61bef10fa74554e02425b7d7131e3c6"/><file name="Payment.php" hash="14eba8e672c96bc3738d8eaebd2f17ce"/></dir><dir name="sql"><dir name="cybermut_setup"><file name="mysql4-install-0.1.0.php" hash="38f84173d568ec2a29254437f7a4cc2a"/></dir></dir></dir></dir></target></contents>
68
<compatible/>
69
<dependencies><required><package><name>Quadra_Extensions</name><channel>community</channel><min>1.0.0</min><max></max></package></required></dependencies>
70
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>Quadra_Cybermut</name>
4
+ <version>2.0.3</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>
8
<extends/>
9
+ <summary>CM-CIC p@iement (version 2)&#xD;
10
CyberMUT Paiement / Paiement CIC integration</summary>
11
+ <description>This extension provides CM-CIC p@iement (CyberMUT / CIC payment) integration. For payments through Credit Mutuel Group (Credit Mutuel, CIC, OBC).&#xD;
12
+ Compatible with CM-CIC versions 1.2 and 3.0.</description>
13
+ <notes>Changelog:&#xD;
14
+ &#xD;
15
+ 2.0.3:&#xD;
16
+ - Bug fixed with multishipping&#xD;
17
+ &#xD;
18
+ 2.0.2: &#xD;
19
+ - Some fields in the configuration of the module are now configurable in store view&#xD;
20
+ - The field "empty cart" was added&#xD;
21
+ &#xD;
22
+ 2.0.1:&#xD;
23
+ - Stable version&#xD;
24
+ &#xD;
25
+ 2.0.0: &#xD;
26
+ - Magento 1.5 compatibility&#xD;
27
+ - Multishipping compatibility&#xD;
28
+ - Bug fixed with magento 1.4&#xD;
29
+ - Beta version</notes>
30
<authors><author><name>Quadra Informatique</name><user>auto-converted</user><email>ecommerce@quadra-informatique.fr</email></author></authors>
31
+ <date>2012-01-06</date>
32