iCheckgateway_Payment_Extension - Version 1.0.1

Version Notes

After installing the extension, Please do not forget to refresh magento cache. After refreshing caches, there will be new options in the admin > configuration > Payment Methods. Expand their blocks to enable them and save.

Download this release

Release Info

Developer LuminousTec LLC
Extension iCheckgateway_Payment_Extension
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

Files changed (61) hide show
  1. app/code/core/Mage/Payment/Block/Form/Banktransfer.php +62 -0
  2. app/code/core/Mage/Payment/Block/Form/Cashondelivery.php +62 -0
  3. app/code/core/Mage/Payment/Block/Form/Cc.php +159 -0
  4. app/code/core/Mage/Payment/Block/Form/Ccsave.php +37 -0
  5. app/code/core/Mage/Payment/Block/Form/CheckACH.php +37 -0
  6. app/code/core/Mage/Payment/Block/Form/Checkmo.php +37 -0
  7. app/code/core/Mage/Payment/Block/Form/Container.php +141 -0
  8. app/code/core/Mage/Payment/Block/Form/Purchaseorder.php +35 -0
  9. app/code/core/Mage/Payment/Block/Info/Banktransfer.php +61 -0
  10. app/code/core/Mage/Payment/Block/Info/Cc.php +127 -0
  11. app/code/core/Mage/Payment/Block/Info/Ccsave.php +54 -0
  12. app/code/core/Mage/Payment/Block/Info/CheckACH.php +55 -0
  13. app/code/core/Mage/Payment/Block/Info/Checkmo.php +90 -0
  14. app/code/core/Mage/Payment/Block/Info/Container.php +91 -0
  15. app/code/core/Mage/Payment/Block/Info/Purchaseorder.php +41 -0
  16. app/code/core/Mage/Payment/Model/Method/Abstract.php +795 -0
  17. app/code/core/Mage/Payment/Model/Method/Banktransfer.php +59 -0
  18. app/code/core/Mage/Payment/Model/Method/Cashondelivery.php +58 -0
  19. app/code/core/Mage/Payment/Model/Method/Cc.php +399 -0
  20. app/code/core/Mage/Payment/Model/Method/Ccsave.php +34 -0
  21. app/code/core/Mage/Payment/Model/Method/CheckACH.php +34 -0
  22. app/code/core/Mage/Payment/Model/Method/Checkmo.php +66 -0
  23. app/code/core/Mage/Payment/Model/Method/Free.php +78 -0
  24. app/code/core/Mage/Payment/Model/Method/Purchaseorder.php +49 -0
  25. app/code/local/ICheckGateway/Checks/Model/PaymentMethod.php +82 -0
  26. app/code/local/ICheckGateway/Checks/etc/config.xml +61 -0
  27. app/code/local/ICheckGateway/Checks/etc/system.xml +77 -0
  28. app/code/local/ICheckGateway/CreditCards/Model/PaymentMethod.php +78 -0
  29. app/code/local/ICheckGateway/CreditCards/etc/config.xml +61 -0
  30. app/code/local/ICheckGateway/CreditCards/etc/system.xml +77 -0
  31. app/design/frontend/base/default/template/payment/form/banktransfer.phtml +35 -0
  32. app/design/frontend/base/default/template/payment/form/cashondelivery.phtml +39 -0
  33. app/design/frontend/base/default/template/payment/form/cc.phtml +138 -0
  34. app/design/frontend/base/default/template/payment/form/ccsave.phtml +135 -0
  35. app/design/frontend/base/default/template/payment/form/checkach.phtml +26 -0
  36. app/design/frontend/base/default/template/payment/form/checkmo.phtml +44 -0
  37. app/design/frontend/base/default/template/payment/form/purchaseorder.phtml +34 -0
  38. app/etc/modules/Cm_RedisSession.xml +8 -0
  39. app/etc/modules/ICheckGateway_Checks.xml +12 -0
  40. app/etc/modules/ICheckGateway_CreditCards.xml +12 -0
  41. app/etc/modules/Mage_All.xml +401 -0
  42. app/etc/modules/Mage_Api.xml +38 -0
  43. app/etc/modules/Mage_Api2.xml +39 -0
  44. app/etc/modules/Mage_Authorizenet.xml +40 -0
  45. app/etc/modules/Mage_Bundle.xml +38 -0
  46. app/etc/modules/Mage_Captcha.xml +39 -0
  47. app/etc/modules/Mage_Centinel.xml +39 -0
  48. app/etc/modules/Mage_Compiler.xml +38 -0
  49. app/etc/modules/Mage_ConfigurableSwatches.xml +39 -0
  50. app/etc/modules/Mage_Connect.xml +36 -0
  51. app/etc/modules/Mage_CurrencySymbol.xml +38 -0
  52. app/etc/modules/Mage_Downloadable.xml +39 -0
  53. app/etc/modules/Mage_ImportExport.xml +38 -0
  54. app/etc/modules/Mage_Oauth.xml +38 -0
  55. app/etc/modules/Mage_PageCache.xml +38 -0
  56. app/etc/modules/Mage_Persistent.xml +39 -0
  57. app/etc/modules/Mage_Weee.xml +40 -0
  58. app/etc/modules/Mage_Widget.xml +38 -0
  59. app/etc/modules/Mage_XmlConnect.xml +49 -0
  60. app/etc/modules/Phoenix_Moneybookers.xml +29 -0
  61. package.xml +94 -18
app/code/core/Mage/Payment/Block/Form/Banktransfer.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Block for Bank Transfer payment method form
29
+ */
30
+ class Mage_Payment_Block_Form_Banktransfer extends Mage_Payment_Block_Form
31
+ {
32
+
33
+ /**
34
+ * Instructions text
35
+ *
36
+ * @var string
37
+ */
38
+ protected $_instructions;
39
+
40
+ /**
41
+ * Block construction. Set block template.
42
+ */
43
+ protected function _construct()
44
+ {
45
+ parent::_construct();
46
+ $this->setTemplate('payment/form/banktransfer.phtml');
47
+ }
48
+
49
+ /**
50
+ * Get instructions text from config
51
+ *
52
+ * @return string
53
+ */
54
+ public function getInstructions()
55
+ {
56
+ if (is_null($this->_instructions)) {
57
+ $this->_instructions = $this->getMethod()->getInstructions();
58
+ }
59
+ return $this->_instructions;
60
+ }
61
+
62
+ }
app/code/core/Mage/Payment/Block/Form/Cashondelivery.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Block for Cash On Delivery payment method form
29
+ */
30
+ class Mage_Payment_Block_Form_Cashondelivery extends Mage_Payment_Block_Form
31
+ {
32
+
33
+ /**
34
+ * Instructions text
35
+ *
36
+ * @var string
37
+ */
38
+ protected $_instructions;
39
+
40
+ /**
41
+ * Block construction. Set block template.
42
+ */
43
+ protected function _construct()
44
+ {
45
+ parent::_construct();
46
+ $this->setTemplate('payment/form/cashondelivery.phtml');
47
+ }
48
+
49
+ /**
50
+ * Get instructions text from config
51
+ *
52
+ * @return string
53
+ */
54
+ public function getInstructions()
55
+ {
56
+ if (is_null($this->_instructions)) {
57
+ $this->_instructions = $this->getMethod()->getInstructions();
58
+ }
59
+ return $this->_instructions;
60
+ }
61
+
62
+ }
app/code/core/Mage/Payment/Block/Form/Cc.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Block_Form_Cc extends Mage_Payment_Block_Form
29
+ {
30
+ protected function _construct()
31
+ {
32
+ parent::_construct();
33
+ $this->setTemplate('payment/form/cc.phtml');
34
+ }
35
+
36
+ /**
37
+ * Retrieve payment configuration object
38
+ *
39
+ * @return Mage_Payment_Model_Config
40
+ */
41
+ protected function _getConfig()
42
+ {
43
+ return Mage::getSingleton('payment/config');
44
+ }
45
+
46
+ /**
47
+ * Retrieve availables credit card types
48
+ *
49
+ * @return array
50
+ */
51
+ public function getCcAvailableTypes()
52
+ {
53
+ $types = $this->_getConfig()->getCcTypes();
54
+ if ($method = $this->getMethod()) {
55
+ $availableTypes = $method->getConfigData('cctypes');
56
+ if ($availableTypes) {
57
+ $availableTypes = explode(',', $availableTypes);
58
+ foreach ($types as $code=>$name) {
59
+ if (!in_array($code, $availableTypes)) {
60
+ unset($types[$code]);
61
+ }
62
+ }
63
+ }
64
+ }
65
+ return $types;
66
+ }
67
+
68
+ /**
69
+ * Retrieve credit card expire months
70
+ *
71
+ * @return array
72
+ */
73
+ public function getCcMonths()
74
+ {
75
+ $months = $this->getData('cc_months');
76
+ if (is_null($months)) {
77
+ $months[0] = $this->__('Month');
78
+ $months = array_merge($months, $this->_getConfig()->getMonths());
79
+ $this->setData('cc_months', $months);
80
+ }
81
+ return $months;
82
+ }
83
+
84
+ /**
85
+ * Retrieve credit card expire years
86
+ *
87
+ * @return array
88
+ */
89
+ public function getCcYears()
90
+ {
91
+ $years = $this->getData('cc_years');
92
+ if (is_null($years)) {
93
+ $years = $this->_getConfig()->getYears();
94
+ $years = array(0=>$this->__('Year'))+$years;
95
+ $this->setData('cc_years', $years);
96
+ }
97
+ return $years;
98
+ }
99
+
100
+ /**
101
+ * Retrive has verification configuration
102
+ *
103
+ * @return boolean
104
+ */
105
+ public function hasVerification()
106
+ {
107
+ if ($this->getMethod()) {
108
+ $configData = $this->getMethod()->getConfigData('useccv');
109
+ if(is_null($configData)){
110
+ return true;
111
+ }
112
+ return (bool) $configData;
113
+ }
114
+ return true;
115
+ }
116
+
117
+ /*
118
+ * Whether switch/solo card type available
119
+ */
120
+ public function hasSsCardType()
121
+ {
122
+ $availableTypes = explode(',', $this->getMethod()->getConfigData('cctypes'));
123
+ $ssPresenations = array_intersect(array('SS', 'SM', 'SO'), $availableTypes);
124
+ if ($availableTypes && count($ssPresenations) > 0) {
125
+ return true;
126
+ }
127
+ return false;
128
+ }
129
+
130
+ /*
131
+ * solo/switch card start year
132
+ * @return array
133
+ */
134
+ public function getSsStartYears()
135
+ {
136
+ $years = array();
137
+ $first = date("Y");
138
+
139
+ for ($index=5; $index>=0; $index--) {
140
+ $year = $first - $index;
141
+ $years[$year] = $year;
142
+ }
143
+ $years = array(0=>$this->__('Year'))+$years;
144
+ return $years;
145
+ }
146
+
147
+ /**
148
+ * Render block HTML
149
+ *
150
+ * @return string
151
+ */
152
+ protected function _toHtml()
153
+ {
154
+ Mage::dispatchEvent('payment_form_block_to_html_before', array(
155
+ 'block' => $this
156
+ ));
157
+ return parent::_toHtml();
158
+ }
159
+ }
app/code/core/Mage/Payment/Block/Form/Ccsave.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Block_Form_Ccsave extends Mage_Payment_Block_Form_Cc
29
+ {
30
+
31
+ protected function _construct()
32
+ {
33
+ parent::_construct();
34
+ $this->setTemplate('payment/form/ccsave.phtml');
35
+ }
36
+
37
+ }
app/code/core/Mage/Payment/Block/Form/CheckACH.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Block_Form_CheckACH extends Mage_Payment_Block_Form_Cc
29
+ {
30
+
31
+ protected function _construct()
32
+ {
33
+ parent::_construct();
34
+ $this->setTemplate('payment/form/checkach.phtml');
35
+ }
36
+
37
+ }
app/code/core/Mage/Payment/Block/Form/Checkmo.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Block_Form_Checkmo extends Mage_Payment_Block_Form
29
+ {
30
+
31
+ protected function _construct()
32
+ {
33
+ parent::_construct();
34
+ $this->setTemplate('payment/form/checkmo.phtml');
35
+ }
36
+
37
+ }
app/code/core/Mage/Payment/Block/Form/Container.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Base container block for payment methods forms
29
+ *
30
+ * @method Mage_Sales_Model_Quote getQuote()
31
+ *
32
+ * @category Mage
33
+ * @package Mage_Payment
34
+ * @author Magento Core Team <core@magentocommerce.com>
35
+ */
36
+ class Mage_Payment_Block_Form_Container extends Mage_Core_Block_Template
37
+ {
38
+ /**
39
+ * Prepare children blocks
40
+ */
41
+ protected function _prepareLayout()
42
+ {
43
+ /**
44
+ * Create child blocks for payment methods forms
45
+ */
46
+ foreach ($this->getMethods() as $method) {
47
+ $this->setChild(
48
+ 'payment.method.'.$method->getCode(),
49
+ $this->helper('payment')->getMethodFormBlock($method)
50
+ );
51
+ }
52
+
53
+ return parent::_prepareLayout();
54
+ }
55
+
56
+ /**
57
+ * Check payment method model
58
+ *
59
+ * @param Mage_Payment_Model_Method_Abstract $method
60
+ * @return bool
61
+ */
62
+ protected function _canUseMethod($method)
63
+ {
64
+ return $method->isApplicableToQuote($this->getQuote(), Mage_Payment_Model_Method_Abstract::CHECK_USE_FOR_COUNTRY
65
+ | Mage_Payment_Model_Method_Abstract::CHECK_USE_FOR_CURRENCY
66
+ | Mage_Payment_Model_Method_Abstract::CHECK_ORDER_TOTAL_MIN_MAX
67
+ );
68
+ }
69
+
70
+ /**
71
+ * Check and prepare payment method model
72
+ *
73
+ * Redeclare this method in child classes for declaring method info instance
74
+ *
75
+ * @param Mage_Payment_Model_Method_Abstract $method
76
+ * @return bool
77
+ */
78
+ protected function _assignMethod($method)
79
+ {
80
+ $method->setInfoInstance($this->getQuote()->getPayment());
81
+ return $this;
82
+ }
83
+
84
+ /**
85
+ * Declare template for payment method form block
86
+ *
87
+ * @param string $method
88
+ * @param string $template
89
+ * @return Mage_Payment_Block_Form_Container
90
+ */
91
+ public function setMethodFormTemplate($method='', $template='')
92
+ {
93
+ if (!empty($method) && !empty($template)) {
94
+ if ($block = $this->getChild('payment.method.'.$method)) {
95
+ $block->setTemplate($template);
96
+ }
97
+ }
98
+ return $this;
99
+ }
100
+
101
+ /**
102
+ * Retrieve available payment methods
103
+ *
104
+ * @return array
105
+ */
106
+ public function getMethods()
107
+ {
108
+ $methods = $this->getData('methods');
109
+ if ($methods === null) {
110
+ $quote = $this->getQuote();
111
+ $store = $quote ? $quote->getStoreId() : null;
112
+ $methods = array();
113
+ foreach ($this->helper('payment')->getStoreMethods($store, $quote) as $method) {
114
+ if ($this->_canUseMethod($method) && $method->isApplicableToQuote(
115
+ $quote,
116
+ Mage_Payment_Model_Method_Abstract::CHECK_ZERO_TOTAL
117
+ )) {
118
+ $this->_assignMethod($method);
119
+ $methods[] = $method;
120
+ }
121
+ }
122
+ $this->setData('methods', $methods);
123
+ }
124
+ return $methods;
125
+ }
126
+
127
+ /**
128
+ * Retrieve code of current payment method
129
+ *
130
+ * @return mixed
131
+ */
132
+ public function getSelectedMethodCode()
133
+ {
134
+ $methods = $this->getMethods();
135
+ if (!empty($methods)) {
136
+ reset($methods);
137
+ return current($methods)->getCode();
138
+ }
139
+ return false;
140
+ }
141
+ }
app/code/core/Mage/Payment/Block/Form/Purchaseorder.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Block_Form_Purchaseorder extends Mage_Payment_Block_Form
29
+ {
30
+ protected function _construct()
31
+ {
32
+ parent::_construct();
33
+ $this->setTemplate('payment/form/purchaseorder.phtml');
34
+ }
35
+ }
app/code/core/Mage/Payment/Block/Info/Banktransfer.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Block for Bank Transfer payment generic info
29
+ */
30
+ class Mage_Payment_Block_Info_Banktransfer extends Mage_Payment_Block_Info
31
+ {
32
+ /**
33
+ * Instructions text
34
+ *
35
+ * @var string
36
+ */
37
+ protected $_instructions;
38
+
39
+ protected function _construct()
40
+ {
41
+ parent::_construct();
42
+ $this->setTemplate('payment/info/banktransfer.phtml');
43
+ }
44
+
45
+ /**
46
+ * Get instructions text from order payment
47
+ * (or from config, if instructions are missed in payment)
48
+ *
49
+ * @return string
50
+ */
51
+ public function getInstructions()
52
+ {
53
+ if (is_null($this->_instructions)) {
54
+ $this->_instructions = $this->getInfo()->getAdditionalInformation('instructions');
55
+ if(empty($this->_instructions)) {
56
+ $this->_instructions = $this->getMethod()->getInstructions();
57
+ }
58
+ }
59
+ return $this->_instructions;
60
+ }
61
+ }
app/code/core/Mage/Payment/Block/Info/Cc.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Credit card generic payment info
29
+ */
30
+ class Mage_Payment_Block_Info_Cc extends Mage_Payment_Block_Info
31
+ {
32
+ /**
33
+ * Retrieve credit card type name
34
+ *
35
+ * @return string
36
+ */
37
+ public function getCcTypeName()
38
+ {
39
+ $types = Mage::getSingleton('payment/config')->getCcTypes();
40
+ $ccType = $this->getInfo()->getCcType();
41
+ if (isset($types[$ccType])) {
42
+ return $types[$ccType];
43
+ }
44
+ return (empty($ccType)) ? Mage::helper('payment')->__('N/A') : $ccType;
45
+ }
46
+
47
+ /**
48
+ * Whether current payment method has credit card expiration info
49
+ *
50
+ * @return bool
51
+ */
52
+ public function hasCcExpDate()
53
+ {
54
+ return (int)$this->getInfo()->getCcExpMonth() || (int)$this->getInfo()->getCcExpYear();
55
+ }
56
+
57
+ /**
58
+ * Retrieve CC expiration month
59
+ *
60
+ * @return string
61
+ */
62
+ public function getCcExpMonth()
63
+ {
64
+ $month = $this->getInfo()->getCcExpMonth();
65
+ if ($month<10) {
66
+ $month = '0'.$month;
67
+ }
68
+ return $month;
69
+ }
70
+
71
+ /**
72
+ * Retrieve CC expiration date
73
+ *
74
+ * @return Zend_Date
75
+ */
76
+ public function getCcExpDate()
77
+ {
78
+ $date = Mage::app()->getLocale()->date(0);
79
+ $date->setYear($this->getInfo()->getCcExpYear());
80
+ $date->setMonth($this->getInfo()->getCcExpMonth());
81
+ return $date;
82
+ }
83
+
84
+ /**
85
+ * Prepare credit card related payment info
86
+ *
87
+ * @param Varien_Object|array $transport
88
+ * @return Varien_Object
89
+ */
90
+ protected function _prepareSpecificInformation($transport = null)
91
+ {
92
+ if (null !== $this->_paymentSpecificInformation) {
93
+ return $this->_paymentSpecificInformation;
94
+ }
95
+ $transport = parent::_prepareSpecificInformation($transport);
96
+ $data = array();
97
+ if ($ccType = $this->getCcTypeName()) {
98
+ $data[Mage::helper('payment')->__('Credit Card Type')] = $ccType;
99
+ }
100
+ if ($this->getInfo()->getCcLast4()) {
101
+ $data[Mage::helper('payment')->__('Credit Card Number')] = sprintf('xxxx-%s', $this->getInfo()->getCcLast4());
102
+ }
103
+ if (!$this->getIsSecureMode()) {
104
+ if ($ccSsIssue = $this->getInfo()->getCcSsIssue()) {
105
+ $data[Mage::helper('payment')->__('Switch/Solo/Maestro Issue Number')] = $ccSsIssue;
106
+ }
107
+ $year = $this->getInfo()->getCcSsStartYear();
108
+ $month = $this->getInfo()->getCcSsStartMonth();
109
+ if ($year && $month) {
110
+ $data[Mage::helper('payment')->__('Switch/Solo/Maestro Start Date')] = $this->_formatCardDate($year, $month);
111
+ }
112
+ }
113
+ return $transport->setData(array_merge($data, $transport->getData()));
114
+ }
115
+
116
+ /**
117
+ * Format year/month on the credit card
118
+ *
119
+ * @param string $year
120
+ * @param string $month
121
+ * @return string
122
+ */
123
+ protected function _formatCardDate($year, $month)
124
+ {
125
+ return sprintf('%s/%s', sprintf('%02d', $month), $year);
126
+ }
127
+ }
app/code/core/Mage/Payment/Block/Info/Ccsave.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Mage_Payment_Block_Info_Ccsave extends Mage_Payment_Block_Info_Cc
28
+ {
29
+ /**
30
+ * Show name on card, expiration date and full cc number
31
+ *
32
+ * Expiration date and full number will show up only in secure mode (only for admin, not in emails or pdfs)
33
+ *
34
+ * @param Varien_Object|array $transport
35
+ */
36
+ protected function _prepareSpecificInformation($transport = null)
37
+ {
38
+ if (null !== $this->_paymentSpecificInformation) {
39
+ return $this->_paymentSpecificInformation;
40
+ }
41
+ $info = $this->getInfo();
42
+ $transport = new Varien_Object(array(Mage::helper('payment')->__('Name on the Card') => $info->getCcOwner(),));
43
+ $transport = parent::_prepareSpecificInformation($transport);
44
+ if (!$this->getIsSecureMode()) {
45
+ $transport->addData(array(
46
+ Mage::helper('payment')->__('Expiration Date') => $this->_formatCardDate(
47
+ $info->getCcExpYear(), $this->getCcExpMonth()
48
+ ),
49
+ Mage::helper('payment')->__('Credit Card Number') => $info->getCcNumber(),
50
+ ));
51
+ }
52
+ return $transport;
53
+ }
54
+ }
app/code/core/Mage/Payment/Block/Info/CheckACH.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Mage_Payment_Block_Info_CheckACH extends Mage_Payment_Block_Info_Cc
28
+ {
29
+ /**
30
+ * Show name on card, expiration date and full cc number
31
+ *
32
+ * Expiration date and full number will show up only in secure mode (only for admin, not in emails or pdfs)
33
+ *
34
+ * @param Varien_Object|array $transport
35
+ */
36
+ /*protected function _prepareSpecificInformation($transport = null)
37
+ {
38
+ if (null !== $this->_paymentSpecificInformation) {
39
+ return $this->_paymentSpecificInformation;
40
+ }
41
+ $info = $this->getInfo();
42
+ $transport = new Varien_Object(array(Mage::helper('payment')->__('Name on the Card') => $info->getCcOwner(),));
43
+ $transport = parent::_prepareSpecificInformation($transport);
44
+ if (!$this->getIsSecureMode()) {
45
+ $transport->addData(array(
46
+ Mage::helper('payment')->__('Expiration Date') => $this->_formatCardDate(
47
+ $info->getCcExpYear(), $this->getCcExpMonth()
48
+ ),
49
+ Mage::helper('payment')->__('Credit Card Number') => $info->getCcNumber(),
50
+ ));
51
+ }
52
+ return $transport;
53
+ }
54
+ */
55
+ }
app/code/core/Mage/Payment/Block/Info/Checkmo.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Block_Info_Checkmo extends Mage_Payment_Block_Info
29
+ {
30
+
31
+ protected $_payableTo;
32
+ protected $_mailingAddress;
33
+
34
+ protected function _construct()
35
+ {
36
+ parent::_construct();
37
+ $this->setTemplate('payment/info/checkmo.phtml');
38
+ }
39
+
40
+ /**
41
+ * Enter description here...
42
+ *
43
+ * @return string
44
+ */
45
+ public function getPayableTo()
46
+ {
47
+ if (is_null($this->_payableTo)) {
48
+ $this->_convertAdditionalData();
49
+ }
50
+ return $this->_payableTo;
51
+ }
52
+
53
+ /**
54
+ * Enter description here...
55
+ *
56
+ * @return string
57
+ */
58
+ public function getMailingAddress()
59
+ {
60
+ if (is_null($this->_mailingAddress)) {
61
+ $this->_convertAdditionalData();
62
+ }
63
+ return $this->_mailingAddress;
64
+ }
65
+
66
+ /**
67
+ * Enter description here...
68
+ *
69
+ * @return Mage_Payment_Block_Info_Checkmo
70
+ */
71
+ protected function _convertAdditionalData()
72
+ {
73
+ $details = @unserialize($this->getInfo()->getAdditionalData());
74
+ if (is_array($details)) {
75
+ $this->_payableTo = isset($details['payable_to']) ? (string) $details['payable_to'] : '';
76
+ $this->_mailingAddress = isset($details['mailing_address']) ? (string) $details['mailing_address'] : '';
77
+ } else {
78
+ $this->_payableTo = '';
79
+ $this->_mailingAddress = '';
80
+ }
81
+ return $this;
82
+ }
83
+
84
+ public function toPdf()
85
+ {
86
+ $this->setTemplate('payment/info/pdf/checkmo.phtml');
87
+ return $this->toHtml();
88
+ }
89
+
90
+ }
app/code/core/Mage/Payment/Block/Info/Container.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Payment information container block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Payment
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Payment_Block_Info_Container extends Mage_Core_Block_Template
35
+ {
36
+ /**
37
+ * Add payment info block to layout
38
+ *
39
+ * @return Mage_Payment_Block_Info_Container
40
+ */
41
+ protected function _prepareLayout()
42
+ {
43
+ if ($info = $this->getPaymentInfo()) {
44
+ $this->setChild(
45
+ $this->_getInfoBlockName(),
46
+ Mage::helper('payment')->getInfoBlock($info)
47
+ );
48
+ }
49
+ return parent::_prepareLayout();
50
+ }
51
+
52
+ /**
53
+ * Retrieve info block name
54
+ *
55
+ * @return unknown
56
+ */
57
+ protected function _getInfoBlockName()
58
+ {
59
+ if ($info = $this->getPaymentInfo()) {
60
+ return 'payment.info.'.$info->getMethodInstance()->getCode();
61
+ }
62
+ return false;
63
+ }
64
+
65
+ /**
66
+ * Retrieve payment info model
67
+ *
68
+ * @return Mage_Payment_Model_Info
69
+ */
70
+ public function getPaymentInfo()
71
+ {
72
+ return false;
73
+ }
74
+
75
+ /**
76
+ * Declare info block template
77
+ *
78
+ * @param string $method
79
+ * @param string $template
80
+ * @return Mage_Payment_Block_Info_Container
81
+ */
82
+ public function setInfoTemplate($method='', $template='')
83
+ {
84
+ if ($info = $this->getPaymentInfo()) {
85
+ if ($info->getMethodInstance()->getCode() == $method) {
86
+ $this->getChild($this->_getInfoBlockName())->setTemplate($template);
87
+ }
88
+ }
89
+ return $this;
90
+ }
91
+ }
app/code/core/Mage/Payment/Block/Info/Purchaseorder.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Block_Info_Purchaseorder extends Mage_Payment_Block_Info
29
+ {
30
+ protected function _construct()
31
+ {
32
+ parent::_construct();
33
+ $this->setTemplate('payment/info/purchaseorder.phtml');
34
+ }
35
+
36
+ public function toPdf()
37
+ {
38
+ $this->setTemplate('payment/info/pdf/purchaseorder.phtml');
39
+ return $this->toHtml();
40
+ }
41
+ }
app/code/core/Mage/Payment/Model/Method/Abstract.php ADDED
@@ -0,0 +1,795 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Payment method abstract model
29
+ *
30
+ * @author Magento Core Team <core@magentocommerce.com>
31
+ */
32
+ abstract class Mage_Payment_Model_Method_Abstract extends Varien_Object
33
+ {
34
+ const ACTION_ORDER = 'order';
35
+ const ACTION_AUTHORIZE = 'authorize';
36
+ const ACTION_AUTHORIZE_CAPTURE = 'authorize_capture';
37
+
38
+ const STATUS_UNKNOWN = 'UNKNOWN';
39
+ const STATUS_APPROVED = 'APPROVED';
40
+ const STATUS_ERROR = 'ERROR';
41
+ const STATUS_DECLINED = 'DECLINED';
42
+ const STATUS_VOID = 'VOID';
43
+ const STATUS_SUCCESS = 'SUCCESS';
44
+
45
+ /**
46
+ * Bit masks to specify different payment method checks.
47
+ * @see Mage_Payment_Model_Method_Abstract::isApplicableToQuote
48
+ */
49
+ const CHECK_USE_FOR_COUNTRY = 1;
50
+ const CHECK_USE_FOR_CURRENCY = 2;
51
+ const CHECK_USE_CHECKOUT = 4;
52
+ const CHECK_USE_FOR_MULTISHIPPING = 8;
53
+ const CHECK_USE_INTERNAL = 16;
54
+ const CHECK_ORDER_TOTAL_MIN_MAX = 32;
55
+ const CHECK_RECURRING_PROFILES = 64;
56
+ const CHECK_ZERO_TOTAL = 128;
57
+
58
+ protected $_code;
59
+ protected $_formBlockType = 'payment/form';
60
+ protected $_infoBlockType = 'payment/info';
61
+
62
+ /**
63
+ * Payment Method features
64
+ * @var bool
65
+ */
66
+ protected $_isGateway = false;
67
+ protected $_canOrder = false;
68
+ protected $_canAuthorize = false;
69
+ protected $_canCapture = false;
70
+ protected $_canCapturePartial = false;
71
+ protected $_canCaptureOnce = false;
72
+ protected $_canRefund = false;
73
+ protected $_canRefundInvoicePartial = false;
74
+ protected $_canVoid = false;
75
+ protected $_canUseInternal = true;
76
+ protected $_canUseCheckout = true;
77
+ protected $_canUseForMultishipping = true;
78
+ protected $_isInitializeNeeded = false;
79
+ protected $_canFetchTransactionInfo = false;
80
+ protected $_canReviewPayment = false;
81
+ protected $_canCreateBillingAgreement = false;
82
+ protected $_canManageRecurringProfiles = true;
83
+ /**
84
+ * TODO: whether a captured transaction may be voided by this gateway
85
+ * This may happen when amount is captured, but not settled
86
+ * @var bool
87
+ */
88
+ protected $_canCancelInvoice = false;
89
+
90
+ /**
91
+ * Fields that should be replaced in debug with '***'
92
+ *
93
+ * @var array
94
+ */
95
+ protected $_debugReplacePrivateDataKeys = array();
96
+
97
+ public function __construct()
98
+ {
99
+
100
+ }
101
+
102
+ /**
103
+ * Check order availability
104
+ *
105
+ * @return bool
106
+ */
107
+ public function canOrder()
108
+ {
109
+ return $this->_canOrder;
110
+ }
111
+
112
+ /**
113
+ * Check authorise availability
114
+ *
115
+ * @return bool
116
+ */
117
+ public function canAuthorize()
118
+ {
119
+ return $this->_canAuthorize;
120
+ }
121
+
122
+ /**
123
+ * Check capture availability
124
+ *
125
+ * @return bool
126
+ */
127
+ public function canCapture()
128
+ {
129
+ return $this->_canCapture;
130
+ }
131
+
132
+ /**
133
+ * Check partial capture availability
134
+ *
135
+ * @return bool
136
+ */
137
+ public function canCapturePartial()
138
+ {
139
+ return $this->_canCapturePartial;
140
+ }
141
+
142
+ /**
143
+ * Check whether capture can be performed once and no further capture possible
144
+ *
145
+ * @return bool
146
+ */
147
+ public function canCaptureOnce()
148
+ {
149
+ return $this->_canCaptureOnce;
150
+ }
151
+
152
+ /**
153
+ * Check refund availability
154
+ *
155
+ * @return bool
156
+ */
157
+ public function canRefund()
158
+ {
159
+ return $this->_canRefund;
160
+ }
161
+
162
+ /**
163
+ * Check partial refund availability for invoice
164
+ *
165
+ * @return bool
166
+ */
167
+ public function canRefundPartialPerInvoice()
168
+ {
169
+ return $this->_canRefundInvoicePartial;
170
+ }
171
+
172
+ /**
173
+ * Check void availability
174
+ *
175
+ * @param Varien_Object $payment
176
+ * @return bool
177
+ */
178
+ public function canVoid(Varien_Object $payment)
179
+ {
180
+ return $this->_canVoid;
181
+ }
182
+
183
+ /**
184
+ * Using internal pages for input payment data
185
+ * Can be used in admin
186
+ *
187
+ * @return bool
188
+ */
189
+ public function canUseInternal()
190
+ {
191
+ return $this->_canUseInternal;
192
+ }
193
+
194
+ /**
195
+ * Can be used in regular checkout
196
+ *
197
+ * @return bool
198
+ */
199
+ public function canUseCheckout()
200
+ {
201
+ return $this->_canUseCheckout;
202
+ }
203
+
204
+ /**
205
+ * Using for multiple shipping address
206
+ *
207
+ * @return bool
208
+ */
209
+ public function canUseForMultishipping()
210
+ {
211
+ return $this->_canUseForMultishipping;
212
+ }
213
+
214
+ /**
215
+ * Can be edit order (renew order)
216
+ *
217
+ * @return bool
218
+ */
219
+ public function canEdit()
220
+ {
221
+ return true;
222
+ }
223
+
224
+ /**
225
+ * Check fetch transaction info availability
226
+ *
227
+ * @return bool
228
+ */
229
+ public function canFetchTransactionInfo()
230
+ {
231
+ return $this->_canFetchTransactionInfo;
232
+ }
233
+
234
+ /**
235
+ * Check whether payment method instance can create billing agreements
236
+ *
237
+ * @return bool
238
+ */
239
+ public function canCreateBillingAgreement()
240
+ {
241
+ return $this->_canCreateBillingAgreement;
242
+ }
243
+
244
+ /**
245
+ * Fetch transaction info
246
+ *
247
+ * @param Mage_Payment_Model_Info $payment
248
+ * @param string $transactionId
249
+ * @return array
250
+ */
251
+ public function fetchTransactionInfo(Mage_Payment_Model_Info $payment, $transactionId)
252
+ {
253
+ return array();
254
+ }
255
+
256
+ /**
257
+ * Retrieve payment system relation flag
258
+ *
259
+ * @return bool
260
+ */
261
+ public function isGateway()
262
+ {
263
+ return $this->_isGateway;
264
+ }
265
+
266
+ /**
267
+ * flag if we need to run payment initialize while order place
268
+ *
269
+ * @return bool
270
+ */
271
+ public function isInitializeNeeded()
272
+ {
273
+ return $this->_isInitializeNeeded;
274
+ }
275
+
276
+ /**
277
+ * To check billing country is allowed for the payment method
278
+ *
279
+ * @return bool
280
+ */
281
+ public function canUseForCountry($country)
282
+ {
283
+ /*
284
+ for specific country, the flag will set up as 1
285
+ */
286
+ if($this->getConfigData('allowspecific')==1){
287
+ $availableCountries = explode(',', $this->getConfigData('specificcountry'));
288
+ if(!in_array($country, $availableCountries)){
289
+ return false;
290
+ }
291
+
292
+ }
293
+ return true;
294
+ }
295
+
296
+ /**
297
+ * Check method for processing with base currency
298
+ *
299
+ * @param string $currencyCode
300
+ * @return boolean
301
+ */
302
+ public function canUseForCurrency($currencyCode)
303
+ {
304
+ return true;
305
+ }
306
+
307
+ /**
308
+ * Check manage billing agreements availability
309
+ *
310
+ * @return bool
311
+ */
312
+ public function canManageBillingAgreements()
313
+ {
314
+ return ($this instanceof Mage_Payment_Model_Billing_Agreement_MethodInterface);
315
+ }
316
+
317
+ /**
318
+ * Whether can manage recurring profiles
319
+ *
320
+ * @return bool
321
+ */
322
+ public function canManageRecurringProfiles()
323
+ {
324
+ return $this->_canManageRecurringProfiles
325
+ && ($this instanceof Mage_Payment_Model_Recurring_Profile_MethodInterface);
326
+ }
327
+
328
+ /**
329
+ * Retrieve model helper
330
+ *
331
+ * @return Mage_Payment_Helper_Data
332
+ */
333
+ protected function _getHelper()
334
+ {
335
+ return Mage::helper('payment');
336
+ }
337
+
338
+ /**
339
+ * Retrieve payment method code
340
+ *
341
+ * @return string
342
+ */
343
+ public function getCode()
344
+ {
345
+ if (empty($this->_code)) {
346
+ Mage::throwException(Mage::helper('payment')->__('Cannot retrieve the payment method code.'));
347
+ }
348
+ return $this->_code;
349
+ }
350
+
351
+ /**
352
+ * Retrieve block type for method form generation
353
+ *
354
+ * @return string
355
+ */
356
+ public function getFormBlockType()
357
+ {
358
+ return $this->_formBlockType;
359
+ }
360
+
361
+ /**
362
+ * Retrieve block type for display method information
363
+ *
364
+ * @return string
365
+ */
366
+ public function getInfoBlockType()
367
+ {
368
+ return $this->_infoBlockType;
369
+ }
370
+
371
+ /**
372
+ * Retrieve payment iformation model object
373
+ *
374
+ * @return Mage_Payment_Model_Info
375
+ */
376
+ public function getInfoInstance()
377
+ {
378
+ $instance = $this->getData('info_instance');
379
+ if (!($instance instanceof Mage_Payment_Model_Info)) {
380
+ Mage::throwException(Mage::helper('payment')->__('Cannot retrieve the payment information object instance.'));
381
+ }
382
+ return $instance;
383
+ }
384
+
385
+ /**
386
+ * Validate payment method information object
387
+ *
388
+ * @return Mage_Payment_Model_Abstract
389
+ */
390
+ public function validate()
391
+ {
392
+ /**
393
+ * to validate payment method is allowed for billing country or not
394
+ */
395
+ $paymentInfo = $this->getInfoInstance();
396
+ if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
397
+ $billingCountry = $paymentInfo->getOrder()->getBillingAddress()->getCountryId();
398
+ } else {
399
+ $billingCountry = $paymentInfo->getQuote()->getBillingAddress()->getCountryId();
400
+ }
401
+ if (!$this->canUseForCountry($billingCountry)) {
402
+ Mage::throwException(Mage::helper('payment')->__('Selected payment type is not allowed for billing country.'));
403
+ }
404
+ return $this;
405
+ }
406
+
407
+ /**
408
+ * Order payment abstract method
409
+ *
410
+ * @param Varien_Object $payment
411
+ * @param float $amount
412
+ *
413
+ * @return Mage_Payment_Model_Abstract
414
+ */
415
+ public function order(Varien_Object $payment, $amount)
416
+ {
417
+ if (!$this->canOrder()) {
418
+ Mage::throwException(Mage::helper('payment')->__('Order action is not available.'));
419
+ }
420
+ return $this;
421
+ }
422
+
423
+ /**
424
+ * Authorize payment abstract method
425
+ *
426
+ * @param Varien_Object $payment
427
+ * @param float $amount
428
+ *
429
+ * @return Mage_Payment_Model_Abstract
430
+ */
431
+ public function authorize(Varien_Object $payment, $amount)
432
+ {
433
+ if (!$this->canAuthorize()) {
434
+ Mage::throwException(Mage::helper('payment')->__('Authorize action is not available.'));
435
+ }
436
+ return $this;
437
+ }
438
+
439
+ /**
440
+ * Capture payment abstract method
441
+ *
442
+ * @param Varien_Object $payment
443
+ * @param float $amount
444
+ *
445
+ * @return Mage_Payment_Model_Abstract
446
+ */
447
+ public function capture(Varien_Object $payment, $amount)
448
+ {
449
+ if (!$this->canCapture()) {
450
+ Mage::throwException(Mage::helper('payment')->__('Capture action is not available.'));
451
+ }
452
+
453
+ return $this;
454
+ }
455
+
456
+ /**
457
+ * Set capture transaction ID to invoice for informational purposes
458
+ * @param Mage_Sales_Model_Order_Invoice $invoice
459
+ * @param Mage_Sales_Model_Order_Payment $payment
460
+ * @return Mage_Payment_Model_Method_Abstract
461
+ */
462
+ public function processInvoice($invoice, $payment)
463
+ {
464
+ $invoice->setTransactionId($payment->getLastTransId());
465
+ return $this;
466
+ }
467
+
468
+ /**
469
+ * Set refund transaction id to payment object for informational purposes
470
+ * Candidate to be deprecated:
471
+ * there can be multiple refunds per payment, thus payment.refund_transaction_id doesn't make big sense
472
+ *
473
+ * @param Mage_Sales_Model_Order_Invoice $invoice
474
+ * @param Mage_Sales_Model_Order_Payment $payment
475
+ * @return Mage_Payment_Model_Method_Abstract
476
+ */
477
+ public function processBeforeRefund($invoice, $payment)
478
+ {
479
+ $payment->setRefundTransactionId($invoice->getTransactionId());
480
+ return $this;
481
+ }
482
+
483
+ /**
484
+ * Refund specified amount for payment
485
+ *
486
+ * @param Varien_Object $payment
487
+ * @param float $amount
488
+ *
489
+ * @return Mage_Payment_Model_Abstract
490
+ */
491
+ public function refund(Varien_Object $payment, $amount)
492
+ {
493
+
494
+ if (!$this->canRefund()) {
495
+ Mage::throwException(Mage::helper('payment')->__('Refund action is not available.'));
496
+ }
497
+
498
+
499
+ return $this;
500
+ }
501
+
502
+ /**
503
+ * Set transaction ID into creditmemo for informational purposes
504
+ * @param Mage_Sales_Model_Order_Creditmemo $creditmemo
505
+ * @param Mage_Sales_Model_Order_Payment $payment
506
+ * @return Mage_Payment_Model_Method_Abstract
507
+ */
508
+ public function processCreditmemo($creditmemo, $payment)
509
+ {
510
+ $creditmemo->setTransactionId($payment->getLastTransId());
511
+ return $this;
512
+ }
513
+
514
+ /**
515
+ * Cancel payment abstract method
516
+ *
517
+ * @param Varien_Object $payment
518
+ *
519
+ * @return Mage_Payment_Model_Abstract
520
+ */
521
+ public function cancel(Varien_Object $payment)
522
+ {
523
+ return $this;
524
+ }
525
+
526
+ /**
527
+ * @deprecated after 1.4.0.0-alpha3
528
+ * this method doesn't make sense, because invoice must not void entire authorization
529
+ * there should be method for invoice cancellation
530
+ * @param Mage_Sales_Model_Order_Invoice $invoice
531
+ * @param Mage_Sales_Model_Order_Payment $payment
532
+ * @return Mage_Payment_Model_Method_Abstract
533
+ */
534
+ public function processBeforeVoid($invoice, $payment)
535
+ {
536
+ $payment->setVoidTransactionId($invoice->getTransactionId());
537
+ return $this;
538
+ }
539
+
540
+ /**
541
+ * Void payment abstract method
542
+ *
543
+ * @param Varien_Object $payment
544
+ *
545
+ * @return Mage_Payment_Model_Abstract
546
+ */
547
+ public function void(Varien_Object $payment)
548
+ {
549
+ if (!$this->canVoid($payment)) {
550
+ Mage::throwException(Mage::helper('payment')->__('Void action is not available.'));
551
+ }
552
+ return $this;
553
+ }
554
+
555
+ /**
556
+ * Whether this method can accept or deny payment
557
+ *
558
+ * @param Mage_Payment_Model_Info $payment
559
+ *
560
+ * @return bool
561
+ */
562
+ public function canReviewPayment(Mage_Payment_Model_Info $payment)
563
+ {
564
+ return $this->_canReviewPayment;
565
+ }
566
+
567
+ /**
568
+ * Attempt to accept a payment that us under review
569
+ *
570
+ * @param Mage_Payment_Model_Info $payment
571
+ * @return bool
572
+ * @throws Mage_Core_Exception
573
+ */
574
+ public function acceptPayment(Mage_Payment_Model_Info $payment)
575
+ {
576
+ if (!$this->canReviewPayment($payment)) {
577
+ Mage::throwException(Mage::helper('payment')->__('The payment review action is unavailable.'));
578
+ }
579
+ return false;
580
+ }
581
+
582
+ /**
583
+ * Attempt to deny a payment that us under review
584
+ *
585
+ * @param Mage_Payment_Model_Info $payment
586
+ * @return bool
587
+ * @throws Mage_Core_Exception
588
+ */
589
+ public function denyPayment(Mage_Payment_Model_Info $payment)
590
+ {
591
+ if (!$this->canReviewPayment($payment)) {
592
+ Mage::throwException(Mage::helper('payment')->__('The payment review action is unavailable.'));
593
+ }
594
+ return false;
595
+ }
596
+
597
+ /**
598
+ * Retrieve payment method title
599
+ *
600
+ * @return string
601
+ */
602
+ public function getTitle()
603
+ {
604
+ return $this->getConfigData('title');
605
+ }
606
+
607
+ /**
608
+ * Retrieve information from payment configuration
609
+ *
610
+ * @param string $field
611
+ * @param int|string|null|Mage_Core_Model_Store $storeId
612
+ *
613
+ * @return mixed
614
+ */
615
+ public function getConfigData($field, $storeId = null)
616
+ {
617
+ if (null === $storeId) {
618
+ $storeId = $this->getStore();
619
+ }
620
+ $path = 'payment/'.$this->getCode().'/'.$field;
621
+ return Mage::getStoreConfig($path, $storeId);
622
+ }
623
+
624
+ /**
625
+ * Assign data to info model instance
626
+ *
627
+ * @param mixed $data
628
+ * @return Mage_Payment_Model_Info
629
+ */
630
+ public function assignData($data)
631
+ {
632
+ if (is_array($data)) {
633
+ $this->getInfoInstance()->addData($data);
634
+ }
635
+ elseif ($data instanceof Varien_Object) {
636
+ $this->getInfoInstance()->addData($data->getData());
637
+ }
638
+ return $this;
639
+ }
640
+
641
+ /**
642
+ * Parepare info instance for save
643
+ *
644
+ * @return Mage_Payment_Model_Abstract
645
+ */
646
+ public function prepareSave()
647
+ {
648
+ return $this;
649
+ }
650
+
651
+ /**
652
+ * Check whether payment method can be used
653
+ *
654
+ * TODO: payment method instance is not supposed to know about quote
655
+ *
656
+ * @param Mage_Sales_Model_Quote|null $quote
657
+ *
658
+ * @return bool
659
+ */
660
+ public function isAvailable($quote = null)
661
+ {
662
+ $checkResult = new StdClass;
663
+ $isActive = (bool)(int)$this->getConfigData('active', $quote ? $quote->getStoreId() : null);
664
+ $checkResult->isAvailable = $isActive;
665
+ $checkResult->isDeniedInConfig = !$isActive; // for future use in observers
666
+ Mage::dispatchEvent('payment_method_is_active', array(
667
+ 'result' => $checkResult,
668
+ 'method_instance' => $this,
669
+ 'quote' => $quote,
670
+ ));
671
+
672
+ if ($checkResult->isAvailable && $quote) {
673
+ $checkResult->isAvailable = $this->isApplicableToQuote($quote, self::CHECK_RECURRING_PROFILES);
674
+ }
675
+ return $checkResult->isAvailable;
676
+ }
677
+
678
+ /**
679
+ * Check whether payment method is applicable to quote
680
+ * Purposed to allow use in controllers some logic that was implemented in blocks only before
681
+ *
682
+ * @param Mage_Sales_Model_Quote $quote
683
+ * @param int|null $checksBitMask
684
+ * @return bool
685
+ */
686
+ public function isApplicableToQuote($quote, $checksBitMask)
687
+ {
688
+ if ($checksBitMask & self::CHECK_USE_FOR_COUNTRY) {
689
+ if (!$this->canUseForCountry($quote->getBillingAddress()->getCountry())) {
690
+ return false;
691
+ }
692
+ }
693
+ if ($checksBitMask & self::CHECK_USE_FOR_CURRENCY) {
694
+ if (!$this->canUseForCurrency($quote->getStore()->getBaseCurrencyCode())) {
695
+ return false;
696
+ }
697
+ }
698
+ if ($checksBitMask & self::CHECK_USE_CHECKOUT) {
699
+ if (!$this->canUseCheckout()) {
700
+ return false;
701
+ }
702
+ }
703
+ if ($checksBitMask & self::CHECK_USE_FOR_MULTISHIPPING) {
704
+ if (!$this->canUseForMultishipping()) {
705
+ return false;
706
+ }
707
+ }
708
+ if ($checksBitMask & self::CHECK_USE_INTERNAL) {
709
+ if (!$this->canUseInternal()) {
710
+ return false;
711
+ }
712
+ }
713
+ if ($checksBitMask & self::CHECK_ORDER_TOTAL_MIN_MAX) {
714
+ $total = $quote->getBaseGrandTotal();
715
+ $minTotal = $this->getConfigData('min_order_total');
716
+ $maxTotal = $this->getConfigData('max_order_total');
717
+ if (!empty($minTotal) && $total < $minTotal || !empty($maxTotal) && $total > $maxTotal) {
718
+ return false;
719
+ }
720
+ }
721
+ if ($checksBitMask & self::CHECK_RECURRING_PROFILES) {
722
+ if (!$this->canManageRecurringProfiles() && $quote->hasRecurringItems()) {
723
+ return false;
724
+ }
725
+ }
726
+ if ($checksBitMask & self::CHECK_ZERO_TOTAL) {
727
+ $total = $quote->getBaseSubtotal() + $quote->getShippingAddress()->getBaseShippingAmount();
728
+ if ($total < 0.0001 && $this->getCode() != 'free'
729
+ && !($this->canManageRecurringProfiles() && $quote->hasRecurringItems())
730
+ ) {
731
+ return false;
732
+ }
733
+ }
734
+ return true;
735
+ }
736
+
737
+ /**
738
+ * Method that will be executed instead of authorize or capture
739
+ * if flag isInitializeNeeded set to true
740
+ *
741
+ * @param string $paymentAction
742
+ * @param object $stateObject
743
+ *
744
+ * @return Mage_Payment_Model_Abstract
745
+ */
746
+ public function initialize($paymentAction, $stateObject)
747
+ {
748
+ return $this;
749
+ }
750
+
751
+ /**
752
+ * Get config payment action url
753
+ * Used to universalize payment actions when processing payment place
754
+ *
755
+ * @return string
756
+ */
757
+ public function getConfigPaymentAction()
758
+ {
759
+ return $this->getConfigData('payment_action');
760
+ }
761
+
762
+ /**
763
+ * Log debug data to file
764
+ *
765
+ * @param mixed $debugData
766
+ */
767
+ protected function _debug($debugData)
768
+ {
769
+ if ($this->getDebugFlag()) {
770
+ Mage::getModel('core/log_adapter', 'payment_' . $this->getCode() . '.log')
771
+ ->setFilterDataKeys($this->_debugReplacePrivateDataKeys)
772
+ ->log($debugData);
773
+ }
774
+ }
775
+
776
+ /**
777
+ * Define if debugging is enabled
778
+ *
779
+ * @return bool
780
+ */
781
+ public function getDebugFlag()
782
+ {
783
+ return $this->getConfigData('debug');
784
+ }
785
+
786
+ /**
787
+ * Used to call debug method from not Payment Method context
788
+ *
789
+ * @param mixed $debugData
790
+ */
791
+ public function debugData($debugData)
792
+ {
793
+ $this->_debug($debugData);
794
+ }
795
+ }
app/code/core/Mage/Payment/Model/Method/Banktransfer.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Bank Transfer payment method model
29
+ */
30
+ class Mage_Payment_Model_Method_Banktransfer extends Mage_Payment_Model_Method_Abstract
31
+ {
32
+ const PAYMENT_METHOD_BANKTRANSFER_CODE = 'banktransfer';
33
+
34
+ /**
35
+ * Payment method code
36
+ *
37
+ * @var string
38
+ */
39
+ protected $_code = self::PAYMENT_METHOD_BANKTRANSFER_CODE;
40
+
41
+ /**
42
+ * Bank Transfer payment block paths
43
+ *
44
+ * @var string
45
+ */
46
+ protected $_formBlockType = 'payment/form_banktransfer';
47
+ protected $_infoBlockType = 'payment/info_banktransfer';
48
+
49
+ /**
50
+ * Get instructions text from config
51
+ *
52
+ * @return string
53
+ */
54
+ public function getInstructions()
55
+ {
56
+ return trim($this->getConfigData('instructions'));
57
+ }
58
+
59
+ }
app/code/core/Mage/Payment/Model/Method/Cashondelivery.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Cash on delivery payment method model
29
+ */
30
+ class Mage_Payment_Model_Method_Cashondelivery extends Mage_Payment_Model_Method_Abstract
31
+ {
32
+
33
+ /**
34
+ * Payment method code
35
+ *
36
+ * @var string
37
+ */
38
+ protected $_code = 'cashondelivery';
39
+
40
+ /**
41
+ * Cash On Delivery payment block paths
42
+ *
43
+ * @var string
44
+ */
45
+ protected $_formBlockType = 'payment/form_cashondelivery';
46
+ protected $_infoBlockType = 'payment/info';
47
+
48
+ /**
49
+ * Get instructions text from config
50
+ *
51
+ * @return string
52
+ */
53
+ public function getInstructions()
54
+ {
55
+ return trim($this->getConfigData('instructions'));
56
+ }
57
+
58
+ }
app/code/core/Mage/Payment/Model/Method/Cc.php ADDED
@@ -0,0 +1,399 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Model_Method_Cc extends Mage_Payment_Model_Method_Abstract
29
+ {
30
+ protected $_formBlockType = 'payment/form_cc';
31
+ protected $_infoBlockType = 'payment/info_cc';
32
+ protected $_canSaveCc = false;
33
+
34
+ /**
35
+ * Assign data to info model instance
36
+ *
37
+ * @param mixed $data
38
+ * @return Mage_Payment_Model_Info
39
+ */
40
+ public function assignData($data)
41
+ {
42
+ if (!($data instanceof Varien_Object)) {
43
+ $data = new Varien_Object($data);
44
+ }
45
+ $info = $this->getInfoInstance();
46
+ $info->setCcType($data->getCcType())
47
+ ->setCcOwner($data->getCcOwner())
48
+ ->setCcLast4(substr($data->getCcNumber(), -4))
49
+ ->setCcNumber($data->getCcNumber())
50
+ ->setCcCid($data->getCcCid())
51
+ ->setCcExpMonth($data->getCcExpMonth())
52
+ ->setCcExpYear($data->getCcExpYear())
53
+ ->setCcSsIssue($data->getCcSsIssue())
54
+ ->setCcSsStartMonth($data->getCcSsStartMonth())
55
+ ->setCcSsStartYear($data->getCcSsStartYear())
56
+ ;
57
+ return $this;
58
+ }
59
+
60
+ /**
61
+ * Prepare info instance for save
62
+ *
63
+ * @return Mage_Payment_Model_Abstract
64
+ */
65
+ public function prepareSave()
66
+ {
67
+ $info = $this->getInfoInstance();
68
+ if ($this->_canSaveCc) {
69
+ $info->setCcNumberEnc($info->encrypt($info->getCcNumber()));
70
+ }
71
+ //$info->setCcCidEnc($info->encrypt($info->getCcCid()));
72
+ $info->setCcNumber(null)
73
+ ->setCcCid(null);
74
+ return $this;
75
+ }
76
+
77
+ /**
78
+ * Validate payment method information object
79
+ *
80
+ * @param Mage_Payment_Model_Info $info
81
+ * @return Mage_Payment_Model_Abstract
82
+ */
83
+ public function validate()
84
+ {
85
+ /*
86
+ * calling parent validate function
87
+ */
88
+ parent::validate();
89
+
90
+ $info = $this->getInfoInstance();
91
+ $errorMsg = false;
92
+ $availableTypes = explode(',',$this->getConfigData('cctypes'));
93
+
94
+ $ccNumber = $info->getCcNumber();
95
+
96
+ // remove credit card number delimiters such as "-" and space
97
+ $ccNumber = preg_replace('/[\-\s]+/', '', $ccNumber);
98
+ $info->setCcNumber($ccNumber);
99
+
100
+ $ccType = '';
101
+
102
+ if (in_array($info->getCcType(), $availableTypes)){
103
+ if ($this->validateCcNum($ccNumber)
104
+ // Other credit card type number validation
105
+ || ($this->OtherCcType($info->getCcType()) && $this->validateCcNumOther($ccNumber))) {
106
+
107
+ $ccType = 'OT';
108
+ $discoverNetworkRegexp = '/^(30[0-5]\d{13}|3095\d{12}|35(2[8-9]\d{12}|[3-8]\d{13})|36\d{12}'
109
+ . '|3[8-9]\d{14}|6011(0\d{11}|[2-4]\d{11}|74\d{10}|7[7-9]\d{10}|8[6-9]\d{10}|9\d{11})'
110
+ . '|62(2(12[6-9]\d{10}|1[3-9]\d{11}|[2-8]\d{12}|9[0-1]\d{11}|92[0-5]\d{10})|[4-6]\d{13}'
111
+ . '|8[2-8]\d{12})|6(4[4-9]\d{13}|5\d{14}))$/';
112
+ $ccTypeRegExpList = array(
113
+ //Solo, Switch or Maestro. International safe
114
+ /*
115
+ // Maestro / Solo
116
+ 'SS' => '/^((6759[0-9]{12})|(6334|6767[0-9]{12})|(6334|6767[0-9]{14,15})'
117
+ . '|(5018|5020|5038|6304|6759|6761|6763[0-9]{12,19})|(49[013][1356][0-9]{12})'
118
+ . '|(633[34][0-9]{12})|(633110[0-9]{10})|(564182[0-9]{10}))([0-9]{2,3})?$/',
119
+ */
120
+ // Solo only
121
+ 'SO' => '/(^(6334)[5-9](\d{11}$|\d{13,14}$))|(^(6767)(\d{12}$|\d{14,15}$))/',
122
+ // Visa
123
+ 'VI' => '/^4[0-9]{12}([0-9]{3})?$/',
124
+ // Master Card
125
+ 'MC' => '/^5[1-5][0-9]{14}$/',
126
+ // American Express
127
+ 'AE' => '/^3[47][0-9]{13}$/',
128
+ // Discover Network
129
+ 'DI' => $discoverNetworkRegexp,
130
+ // Dinners Club (Belongs to Discover Network)
131
+ 'DICL' => $discoverNetworkRegexp,
132
+ // JCB (Belongs to Discover Network)
133
+ 'JCB' => $discoverNetworkRegexp,
134
+
135
+ // Maestro & Switch
136
+ 'SM' => '/(^(5[0678])\d{11,18}$)|(^(6[^05])\d{11,18}$)|(^(601)[^1]\d{9,16}$)|(^(6011)\d{9,11}$)'
137
+ . '|(^(6011)\d{13,16}$)|(^(65)\d{11,13}$)|(^(65)\d{15,18}$)'
138
+ . '|(^(49030)[2-9](\d{10}$|\d{12,13}$))|(^(49033)[5-9](\d{10}$|\d{12,13}$))'
139
+ . '|(^(49110)[1-2](\d{10}$|\d{12,13}$))|(^(49117)[4-9](\d{10}$|\d{12,13}$))'
140
+ . '|(^(49118)[0-2](\d{10}$|\d{12,13}$))|(^(4936)(\d{12}$|\d{14,15}$))/'
141
+ );
142
+
143
+ $specifiedCCType = $info->getCcType();
144
+ if (array_key_exists($specifiedCCType, $ccTypeRegExpList)) {
145
+ $ccTypeRegExp = $ccTypeRegExpList[$specifiedCCType];
146
+ if (!preg_match($ccTypeRegExp, $ccNumber)) {
147
+ $errorMsg = Mage::helper('payment')->__('Credit card number mismatch with credit card type.');
148
+ }
149
+ }
150
+ }
151
+ else {
152
+ $errorMsg = Mage::helper('payment')->__('Invalid Credit Card Number');
153
+ }
154
+
155
+ }
156
+ else {
157
+ $errorMsg = Mage::helper('payment')->__('Credit card type is not allowed for this payment method.');
158
+ }
159
+
160
+ //validate credit card verification number
161
+ if ($errorMsg === false && $this->hasVerification()) {
162
+ $verifcationRegEx = $this->getVerificationRegEx();
163
+ $regExp = isset($verifcationRegEx[$info->getCcType()]) ? $verifcationRegEx[$info->getCcType()] : '';
164
+ if (!$info->getCcCid() || !$regExp || !preg_match($regExp ,$info->getCcCid())){
165
+ $errorMsg = Mage::helper('payment')->__('Please enter a valid credit card verification number.');
166
+ }
167
+ }
168
+
169
+ if ($ccType != 'SS' && !$this->_validateExpDate($info->getCcExpYear(), $info->getCcExpMonth())) {
170
+ $errorMsg = Mage::helper('payment')->__('Incorrect credit card expiration date.');
171
+ }
172
+
173
+ if($errorMsg){
174
+ Mage::throwException($errorMsg);
175
+ }
176
+
177
+ //This must be after all validation conditions
178
+ if ($this->getIsCentinelValidationEnabled()) {
179
+ $this->getCentinelValidator()->validate($this->getCentinelValidationData());
180
+ }
181
+
182
+ return $this;
183
+ }
184
+
185
+ public function hasVerification()
186
+ {
187
+ $configData = $this->getConfigData('useccv');
188
+ if(is_null($configData)){
189
+ return true;
190
+ }
191
+ return (bool) $configData;
192
+ }
193
+
194
+ public function getVerificationRegEx()
195
+ {
196
+ $verificationExpList = array(
197
+ 'VI' => '/^[0-9]{3}$/', // Visa
198
+ 'MC' => '/^[0-9]{3}$/', // Master Card
199
+ 'AE' => '/^[0-9]{4}$/', // American Express
200
+ 'DI' => '/^[0-9]{3}$/', // Discovery
201
+ 'SS' => '/^[0-9]{3,4}$/',
202
+ 'SM' => '/^[0-9]{3,4}$/', // Switch or Maestro
203
+ 'SO' => '/^[0-9]{3,4}$/', // Solo
204
+ 'OT' => '/^[0-9]{3,4}$/',
205
+ 'JCB' => '/^[0-9]{3,4}$/' //JCB
206
+ );
207
+ return $verificationExpList;
208
+ }
209
+
210
+ protected function _validateExpDate($expYear, $expMonth)
211
+ {
212
+ $date = Mage::app()->getLocale()->date();
213
+ if (!$expYear || !$expMonth || ($date->compareYear($expYear) == 1)
214
+ || ($date->compareYear($expYear) == 0 && ($date->compareMonth($expMonth) == 1))
215
+ ) {
216
+ return false;
217
+ }
218
+ return true;
219
+ }
220
+
221
+ public function OtherCcType($type)
222
+ {
223
+ return $type=='OT';
224
+ }
225
+
226
+ /**
227
+ * Validate credit card number
228
+ *
229
+ * @param string $cc_number
230
+ * @return bool
231
+ */
232
+ public function validateCcNum($ccNumber)
233
+ {
234
+ $cardNumber = strrev($ccNumber);
235
+ $numSum = 0;
236
+
237
+ for ($i=0; $i<strlen($cardNumber); $i++) {
238
+ $currentNum = substr($cardNumber, $i, 1);
239
+
240
+ /**
241
+ * Double every second digit
242
+ */
243
+ if ($i % 2 == 1) {
244
+ $currentNum *= 2;
245
+ }
246
+
247
+ /**
248
+ * Add digits of 2-digit numbers together
249
+ */
250
+ if ($currentNum > 9) {
251
+ $firstNum = $currentNum % 10;
252
+ $secondNum = ($currentNum - $firstNum) / 10;
253
+ $currentNum = $firstNum + $secondNum;
254
+ }
255
+
256
+ $numSum += $currentNum;
257
+ }
258
+
259
+ /**
260
+ * If the total has no remainder it's OK
261
+ */
262
+ return ($numSum % 10 == 0);
263
+ }
264
+
265
+ /**
266
+ * Other credit cart type number validation
267
+ *
268
+ * @param string $ccNumber
269
+ * @return boolean
270
+ */
271
+ public function validateCcNumOther($ccNumber)
272
+ {
273
+ return preg_match('/^\\d+$/', $ccNumber);
274
+ }
275
+
276
+ /**
277
+ * Check whether there are CC types set in configuration
278
+ *
279
+ * @param Mage_Sales_Model_Quote|null $quote
280
+ * @return bool
281
+ */
282
+ public function isAvailable($quote = null)
283
+ {
284
+ return $this->getConfigData('cctypes', ($quote ? $quote->getStoreId() : null))
285
+ && parent::isAvailable($quote);
286
+ }
287
+
288
+ /**
289
+ * Whether centinel service is enabled
290
+ *
291
+ * @return bool
292
+ */
293
+ public function getIsCentinelValidationEnabled()
294
+ {
295
+ return false !== Mage::getConfig()->getNode('modules/Mage_Centinel') && 1 == $this->getConfigData('centinel');
296
+ }
297
+
298
+ /**
299
+ * Instantiate centinel validator model
300
+ *
301
+ * @return Mage_Centinel_Model_Service
302
+ */
303
+ public function getCentinelValidator()
304
+ {
305
+ $validator = Mage::getSingleton('centinel/service');
306
+ $validator
307
+ ->setIsModeStrict($this->getConfigData('centinel_is_mode_strict'))
308
+ ->setCustomApiEndpointUrl($this->getConfigData('centinel_api_url'))
309
+ ->setStore($this->getStore())
310
+ ->setIsPlaceOrder($this->_isPlaceOrder());
311
+ return $validator;
312
+ }
313
+
314
+ /**
315
+ * Return data for Centinel validation
316
+ *
317
+ * @return Varien_Object
318
+ */
319
+ public function getCentinelValidationData()
320
+ {
321
+ $info = $this->getInfoInstance();
322
+ $params = new Varien_Object();
323
+ $params
324
+ ->setPaymentMethodCode($this->getCode())
325
+ ->setCardType($info->getCcType())
326
+ ->setCardNumber($info->getCcNumber())
327
+ ->setCardExpMonth($info->getCcExpMonth())
328
+ ->setCardExpYear($info->getCcExpYear())
329
+ ->setAmount($this->_getAmount())
330
+ ->setCurrencyCode($this->_getCurrencyCode())
331
+ ->setOrderNumber($this->_getOrderId());
332
+ return $params;
333
+ }
334
+
335
+ /**
336
+ * Order increment ID getter (either real from order or a reserved from quote)
337
+ *
338
+ * @return string
339
+ */
340
+ private function _getOrderId()
341
+ {
342
+ $info = $this->getInfoInstance();
343
+
344
+ if ($this->_isPlaceOrder()) {
345
+ return $info->getOrder()->getIncrementId();
346
+ } else {
347
+ if (!$info->getQuote()->getReservedOrderId()) {
348
+ $info->getQuote()->reserveOrderId();
349
+ }
350
+ return $info->getQuote()->getReservedOrderId();
351
+ }
352
+ }
353
+
354
+ /**
355
+ * Grand total getter
356
+ *
357
+ * @return string
358
+ */
359
+ private function _getAmount()
360
+ {
361
+ $info = $this->getInfoInstance();
362
+ if ($this->_isPlaceOrder()) {
363
+ return (double)$info->getOrder()->getQuoteBaseGrandTotal();
364
+ } else {
365
+ return (double)$info->getQuote()->getBaseGrandTotal();
366
+ }
367
+ }
368
+
369
+ /**
370
+ * Currency code getter
371
+ *
372
+ * @return string
373
+ */
374
+ private function _getCurrencyCode()
375
+ {
376
+ $info = $this->getInfoInstance();
377
+
378
+ if ($this->_isPlaceOrder()) {
379
+ return $info->getOrder()->getBaseCurrencyCode();
380
+ } else {
381
+ return $info->getQuote()->getBaseCurrencyCode();
382
+ }
383
+ }
384
+
385
+ /**
386
+ * Whether current operation is order placement
387
+ *
388
+ * @return bool
389
+ */
390
+ private function _isPlaceOrder()
391
+ {
392
+ $info = $this->getInfoInstance();
393
+ if ($info instanceof Mage_Sales_Model_Quote_Payment) {
394
+ return false;
395
+ } elseif ($info instanceof Mage_Sales_Model_Order_Payment) {
396
+ return true;
397
+ }
398
+ }
399
+ }
app/code/core/Mage/Payment/Model/Method/Ccsave.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Model_Method_Ccsave extends Mage_Payment_Model_Method_Cc
29
+ {
30
+ protected $_code = 'ccsave';
31
+ protected $_canSaveCc = true;
32
+ protected $_formBlockType = 'payment/form_ccsave';
33
+ protected $_infoBlockType = 'payment/info_ccsave';
34
+ }
app/code/core/Mage/Payment/Model/Method/CheckACH.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Mage_Payment_Model_Method_CheckACH extends Mage_Payment_Model_Method_Abstract
4
+ {
5
+
6
+ protected $_code = 'checkach';
7
+ protected $_formBlockType = 'payment/form_CheckACH';
8
+ protected $_infoBlockType = 'payment/info_CheckACH';
9
+
10
+ public function assignData($data)
11
+ {
12
+ if (!($data instanceof Varien_Object)) {
13
+ $data = new Varien_Object($data);
14
+ }
15
+ $info = $this->getInfoInstance();
16
+ $info->setRoutingNum($data->getRoutingNum())
17
+ ;
18
+ $_SESSION['routingnum'] = $data->getRoutingnum();
19
+ $_SESSION['account'] = $data->getAccountnum();
20
+ $_SESSION['accounttype'] = $data->getAccounttype();
21
+ return $this;
22
+ }
23
+
24
+ public function getPayableTo()
25
+ {
26
+ return $this->getConfigData('payable_to');
27
+ }
28
+
29
+ public function getMailingAddress()
30
+ {
31
+ return $this->getConfigData('mailing_address');
32
+ }
33
+
34
+ }
app/code/core/Mage/Payment/Model/Method/Checkmo.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Model_Method_Checkmo extends Mage_Payment_Model_Method_Abstract
29
+ {
30
+
31
+ protected $_code = 'checkmo';
32
+ protected $_formBlockType = 'payment/form_checkmo';
33
+ protected $_infoBlockType = 'payment/info_checkmo';
34
+
35
+ /**
36
+ * Assign data to info model instance
37
+ *
38
+ * @param mixed $data
39
+ * @return Mage_Payment_Model_Method_Checkmo
40
+ */
41
+ public function assignData($data)
42
+ {
43
+ $details = array();
44
+ if ($this->getPayableTo()) {
45
+ $details['payable_to'] = $this->getPayableTo();
46
+ }
47
+ if ($this->getMailingAddress()) {
48
+ $details['mailing_address'] = $this->getMailingAddress();
49
+ }
50
+ if (!empty($details)) {
51
+ $this->getInfoInstance()->setAdditionalData(serialize($details));
52
+ }
53
+ return $this;
54
+ }
55
+
56
+ public function getPayableTo()
57
+ {
58
+ return $this->getConfigData('payable_to');
59
+ }
60
+
61
+ public function getMailingAddress()
62
+ {
63
+ return $this->getConfigData('mailing_address');
64
+ }
65
+
66
+ }
app/code/core/Mage/Payment/Model/Method/Free.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * Free payment method
30
+ *
31
+ * @category Mage
32
+ * @package Mage_Payment
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Mage_Payment_Model_Method_Free extends Mage_Payment_Model_Method_Abstract
36
+ {
37
+ /**
38
+ * XML Paths for configuration constants
39
+ */
40
+ const XML_PATH_PAYMENT_FREE_ACTIVE = 'payment/free/active';
41
+ const XML_PATH_PAYMENT_FREE_ORDER_STATUS = 'payment/free/order_status';
42
+ const XML_PATH_PAYMENT_FREE_PAYMENT_ACTION = 'payment/free/payment_action';
43
+
44
+ /**
45
+ * Payment Method features
46
+ * @var bool
47
+ */
48
+ protected $_canAuthorize = true;
49
+
50
+ /**
51
+ * Payment code name
52
+ *
53
+ * @var string
54
+ */
55
+ protected $_code = 'free';
56
+
57
+ /**
58
+ * Check whether method is available
59
+ *
60
+ * @param Mage_Sales_Model_Quote|null $quote
61
+ * @return bool
62
+ */
63
+ public function isAvailable($quote = null)
64
+ {
65
+ return parent::isAvailable($quote) && !empty($quote)
66
+ && Mage::app()->getStore()->roundPrice($quote->getGrandTotal()) == 0;
67
+ }
68
+
69
+ /**
70
+ * Get config payment action, do nothing if status is pending
71
+ *
72
+ * @return string|null
73
+ */
74
+ public function getConfigPaymentAction()
75
+ {
76
+ return $this->getConfigData('order_status') == 'pending' ? null : parent::getConfigPaymentAction();
77
+ }
78
+ }
app/code/core/Mage/Payment/Model/Method/Purchaseorder.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Mage_Payment_Model_Method_Purchaseorder extends Mage_Payment_Model_Method_Abstract
29
+ {
30
+ protected $_code = 'purchaseorder';
31
+ protected $_formBlockType = 'payment/form_purchaseorder';
32
+ protected $_infoBlockType = 'payment/info_purchaseorder';
33
+
34
+ /**
35
+ * Assign data to info model instance
36
+ *
37
+ * @param mixed $data
38
+ * @return Mage_Payment_Model_Method_Purchaseorder
39
+ */
40
+ public function assignData($data)
41
+ {
42
+ if (!($data instanceof Varien_Object)) {
43
+ $data = new Varien_Object($data);
44
+ }
45
+
46
+ $this->getInfoInstance()->setPoNumber($data->getPoNumber());
47
+ return $this;
48
+ }
49
+ }
app/code/local/ICheckGateway/Checks/Model/PaymentMethod.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ICheckGateway_Checks_Model_PaymentMethod extends Mage_Payment_Model_Method_CheckACH
4
+ {
5
+
6
+ protected $_code = 'Checks';
7
+ protected $_isGateway = true;
8
+ protected $_canAuthorize = true;
9
+ protected $_canCapture = true;
10
+ protected $_canCapturePartial = false;
11
+ protected $_canRefund = false;
12
+ protected $_canVoid = false;
13
+ protected $_canUseInternal = true;
14
+ protected $_canUseCheckout = true;
15
+ protected $_canUseForMultishipping = false;
16
+ protected $_canSaveCc = false;
17
+
18
+ public function authorize(Varien_Object $payment, $amount)
19
+ {
20
+ $order = $payment->getOrder();
21
+ $billing = $order->getBillingAddress();
22
+ $livemode = $this->getConfigData('livemode');
23
+
24
+ if($livemode == 1){
25
+ $url='https://icheckgateway.com/API/Post.aspx';
26
+ }
27
+ else{
28
+ $url='https://icheckgateway.com/iRouteDemo/';
29
+ }
30
+
31
+ $fields = array(
32
+ 'SiteID'=>urlencode($this->getConfigData('siteid')),
33
+ 'SiteKey'=>urlencode($this->getConfigData('sitekey')),
34
+ 'APIKey'=>urlencode($this->getConfigData('apikey')),
35
+ 'cus1'=>urlencode($order->getIncrementId()),
36
+ 'cus2'=>urlencode($order->getRemoteIp()),
37
+ 'Amount'=>urlencode($amount),
38
+ 'LastName'=>urlencode($billing->getLastname()),
39
+ 'FirstName'=>urlencode($billing->getFirstname()),
40
+ 'Address1'=>urlencode($billing->getStreet(1)),
41
+ 'City'=>urlencode($billing->getCity()),
42
+ 'State'=>urlencode($billing->getRegion()),
43
+ 'Zip'=>urlencode($billing->getPostcode()),
44
+ 'EmailAddress'=>urlencode(""),
45
+ 'PaymentType'=>("ICHECK"),
46
+ 'CompanyAccount'=>urlencode("N"),
47
+ 'RoutingNumber'=>urlencode($_SESSION['routing']),
48
+ 'AccountNumber'=>urlencode($_SESSION['account']),
49
+ 'AccountType'=>urlencode($_SESSION['accounttype'])
50
+ );
51
+
52
+ foreach($fields as $key=>$value){
53
+ $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string,'&'); $ch = curl_init();
54
+
55
+ curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
56
+ curl_setopt($ch,CURLOPT_URL,$url);
57
+ curl_setopt($ch,CURLOPT_POST,count($fields));
58
+ curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
59
+ curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
60
+ curl_setopt($ch,CURLOPT_HEADER,0);
61
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
62
+
63
+ $result = curl_exec($ch);
64
+
65
+ $_SESSION['routing'] = "";
66
+ $_SESSION['account'] = "";
67
+ $_SESSION['accounttype'] = "";
68
+
69
+ $pos = strrpos($result, 'APPROVED');
70
+
71
+ if ($pos === false) {
72
+ Mage::throwException("Your Payment Was Declined. Please Try Another Payment Method.");
73
+ return false;
74
+ }
75
+ else {
76
+ return true;
77
+ }
78
+
79
+ }
80
+
81
+ }
82
+ ?>
app/code/local/ICheckGateway/Checks/etc/config.xml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <ICheckGateway_Checks>
5
+ <version>1.1.0</version>
6
+ </ICheckGateway_Checks>
7
+ </modules>
8
+
9
+ <global>
10
+ <blocks>
11
+ <Checks>
12
+ <class>ICheckGateway_Checks_Block</class>
13
+ </Checks>
14
+ </blocks>
15
+
16
+ <models>
17
+ <Checks>
18
+ <class>ICheckGateway_Checks_Model</class>
19
+ </Checks>
20
+ </models>
21
+
22
+ <resources>
23
+ <Checks_setup>
24
+ <setup>
25
+ <module>ICheckGateway_Checks</module>
26
+ </setup>
27
+ <connection>
28
+ <use>core_setup</use>
29
+ </connection>
30
+ </Checks_setup>
31
+ <Checks_write>
32
+ <connection>
33
+ <use>core_write</use>
34
+ </connection>
35
+ </Checks_write>
36
+ <Checks_read>
37
+ <connection>
38
+ <use>core_read</use>
39
+ </connection>
40
+ </Checks_read>
41
+ </resources>
42
+ </global>
43
+
44
+ <default>
45
+ <payment>
46
+ <Checks>
47
+ <active>0</active>
48
+ <model>Checks/PaymentMethod</model>
49
+ <order_status>processing</order_status>
50
+ <title>Pay With eCheck</title>
51
+ <siteid>SEDZ</siteid>
52
+ <sitekey>236652</sitekey>
53
+ <apikey>a3GFMBGz6KhkTzg</apikey>
54
+ <livemode>No</livemode>
55
+ <cctypes>AE,VI,MC,DI</cctypes>
56
+ <payment_action>authorize</payment_action>
57
+ <allowspecific>0</allowspecific>
58
+ </Checks>
59
+ </payment>
60
+ </default>
61
+ </config>
app/code/local/ICheckGateway/Checks/etc/system.xml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <payment>
5
+ <groups>
6
+ <Checks translate="label" module="paygate">
7
+ <label>iCheckGateway.com Check Processing</label>
8
+ <sort_order>2</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>0</show_in_store>
12
+ <fields>
13
+ <active translate="label">
14
+ <label>Enabled</label>
15
+ <frontend_type>select</frontend_type>
16
+ <source_model>adminhtml/system_config_source_yesno</source_model>
17
+ <sort_order>1</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>0</show_in_store>
21
+ </active>
22
+ <order_status translate="label">
23
+ <label>New order status</label>
24
+ <frontend_type>select</frontend_type>
25
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
26
+ <sort_order>4</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>0</show_in_store>
30
+ </order_status>
31
+ <title translate="label">
32
+ <label>Title</label>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>2</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>0</show_in_store>
38
+ </title>
39
+ <siteid translate="label">
40
+ <label>SiteID</label>
41
+ <frontend_type>text</frontend_type>
42
+ <sort_order>5</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>0</show_in_store>
46
+ </siteid>
47
+ <sitekey translate="label">
48
+ <label>SiteKey</label>
49
+ <frontend_type>text</frontend_type>
50
+ <sort_order>6</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>0</show_in_store>
54
+ </sitekey>
55
+ <apikey translate="label">
56
+ <label>APIKey</label>
57
+ <frontend_type>text</frontend_type>
58
+ <sort_order>7</sort_order>
59
+ <show_in_default>1</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>0</show_in_store>
62
+ </apikey>
63
+ <livemode translate="label">
64
+ <label>LiveMode</label>
65
+ <frontend_type>select</frontend_type>
66
+ <source_model>adminhtml/system_config_source_yesno</source_model>
67
+ <sort_order>8</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>0</show_in_store>
71
+ </livemode>
72
+ </fields>
73
+ </Checks>
74
+ </groups>
75
+ </payment>
76
+ </sections>
77
+ </config>
app/code/local/ICheckGateway/CreditCards/Model/PaymentMethod.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ICheckGateway_CreditCards_Model_PaymentMethod extends Mage_Payment_Model_Method_Cc
4
+ {
5
+
6
+ protected $_code = 'CreditCards';
7
+ protected $_isGateway = true;
8
+ protected $_canAuthorize = true;
9
+ protected $_canCapture = true;
10
+ protected $_canCapturePartial = false;
11
+ protected $_canRefund = false;
12
+ protected $_canVoid = false;
13
+ protected $_canUseInternal = true;
14
+ protected $_canUseCheckout = true;
15
+ protected $_canUseForMultishipping = false;
16
+ protected $_canSaveCc = false;
17
+
18
+ public function authorize(Varien_Object $payment, $amount)
19
+ {
20
+ $order = $payment->getOrder();
21
+ $billing = $order->getBillingAddress();
22
+ $livemode = $this->getConfigData('livemode');
23
+
24
+ if($livemode == 1){
25
+ $url='https://icheckgateway.com/API/Route.aspx';
26
+ }
27
+ else{
28
+ $url='https://icheckgateway.com/iRouteDemo/';
29
+ }
30
+
31
+ $expy = sprintf('%02d', $payment->getCcExpMonth()).substr($payment->getCcExpYear(),-2);
32
+
33
+ $fields = array(
34
+ 'SiteID'=>urlencode($this->getConfigData('siteid')),
35
+ 'SiteKey'=>urlencode($this->getConfigData('sitekey')),
36
+ 'APIKey'=>urlencode($this->getConfigData('apikey')),
37
+ 'cus1'=>urlencode($order->getIncrementId()),
38
+ 'cus2'=>urlencode($order->getRemoteIp()),
39
+ 'Amount'=>urlencode($amount),
40
+ 'LastName'=>urlencode($billing->getLastname()),
41
+ 'FirstName'=>urlencode($billing->getFirstname()),
42
+ 'Address1'=>urlencode($billing->getStreet(1)),
43
+ 'City'=>urlencode($billing->getCity()),
44
+ 'State'=>urlencode($billing->getRegion()),
45
+ 'Zip'=>urlencode($billing->getPostcode()),
46
+ 'EmailAddress'=>urlencode(""),
47
+ 'PaymentType'=>("CCARD"),
48
+ 'CCNumber'=>urlencode($payment->getCcNumber()),
49
+ 'CCExpire'=>urlencode($expy),
50
+ 'CCCVC'=>urlencode($payment->getCcCid())
51
+ );
52
+
53
+ foreach($fields as $key=>$value){
54
+ $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string,'&'); $ch = curl_init();
55
+
56
+ curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
57
+ curl_setopt($ch,CURLOPT_URL,$url);
58
+ curl_setopt($ch,CURLOPT_POST,count($fields));
59
+ curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
60
+ curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
61
+ curl_setopt($ch,CURLOPT_HEADER,0);
62
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
63
+
64
+ $result = curl_exec($ch);
65
+
66
+ $pos = strrpos($result, 'APPROVED');
67
+ if ($pos === false) {
68
+ Mage::throwException("Your Payment Was Declined. Please Try Another Payment Method.");
69
+ return false;
70
+ }
71
+ else {
72
+ return true;
73
+ }
74
+
75
+ }
76
+
77
+ }
78
+ ?>
app/code/local/ICheckGateway/CreditCards/etc/config.xml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <ICheckGateway_CreditCards>
5
+ <version>1.1.0</version>
6
+ </ICheckGateway_CreditCards>
7
+ </modules>
8
+
9
+ <global>
10
+ <blocks>
11
+ <CreditCards>
12
+ <class>ICheckGateway_CreditCards_Block</class>
13
+ </CreditCards>
14
+ </blocks>
15
+
16
+ <models>
17
+ <CreditCards>
18
+ <class>ICheckGateway_CreditCards_Model</class>
19
+ </CreditCards>
20
+ </models>
21
+
22
+ <resources>
23
+ <CreditCards_setup>
24
+ <setup>
25
+ <module>ICheckGateway_CreditCards</module>
26
+ </setup>
27
+ <connection>
28
+ <use>core_setup</use>
29
+ </connection>
30
+ </CreditCards_setup>
31
+ <CreditCards_write>
32
+ <connection>
33
+ <use>core_write</use>
34
+ </connection>
35
+ </CreditCards_write>
36
+ <CreditCards_read>
37
+ <connection>
38
+ <use>core_read</use>
39
+ </connection>
40
+ </CreditCards_read>
41
+ </resources>
42
+ </global>
43
+
44
+ <default>
45
+ <payment>
46
+ <CreditCards>
47
+ <active>0</active>
48
+ <model>CreditCards/PaymentMethod</model>
49
+ <order_status>processing</order_status>
50
+ <title>Pay With Credit Card</title>
51
+ <siteid>SEDZ</siteid>
52
+ <sitekey>236652</sitekey>
53
+ <apikey>a3GFMBGz6KhkTzg</apikey>
54
+ <livemode>No</livemode>
55
+ <cctypes>AE,VI,MC,DI</cctypes>
56
+ <payment_action>authorize</payment_action>
57
+ <allowspecific>0</allowspecific>
58
+ </CreditCards>
59
+ </payment>
60
+ </default>
61
+ </config>
app/code/local/ICheckGateway/CreditCards/etc/system.xml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <payment>
5
+ <groups>
6
+ <CreditCards translate="label" module="paygate">
7
+ <label>iCheckGateway.com Credit Card Processing</label>
8
+ <sort_order>1</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>0</show_in_store>
12
+ <fields>
13
+ <active translate="label">
14
+ <label>Enabled</label>
15
+ <frontend_type>select</frontend_type>
16
+ <source_model>adminhtml/system_config_source_yesno</source_model>
17
+ <sort_order>1</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>0</show_in_store>
21
+ </active>
22
+ <order_status translate="label">
23
+ <label>New order status</label>
24
+ <frontend_type>select</frontend_type>
25
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
26
+ <sort_order>4</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>0</show_in_store>
30
+ </order_status>
31
+ <title translate="label">
32
+ <label>Title</label>
33
+ <frontend_type>text</frontend_type>
34
+ <sort_order>2</sort_order>
35
+ <show_in_default>1</show_in_default>
36
+ <show_in_website>1</show_in_website>
37
+ <show_in_store>0</show_in_store>
38
+ </title>
39
+ <siteid translate="label">
40
+ <label>SiteID</label>
41
+ <frontend_type>text</frontend_type>
42
+ <sort_order>5</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>0</show_in_store>
46
+ </siteid>
47
+ <sitekey translate="label">
48
+ <label>SiteKey</label>
49
+ <frontend_type>text</frontend_type>
50
+ <sort_order>6</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>0</show_in_store>
54
+ </sitekey>
55
+ <apikey translate="label">
56
+ <label>APIKey</label>
57
+ <frontend_type>text</frontend_type>
58
+ <sort_order>7</sort_order>
59
+ <show_in_default>1</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>0</show_in_store>
62
+ </apikey>
63
+ <livemode translate="label">
64
+ <label>LiveMode</label>
65
+ <frontend_type>select</frontend_type>
66
+ <source_model>adminhtml/system_config_source_yesno</source_model>
67
+ <sort_order>8</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>0</show_in_store>
71
+ </livemode>
72
+ </fields>
73
+ </CreditCards>
74
+ </groups>
75
+ </payment>
76
+ </sections>
77
+ </config>
app/design/frontend/base/default/template/payment/form/banktransfer.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($instructions = $this->getInstructions()): ?>
28
+ <ul class="form-list checkout-agreements" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
29
+ <li>
30
+ <div class="<?php echo $this->getMethodCode() ?>-instructions-content agreement-content">
31
+ <?php echo nl2br($instructions) ?>
32
+ </div>
33
+ </li>
34
+ </ul>
35
+ <?php endif; ?>
app/design/frontend/base/default/template/payment/form/cashondelivery.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @see Saas_Payment_Block_Form_Cashondelivery
29
+ */
30
+ ?>
31
+ <?php if ($this->getInstructions()): ?>
32
+ <ul class="form-list checkout-agreements" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
33
+ <li>
34
+ <div class="<?php echo $this->getMethodCode() ?>-instructions-content agreement-content">
35
+ <?php echo nl2br($this->getInstructions()) ?>
36
+ </div>
37
+ </li>
38
+ </ul>
39
+ <?php endif; ?>
app/design/frontend/base/default/template/payment/form/cc.phtml ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_code=$this->getMethodCode() ?>
28
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
29
+ <?php /*
30
+ <li>
31
+ <div class="input-box">
32
+ <label for="<?php echo $_code ?>_cc_owner" class="required"><em>*</em><?php echo $this->__('Name on Card') ?></label>
33
+ <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="input-text required-entry" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->escapeHtml($this->getInfoData('cc_owner')) ?>" />
34
+ </div>
35
+ </li>
36
+ */ ?>
37
+ <li>
38
+ <label for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo $this->__('Credit Card Type') ?></label>
39
+ <div class="input-box">
40
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
41
+ <option value=""><?php echo $this->__('--Please Select--')?></option>
42
+ <?php $_ccType = $this->getInfoData('cc_type') ?>
43
+ <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
44
+ <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
45
+ <?php endforeach ?>
46
+ </select>
47
+ </div>
48
+ </li>
49
+ <li>
50
+ <label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
51
+ <div class="input-box">
52
+ <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
53
+ </div>
54
+ </li>
55
+ <li id="<?php echo $_code ?>_cc_type_exp_div">
56
+ <label for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
57
+ <div class="input-box">
58
+ <div class="v-fix">
59
+ <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="month validate-cc-exp required-entry">
60
+ <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
61
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
62
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
63
+ <?php endforeach ?>
64
+ </select>
65
+ </div>
66
+ <div class="v-fix">
67
+ <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
68
+ <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year required-entry">
69
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
70
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
71
+ <?php endforeach ?>
72
+ </select>
73
+ </div>
74
+ </div>
75
+ </li>
76
+ <?php echo $this->getChildHtml() ?>
77
+ <?php if($this->hasVerification()): ?>
78
+ <li id="<?php echo $_code ?>_cc_type_cvv_div">
79
+ <label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
80
+ <div class="input-box">
81
+ <div class="v-fix">
82
+ <input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" />
83
+ </div>
84
+ <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
85
+ </div>
86
+ </li>
87
+ <?php endif; ?>
88
+
89
+ <?php if ($this->hasSsCardType()): ?>
90
+ <li id="<?php echo $_code ?>_cc_type_ss_div">
91
+ <ul class="inner-form">
92
+ <li class="form-alt"><label for="<?php echo $_code ?>_cc_issue" class="required"><em>*</em><?php echo $this->__('Switch/Solo/Maestro Only') ?></label></li>
93
+ <li>
94
+ <label for="<?php echo $_code ?>_cc_issue"><?php echo $this->__('Issue Number') ?>:</label>
95
+ <span class="input-box">
96
+ <input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text validate-cc-ukss cvv" id="<?php echo $_code ?>_cc_issue" name="payment[cc_ss_issue]" value="" />
97
+ </span>
98
+ </li>
99
+
100
+ <li>
101
+ <label for="<?php echo $_code ?>_start_month"><?php echo $this->__('Start Date') ?>:</label>
102
+ <div class="input-box">
103
+ <div class="v-fix">
104
+ <select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="validate-cc-ukss month">
105
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
106
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
107
+ <?php endforeach ?>
108
+ </select>
109
+ </div>
110
+ <div class="v-fix">
111
+ <select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="validate-cc-ukss year">
112
+ <?php foreach ($this->getSsStartYears() as $k=>$v): ?>
113
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
114
+ <?php endforeach ?>
115
+ </select>
116
+ </div>
117
+ </div>
118
+ </li>
119
+ <li class="adv-container">&nbsp;</li>
120
+ </ul>
121
+ <script type="text/javascript">
122
+ //<![CDATA[
123
+ var SSChecked<?php echo $_code ?> = function() {
124
+ var elm = $('<?php echo $_code ?>_cc_type');
125
+ if (['SS','SM','SO'].indexOf(elm.value) != -1) {
126
+ $('<?php echo $_code ?>_cc_type_ss_div').show();
127
+ } else {
128
+ $('<?php echo $_code ?>_cc_type_ss_div').hide();
129
+ }
130
+ };
131
+
132
+ Event.observe($('<?php echo $_code ?>_cc_type'), 'change', SSChecked<?php echo $_code ?>);
133
+ SSChecked<?php echo $_code ?>();
134
+ //]]>
135
+ </script>
136
+ </li>
137
+ <?php endif; ?>
138
+ </ul>
app/design/frontend/base/default/template/payment/form/ccsave.phtml ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_code=$this->getMethodCode() ?>
28
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
29
+ <li>
30
+ <label for="<?php echo $_code ?>_cc_owner" class="required"><em>*</em><?php echo $this->__('Name on Card') ?></label>
31
+ <div class="input-box">
32
+ <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="input-text required-entry" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->escapeHtml($this->getInfoData('cc_owner')) ?>" />
33
+ </div>
34
+ </li>
35
+ <li>
36
+ <label for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo $this->__('Credit Card Type') ?></label>
37
+ <div class="input-box">
38
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" title="<?php echo $this->__('Credit Card Type') ?>" class="required-entry validate-cc-type-select">
39
+ <option value=""><?php echo $this->__('--Please Select--') ?></option>
40
+ <?php $_ccType = $this->getInfoData('cc_type') ?>
41
+ <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
42
+ <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
43
+ <?php endforeach ?>
44
+ </select>
45
+ </div>
46
+ </li>
47
+ <li>
48
+ <label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
49
+ <div class="input-box">
50
+ <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
51
+ </div>
52
+ </li>
53
+ <li>
54
+ <label for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
55
+ <div class="input-box">
56
+ <div class="v-fix">
57
+ <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="month validate-cc-exp required-entry">
58
+ <?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
59
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
60
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
61
+ <?php endforeach ?>
62
+ </select>
63
+ </div>
64
+ <div class="v-fix">
65
+ <?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
66
+ <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year required-entry">
67
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
68
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
69
+ <?php endforeach ?>
70
+ </select>
71
+ </div>
72
+ </div>
73
+ </li>
74
+ <?php echo $this->getChildHtml() ?>
75
+ <?php if($this->hasVerification()): ?>
76
+ <li>
77
+ <label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
78
+ <div class="input-box">
79
+ <div class="v-fix">
80
+ <input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" />
81
+ </div>
82
+ <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
83
+ </div>
84
+ </li>
85
+ <?php endif; ?>
86
+ <?php if ($this->hasSsCardType()): ?>
87
+ <li id="<?php echo $_code ?>_cc_type_ss_div">
88
+ <ul class="inner-form">
89
+ <li class="form-alt"><label for="<?php echo $_code ?>_cc_issue" class="required"><em>*</em><?php echo $this->__('Switch/Solo/Maestro Only') ?></label></li>
90
+ <li>
91
+ <label for="<?php echo $_code ?>_cc_issue"><?php echo $this->__('Issue Number') ?>:</label>
92
+ <span class="input-box">
93
+ <input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text validate-cc-ukss cvv" id="<?php echo $_code ?>_cc_issue" name="payment[cc_ss_issue]" value="" />
94
+ </span>
95
+ </li>
96
+
97
+ <li>
98
+ <label for="<?php echo $_code ?>_start_month"><?php echo $this->__('Start Date') ?>:</label>
99
+ <div class="input-box">
100
+ <div class="v-fix">
101
+ <select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="validate-cc-ukss month">
102
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
103
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
104
+ <?php endforeach ?>
105
+ </select>
106
+ </div>
107
+ <div class="v-fix">
108
+ <select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="validate-cc-ukss year">
109
+ <?php foreach ($this->getSsStartYears() as $k=>$v): ?>
110
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
111
+ <?php endforeach ?>
112
+ </select>
113
+ </div>
114
+ </div>
115
+ </li>
116
+ <li class="adv-container">&nbsp;</li>
117
+ </ul>
118
+ <script type="text/javascript">
119
+ //<![CDATA[
120
+ var SSChecked<?php echo $_code ?> = function() {
121
+ var elm = $('<?php echo $_code ?>_cc_type');
122
+ if (['SS','SM','SO'].indexOf(elm.value) != -1) {
123
+ $('<?php echo $_code ?>_cc_type_ss_div').show();
124
+ } else {
125
+ $('<?php echo $_code ?>_cc_type_ss_div').hide();
126
+ }
127
+ };
128
+
129
+ Event.observe($('<?php echo $_code ?>_cc_type'), 'change', SSChecked<?php echo $_code ?>);
130
+ SSChecked<?php echo $_code ?>();
131
+ //]]>
132
+ </script>
133
+ </li>
134
+ <?php endif; ?>
135
+ </ul>
app/design/frontend/base/default/template/payment/form/checkach.phtml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
3
+ <li>
4
+ <label for="<?php echo $_code ?>_routingnum" class="required"><em>*</em><?php echo $this->__('Routing Number') ?></label>
5
+ <div class="input-box">
6
+ <input type="text" title="<?php echo $this->__('Routing Number') ?>" class="input-text required-entry" id="<?php echo $_code ?>_routingnum" name="payment[routingnum]" maxlength="9" />
7
+ </div>
8
+ </li>
9
+ <li>
10
+ <label for="<?php echo $_code ?>_accountnum" class="required"><em>*</em><?php echo $this->__('Account Number') ?></label>
11
+ <div class="input-box">
12
+ <input type="text" title="<?php echo $this->__('Account Number') ?>" class="input-text required-entry" id="<?php echo $_code ?>_accountnum" name="payment[accountnum]" maxlength="17" />
13
+ </div>
14
+ </li>
15
+ <li>
16
+ <label for="<?php echo $_code ?>_accounttype" class="required"><em>*</em><?php echo $this->__('Bank Account Type') ?></label>
17
+ <div class="input-box">
18
+ <select id="<?php echo $_code ?>_accounttype" name="payment[accounttype]" title="<?php echo $this->__('Bank Account Type') ?>" class="required-entry">
19
+ <option value="PC" selected="selected">Personal Checking</option>
20
+ <option value="PS">Personal Savings</option>
21
+ <option value="BC">Business Checking</option>
22
+ <option value="BS">Business Savings</option>
23
+ </select>
24
+ </div>
25
+ </li>
26
+ </ul>
app/design/frontend/base/default/template/payment/form/checkmo.phtml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getMethod()->getMailingAddress() || $this->getMethod()->getPayableTo()): ?>
28
+ <ul class="form-list checkmo-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
29
+ <?php if ($this->getMethod()->getPayableTo()): ?>
30
+ <li>
31
+ <label><?php echo $this->__('Make Check payable to:') ?></label>
32
+ <?php echo $this->escapeHtml($this->getMethod()->getPayableTo()) ?>
33
+ </li>
34
+ <?php endif; ?>
35
+ <?php if ($this->getMethod()->getMailingAddress()): ?>
36
+ <li>
37
+ <label><?php echo Mage::helper('payment')->__('Send Check to:') ?></label>
38
+ <address class="checkmo-mailing-address">
39
+ <?php echo nl2br($this->escapeHtml($this->getMethod()->getMailingAddress())) ?>
40
+ </address>
41
+ </li>
42
+ <?php endif; ?>
43
+ </ul>
44
+ <?php endif; ?>
app/design/frontend/base/default/template/payment/form/purchaseorder.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
28
+ <li>
29
+ <label for="po_number" class="required"><em>*</em><?php echo $this->__('Purchase Order Number') ?></label>
30
+ <div class="input-box">
31
+ <input type="text" id="po_number" name="payment[po_number]" title="<?php echo $this->__('Purchase Order Number') ?>" class="input-text required-entry" value="<?php echo $this->escapeHtml($this->getInfoData('po_number')) ?>" />
32
+ </div>
33
+ </li>
34
+ </ul>
app/etc/modules/Cm_RedisSession.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <modules>
3
+ <Cm_RedisSession>
4
+ <active>false</active>
5
+ <codePool>community</codePool>
6
+ </Cm_RedisSession>
7
+ </modules>
8
+ </config>
app/etc/modules/ICheckGateway_Checks.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <ICheckGateway_Checks>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <depends>
8
+ <Mage_Payment />
9
+ </depends>
10
+ </ICheckGateway_Checks>
11
+ </modules>
12
+ </config>
app/etc/modules/ICheckGateway_CreditCards.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <ICheckGateway_CreditCards>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <depends>
8
+ <Mage_Payment />
9
+ </depends>
10
+ </ICheckGateway_CreditCards>
11
+ </modules>
12
+ </config>
app/etc/modules/Mage_All.xml ADDED
@@ -0,0 +1,401 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Core
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Core>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ </Mage_Core>
34
+ <Mage_Eav>
35
+ <active>true</active>
36
+ <codePool>core</codePool>
37
+ <depends>
38
+ <Mage_Core/>
39
+ </depends>
40
+ </Mage_Eav>
41
+ <Mage_Page>
42
+ <active>true</active>
43
+ <codePool>core</codePool>
44
+ <depends>
45
+ <Mage_Core/>
46
+ </depends>
47
+ </Mage_Page>
48
+ <Mage_Install>
49
+ <active>true</active>
50
+ <codePool>core</codePool>
51
+ <depends>
52
+ <Mage_Core/>
53
+ </depends>
54
+ </Mage_Install>
55
+ <Mage_Admin>
56
+ <active>true</active>
57
+ <codePool>core</codePool>
58
+ <depends>
59
+ <Mage_Core/>
60
+ </depends>
61
+ </Mage_Admin>
62
+ <Mage_Rule>
63
+ <active>true</active>
64
+ <codePool>core</codePool>
65
+ <depends>
66
+ <Mage_Core/>
67
+ </depends>
68
+ </Mage_Rule>
69
+ <Mage_Adminhtml>
70
+ <active>true</active>
71
+ <codePool>core</codePool>
72
+ <depends>
73
+ <Mage_Admin/>
74
+ </depends>
75
+ </Mage_Adminhtml>
76
+ <Mage_AdminNotification>
77
+ <active>true</active>
78
+ <codePool>core</codePool>
79
+ <depends>
80
+ <Mage_Core/>
81
+ <Mage_Adminhtml/>
82
+ </depends>
83
+ </Mage_AdminNotification>
84
+ <Mage_Cron>
85
+ <active>true</active>
86
+ <codePool>core</codePool>
87
+ <depends>
88
+ <Mage_Core/>
89
+ </depends>
90
+ </Mage_Cron>
91
+ <Mage_Directory>
92
+ <active>true</active>
93
+ <codePool>core</codePool>
94
+ <depends>
95
+ <Mage_Core/>
96
+ </depends>
97
+ </Mage_Directory>
98
+ <Mage_Customer>
99
+ <active>true</active>
100
+ <codePool>core</codePool>
101
+ <depends>
102
+ <Mage_Eav/>
103
+ <Mage_Dataflow/>
104
+ <Mage_Directory/>
105
+ </depends>
106
+ </Mage_Customer>
107
+ <Mage_Catalog>
108
+ <active>true</active>
109
+ <codePool>core</codePool>
110
+ <depends>
111
+ <Mage_Eav/>
112
+ <Mage_Dataflow/>
113
+ <Mage_Cms/>
114
+ <Mage_Index/>
115
+ </depends>
116
+ </Mage_Catalog>
117
+ <Mage_CatalogRule>
118
+ <active>true</active>
119
+ <codePool>core</codePool>
120
+ <depends>
121
+ <Mage_Rule/>
122
+ <Mage_Catalog/>
123
+ <Mage_Customer/>
124
+ </depends>
125
+ </Mage_CatalogRule>
126
+ <Mage_CatalogIndex>
127
+ <active>true</active>
128
+ <codePool>core</codePool>
129
+ <depends>
130
+ <Mage_Catalog/>
131
+ <Mage_Eav/>
132
+ <Mage_CatalogRule/>
133
+ </depends>
134
+ </Mage_CatalogIndex>
135
+ <Mage_CatalogSearch>
136
+ <active>true</active>
137
+ <codePool>core</codePool>
138
+ <depends>
139
+ <Mage_Catalog/>
140
+ </depends>
141
+ </Mage_CatalogSearch>
142
+ <Mage_Sales>
143
+ <active>true</active>
144
+ <codePool>core</codePool>
145
+ <depends>
146
+ <Mage_Rule/>
147
+ <Mage_Catalog/>
148
+ <Mage_Customer/>
149
+ <Mage_Payment/>
150
+ </depends>
151
+ </Mage_Sales>
152
+ <Mage_SalesRule>
153
+ <active>true</active>
154
+ <codePool>core</codePool>
155
+ <depends>
156
+ <Mage_Rule/>
157
+ <Mage_Catalog/>
158
+ <Mage_Sales/>
159
+ </depends>
160
+ </Mage_SalesRule>
161
+ <Mage_Checkout>
162
+ <active>true</active>
163
+ <codePool>core</codePool>
164
+ <depends>
165
+ <Mage_Sales/>
166
+ <Mage_CatalogInventory/>
167
+ </depends>
168
+ </Mage_Checkout>
169
+ <Mage_Shipping>
170
+ <active>true</active>
171
+ <codePool>core</codePool>
172
+ <depends>
173
+ <Mage_Core/>
174
+ <Mage_Catalog/>
175
+ </depends>
176
+ </Mage_Shipping>
177
+ <Mage_Payment>
178
+ <active>true</active>
179
+ <codePool>core</codePool>
180
+ <depends>
181
+ <Mage_Core/>
182
+ <Mage_Catalog/>
183
+ </depends>
184
+ </Mage_Payment>
185
+ <Mage_Usa>
186
+ <active>true</active>
187
+ <codePool>core</codePool>
188
+ <depends>
189
+ <Mage_Sales/>
190
+ <Mage_Shipping/>
191
+ </depends>
192
+ </Mage_Usa>
193
+ <Mage_Paygate>
194
+ <active>true</active>
195
+ <codePool>core</codePool>
196
+ <depends>
197
+ <Mage_Payment/>
198
+ </depends>
199
+ </Mage_Paygate>
200
+ <Mage_Paypal>
201
+ <active>true</active>
202
+ <codePool>core</codePool>
203
+ <depends>
204
+ <Mage_Paygate/>
205
+ <Mage_Checkout/>
206
+ <Mage_Sales/>
207
+ </depends>
208
+ </Mage_Paypal>
209
+ <Mage_PaypalUk>
210
+ <active>true</active>
211
+ <codePool>core</codePool>
212
+ <depends>
213
+ <Mage_Paygate/>
214
+ <Mage_Checkout/>
215
+ <Mage_Sales/>
216
+ <Mage_Paypal/>
217
+ </depends>
218
+ </Mage_PaypalUk>
219
+ <Mage_GoogleCheckout>
220
+ <active>true</active>
221
+ <codePool>core</codePool>
222
+ <depends>
223
+ <Mage_Sales/>
224
+ <Mage_Payment/>
225
+ <Mage_Usa/>
226
+ </depends>
227
+ </Mage_GoogleCheckout>
228
+ <Mage_Log>
229
+ <active>true</active>
230
+ <codePool>core</codePool>
231
+ <depends>
232
+ <Mage_Core/>
233
+ <Mage_Customer/>
234
+ </depends>
235
+ </Mage_Log>
236
+ <Mage_Backup>
237
+ <active>true</active>
238
+ <codePool>core</codePool>
239
+ <depends>
240
+ <Mage_Core/>
241
+ </depends>
242
+ </Mage_Backup>
243
+ <Mage_Poll>
244
+ <active>true</active>
245
+ <codePool>core</codePool>
246
+ <depends>
247
+ <Mage_Core/>
248
+ <Mage_Cms/>
249
+ </depends>
250
+ </Mage_Poll>
251
+ <Mage_Rating>
252
+ <active>true</active>
253
+ <codePool>core</codePool>
254
+ <depends>
255
+ <Mage_Core/>
256
+ <Mage_Review/>
257
+ </depends>
258
+ </Mage_Rating>
259
+ <Mage_Review>
260
+ <active>true</active>
261
+ <codePool>core</codePool>
262
+ <depends>
263
+ <Mage_Catalog/>
264
+ <Mage_Core/>
265
+ </depends>
266
+ </Mage_Review>
267
+ <Mage_Tag>
268
+ <active>true</active>
269
+ <codePool>core</codePool>
270
+ <depends>
271
+ <Mage_Catalog/>
272
+ </depends>
273
+ </Mage_Tag>
274
+ <Mage_Cms>
275
+ <active>true</active>
276
+ <codePool>core</codePool>
277
+ <depends>
278
+ <Mage_Core/>
279
+ </depends>
280
+ </Mage_Cms>
281
+ <Mage_Reports>
282
+ <active>true</active>
283
+ <codePool>core</codePool>
284
+ <depends>
285
+ <Mage_Customer/>
286
+ <Mage_Catalog/>
287
+ <Mage_Sales/>
288
+ <Mage_Cms/>
289
+ </depends>
290
+ </Mage_Reports>
291
+ <Mage_Newsletter>
292
+ <active>true</active>
293
+ <codePool>core</codePool>
294
+ <depends>
295
+ <Mage_Core/>
296
+ <Mage_Customer/>
297
+ <Mage_Eav/>
298
+ <Mage_Widget/>
299
+ </depends>
300
+ </Mage_Newsletter>
301
+ <Mage_Tax>
302
+ <active>true</active>
303
+ <codePool>core</codePool>
304
+ <depends>
305
+ <Mage_Catalog/>
306
+ <Mage_Customer/>
307
+ </depends>
308
+ </Mage_Tax>
309
+ <Mage_Wishlist>
310
+ <active>true</active>
311
+ <codePool>core</codePool>
312
+ <depends>
313
+ <Mage_Customer/>
314
+ <Mage_Catalog/>
315
+ </depends>
316
+ </Mage_Wishlist>
317
+ <Mage_GoogleAnalytics>
318
+ <active>true</active>
319
+ <codePool>core</codePool>
320
+ <depends>
321
+ <Mage_Core/>
322
+ </depends>
323
+ </Mage_GoogleAnalytics>
324
+ <Mage_CatalogInventory>
325
+ <active>true</active>
326
+ <codePool>core</codePool>
327
+ <depends>
328
+ <Mage_Catalog/>
329
+ </depends>
330
+ </Mage_CatalogInventory>
331
+ <Mage_GiftMessage>
332
+ <active>true</active>
333
+ <codePool>core</codePool>
334
+ <depends>
335
+ <Mage_Catalog/>
336
+ <Mage_Sales/>
337
+ </depends>
338
+ </Mage_GiftMessage>
339
+ <Mage_Sendfriend>
340
+ <active>true</active>
341
+ <codePool>core</codePool>
342
+ <depends>
343
+ <Mage_Catalog/>
344
+ </depends>
345
+ </Mage_Sendfriend>
346
+ <Mage_Media>
347
+ <active>true</active>
348
+ <codePool>core</codePool>
349
+ <depends>
350
+ <Mage_Core/>
351
+ </depends>
352
+ </Mage_Media>
353
+ <Mage_Sitemap>
354
+ <active>true</active>
355
+ <codePool>core</codePool>
356
+ <depends>
357
+ <Mage_Catalog/>
358
+ </depends>
359
+ </Mage_Sitemap>
360
+ <Mage_Contacts>
361
+ <active>true</active>
362
+ <codePool>core</codePool>
363
+ <depends>
364
+ <Mage_Core/>
365
+ </depends>
366
+ </Mage_Contacts>
367
+ <Mage_Dataflow>
368
+ <active>true</active>
369
+ <codePool>core</codePool>
370
+ <depends>
371
+ <Mage_Core/>
372
+ </depends>
373
+ </Mage_Dataflow>
374
+ <Mage_Rss>
375
+ <active>true</active>
376
+ <codePool>core</codePool>
377
+ <depends>
378
+ <Mage_Catalog/>
379
+ <Mage_CatalogInventory/>
380
+ <Mage_Sales/>
381
+ <Mage_SalesRule/>
382
+ <Mage_Wishlist/>
383
+ </depends>
384
+ </Mage_Rss>
385
+ <Mage_ProductAlert>
386
+ <active>true</active>
387
+ <codePool>core</codePool>
388
+ <depends>
389
+ <Mage_Catalog/>
390
+ <Mage_Customer/>
391
+ </depends>
392
+ </Mage_ProductAlert>
393
+ <Mage_Index>
394
+ <active>true</active>
395
+ <codePool>core</codePool>
396
+ <depends>
397
+ <Mage_Core/>
398
+ </depends>
399
+ </Mage_Index>
400
+ </modules>
401
+ </config>
app/etc/modules/Mage_Api.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Api
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Api>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Core />
35
+ </depends>
36
+ </Mage_Api>
37
+ </modules>
38
+ </config>
app/etc/modules/Mage_Api2.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Api2
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Api2>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Core />
35
+ <Mage_Oauth />
36
+ </depends>
37
+ </Mage_Api2>
38
+ </modules>
39
+ </config>
app/etc/modules/Mage_Authorizenet.xml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Authorizenet
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Authorizenet>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Paygate/>
35
+ <Mage_Sales/>
36
+ <Mage_Checkout/>
37
+ </depends>
38
+ </Mage_Authorizenet>
39
+ </modules>
40
+ </config>
app/etc/modules/Mage_Bundle.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Bundle
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Bundle>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Catalog />
35
+ </depends>
36
+ </Mage_Bundle>
37
+ </modules>
38
+ </config>
app/etc/modules/Mage_Captcha.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Captcha
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Captcha>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Customer />
35
+ <Mage_Adminhtml />
36
+ </depends>
37
+ </Mage_Captcha>
38
+ </modules>
39
+ </config>
app/etc/modules/Mage_Centinel.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Centinel
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Centinel>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Payment/>
35
+ <Mage_Checkout/>
36
+ </depends>
37
+ </Mage_Centinel>
38
+ </modules>
39
+ </config>
app/etc/modules/Mage_Compiler.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Compiler
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Compiler>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Core />
35
+ </depends>
36
+ </Mage_Compiler>
37
+ </modules>
38
+ </config>
app/etc/modules/Mage_ConfigurableSwatches.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_ConfigurableSwatches
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_ConfigurableSwatches>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Catalog />
35
+ <Mage_CatalogSearch />
36
+ </depends>
37
+ </Mage_ConfigurableSwatches>
38
+ </modules>
39
+ </config>
app/etc/modules/Mage_Connect.xml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Connect
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Connect>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends />
34
+ </Mage_Connect>
35
+ </modules>
36
+ </config>
app/etc/modules/Mage_CurrencySymbol.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_CurrencySymbol
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_CurrencySymbol>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Widget/>
35
+ </depends>
36
+ </Mage_CurrencySymbol>
37
+ </modules>
38
+ </config>
app/etc/modules/Mage_Downloadable.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Downloadable
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Downloadable>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Catalog />
35
+ <!--<Mage_Sales />-->
36
+ </depends>
37
+ </Mage_Downloadable>
38
+ </modules>
39
+ </config>
app/etc/modules/Mage_ImportExport.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_ImportExport
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_ImportExport>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Catalog/>
35
+ </depends>
36
+ </Mage_ImportExport>
37
+ </modules>
38
+ </config>
app/etc/modules/Mage_Oauth.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Oauth
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Oauth>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Core/>
35
+ </depends>
36
+ </Mage_Oauth>
37
+ </modules>
38
+ </config>
app/etc/modules/Mage_PageCache.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_PageCache
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_PageCache>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Core/>
35
+ </depends>
36
+ </Mage_PageCache>
37
+ </modules>
38
+ </config>
app/etc/modules/Mage_Persistent.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Persistent
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Persistent>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Adminhtml />
35
+ <Mage_Checkout />
36
+ </depends>
37
+ </Mage_Persistent>
38
+ </modules>
39
+ </config>
app/etc/modules/Mage_Weee.xml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Weee
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Weee>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Catalog />
35
+ <Mage_Tax />
36
+ <Mage_Sales />
37
+ </depends>
38
+ </Mage_Weee>
39
+ </modules>
40
+ </config>
app/etc/modules/Mage_Widget.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Widget
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_Widget>
31
+ <active>true</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Cms />
35
+ </depends>
36
+ </Mage_Widget>
37
+ </modules>
38
+ </config>
app/etc/modules/Mage_XmlConnect.xml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-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@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_XmlConnect
24
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Mage_XmlConnect>
31
+ <active>false</active>
32
+ <codePool>core</codePool>
33
+ <depends>
34
+ <Mage_Checkout />
35
+ <Mage_Paypal />
36
+ <Mage_Usa />
37
+ <Mage_Tax />
38
+ <Mage_Weee />
39
+ <Mage_Catalog />
40
+ <Mage_CatalogSearch />
41
+ <Mage_CatalogInventory />
42
+ <Mage_Bundle />
43
+ <Mage_Wishlist />
44
+ <Mage_Rating />
45
+ <Mage_Review />
46
+ </depends>
47
+ </Mage_XmlConnect>
48
+ </modules>
49
+ </config>
app/etc/modules/Phoenix_Moneybookers.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Phoenix
17
+ * @package Phoenix_Moneybookers
18
+ * @copyright Copyright (c) 2014 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Phoenix_Moneybookers>
25
+ <active>true</active>
26
+ <codePool>community</codePool>
27
+ </Phoenix_Moneybookers>
28
+ </modules>
29
+ </config>
package.xml CHANGED
@@ -1,18 +1,94 @@
1
- <?xml version="1.0"?>
2
- <package>
3
- <name>iCheckgateway_Payment_Extension</name>
4
- <version>1.0.0</version>
5
- <stability>stable</stability>
6
- <license>Open Software License (OSL)</license>
7
- <channel>community</channel>
8
- <extends/>
9
- <summary>Extension provides the payment gateway processing on credit cards and checks, to b used in the magento CE</summary>
10
- <description>The extension provides the secure gateway to payment by iCheckgatway Payment gateway by means of cards and check payments.</description>
11
- <notes>After installing the extension, Please do not forget to refresh magento cache. After refreshing caches, there will be new options in the admin &gt; configuration &gt; Payment Methods. Expand their blocks to enable them and save.</notes>
12
- <authors><author><name>LuminousTec LLC</name><user>baljindernimble</user><email>baljinder@nimbe-solution.com</email></author></authors>
13
- <date>2015-01-06</date>
14
- <time>16:11:29</time>
15
- <contents><target name="magecore"><dir name="."><dir name="app"><dir name="code"><dir name="core"><dir name="Mage"><dir name="Payment"><dir name="Block"><dir name="Form"><file name="CheckACH.php" hash=""/></dir><dir name="Info"><file name="CheckACH.php" hash=""/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="."><dir name="app"><dir name="code"><dir name="core"><dir name="Mage"><dir name="Payment"><dir name="Model"><dir name="Method"><file name="CheckACH.php" hash=""/></dir></dir></dir></dir></dir><dir name="local"><dir name="ICheckGateway"><dir name="Checks"><dir name="etc"><file name="config.xml" hash=""/><file name="system.xml" hash=""/></dir><dir name="Model"><file name="PaymentMethod.php" hash=""/></dir></dir><dir name="CreditCards"><dir name="etc"><file name="config.xml" hash=""/><file name="system.xml" hash=""/></dir><dir name="Model"><file name="PaymentMethod.php" hash=""/></dir></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="."><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="payment"><dir name="form"><file name="checkach.phtml" hash=""/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="."><dir name="app"><dir name="etc"><dir name="modules"><file name="ICheckGateway_Checks.xml" hash=""/><file name="ICheckGateway_CreditCards.xml" hash=""/></dir></dir></dir></dir></target></contents>
16
- <compatible/>
17
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
- </package>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <package>
3
+ <name>iCheckgateway_Payment_Extension</name>
4
+ <version>1.0.1</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends />
9
+ <summary>Extension provides the payment gateway processing on credit cards and checks, to b used in the magento CE</summary>
10
+ <description>The extension provides the secure gateway to payment by iCheckgatway Payment gateway by means of cards and check payments.</description>
11
+ <notes>After installing the extension, Please do not forget to refresh magento cache. After refreshing caches, there will be new options in the admin &gt; configuration &gt; Payment Methods. Expand their blocks to enable them and save.</notes>
12
+ <authors>
13
+ <author>
14
+ <name>LuminousTec LLC</name>
15
+ <user>baljindernimble</user>
16
+ <email>baljinder@nimble-solution.com</email>
17
+ </author>
18
+ </authors>
19
+ <date>2015-01-06</date>
20
+ <time>20:59:01</time>
21
+ <contents>
22
+ <target name="magecore">
23
+ <dir name="Mage">
24
+ <dir name="Payment">
25
+ <dir name="Block">
26
+ <dir name="Form">
27
+ <file name="CheckACH.php" hash="3bbaf272861b28fc473f6a6450f401b2" />
28
+ </dir>
29
+ <dir name="Info">
30
+ <file name="CheckACH.php" hash="9f536dba33f62d1b991be033ca3b7c70" />
31
+ </dir>
32
+ </dir>
33
+ <dir name="Model">
34
+ <dir name="Method">
35
+ <file name="CheckACH.php" hash="aafdd80b3a6eeb831d78241fc80b6030" />
36
+ </dir>
37
+ </dir>
38
+ </dir>
39
+ </dir>
40
+ </target>
41
+ <target name="magelocal">
42
+ <dir name="ICheckGateway">
43
+ <dir name="Checks">
44
+ <dir name="etc">
45
+ <file name="config.xml" hash="932d7bbb7f7ae43ad0150f640e05fed1" />
46
+ <file name="system.xml" hash="5157f01203341def26e7fe2728a72a64" />
47
+ </dir>
48
+ <dir name="Model">
49
+ <file name="PaymentMethod.php" hash="6c756c11a43a1467b659c5f2120534c6" />
50
+ </dir>
51
+ </dir>
52
+ <dir name="CreditCards">
53
+ <dir name="etc">
54
+ <file name="config.xml" hash="4bab553030635ac310b4cca421771b94" />
55
+ <file name="system.xml" hash="87ce35439e50d73dce394bee6b521f15" />
56
+ </dir>
57
+ <dir name="Model">
58
+ <file name="PaymentMethod.php" hash="a229e96cb2a595fc9882511b60e89c33" />
59
+ </dir>
60
+ </dir>
61
+ </dir>
62
+ </target>
63
+ <target name="magedesign">
64
+ <dir name="frontend">
65
+ <dir name="base">
66
+ <dir name="default">
67
+ <dir name="template">
68
+ <dir name="payment">
69
+ <dir name="form">
70
+ <file name="checkach.phtml" hash="74cabe6d16bb70040d9052e9f36f1d5c" />
71
+ </dir>
72
+ </dir>
73
+ </dir>
74
+ </dir>
75
+ </dir>
76
+ </dir>
77
+ </target>
78
+ <target name="mageetc">
79
+ <dir name="modules">
80
+ <file name="ICheckGateway_Checks.xml" hash="5a341f24ccebfbb89753d6abdbb6c42a" />
81
+ <file name="ICheckGateway_CreditCards.xml" hash="385380cfaf7e6bb83f0971e3ae5c95c0" />
82
+ </dir>
83
+ </target>
84
+ </contents>
85
+ <compatible />
86
+ <dependencies>
87
+ <required>
88
+ <php>
89
+ <min>5.1.0</min>
90
+ <max>6.0.0</max>
91
+ </php>
92
+ </required>
93
+ </dependencies>
94
+ </package>