Icepay_IceAdvanced - Version 1.2.11

Version Notes

Compatiblity with CE 1.9.2.2 and the SUPEE-6788 patch.

Download this release

Release Info

Developer ICEPAY
Extension Icepay_IceAdvanced
Version 1.2.11
Comparing to
See all releases


Code changes from version 1.2.9 to 1.2.11

Files changed (91) hide show
  1. app/code/community/Icepay/IceAdvanced/Block/Adminhtml/CheckSettings.php +35 -35
  2. app/code/community/Icepay/IceAdvanced/Block/Adminhtml/Grid/Paymentmethods.php +91 -91
  3. app/code/community/Icepay/IceAdvanced/Block/Adminhtml/Setting/Paymentmethod.php +57 -57
  4. app/code/community/Icepay/IceAdvanced/Block/Payment/Form/Default.php +57 -57
  5. app/code/community/Icepay/IceAdvanced/Helper/Data.php +236 -236
  6. app/code/community/Icepay/IceAdvanced/Model/Checkout/PaymentObject.php +235 -235
  7. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod01.php +9 -9
  8. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod02.php +9 -9
  9. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod03.php +9 -9
  10. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod04.php +9 -9
  11. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod05.php +9 -9
  12. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod06.php +9 -9
  13. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod07.php +9 -9
  14. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod08.php +9 -9
  15. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod09.php +9 -9
  16. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod10.php +9 -9
  17. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod11.php +9 -9
  18. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod12.php +9 -9
  19. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod13.php +9 -9
  20. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod14.php +9 -9
  21. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod15.php +9 -9
  22. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod16.php +9 -9
  23. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod17.php +9 -9
  24. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod18.php +9 -9
  25. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod19.php +9 -9
  26. app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod20.php +9 -9
  27. app/code/community/Icepay/IceAdvanced/Model/Checkout/Standard.php +296 -296
  28. app/code/community/Icepay/IceAdvanced/Model/Extensions/MS/Customerreward.php +24 -24
  29. app/code/community/Icepay/IceAdvanced/Model/Extensions/MW/GiftWrap.php +36 -36
  30. app/code/community/Icepay/IceAdvanced/Model/Extensions/MageWorx/MultiFees.php +42 -42
  31. app/code/community/Icepay/IceAdvanced/Model/Mysql4/IceAdvanced.php +415 -415
  32. app/code/community/Icepay/IceAdvanced/Model/Observer.php +315 -311
  33. app/code/community/Icepay/IceAdvanced/Model/Order.php +639 -639
  34. app/code/community/Icepay/IceAdvanced/Model/Pay.php +178 -178
  35. app/code/community/Icepay/IceAdvanced/Model/Paymentmethods.php +109 -109
  36. app/code/community/Icepay/IceAdvanced/Model/Webservice/Advanced.php +95 -95
  37. app/code/community/Icepay/IceAdvanced/Model/Webservice/Refund.php +52 -52
  38. app/code/community/Icepay/IceAdvanced/controllers/{AjaxController.php → Adminhtml/Iceadvanced/AjaxController.php} +74 -75
  39. app/code/community/Icepay/IceAdvanced/controllers/{ConfigController.php → Adminhtml/Iceadvanced/ConfigController.php} +42 -42
  40. app/code/community/Icepay/IceAdvanced/controllers/ProcessingController.php +39 -39
  41. app/code/community/Icepay/IceAdvanced/etc/adminhtml.xml +22 -0
  42. app/code/community/Icepay/IceAdvanced/etc/config.xml +161 -177
  43. app/code/community/Icepay/IceAdvanced/etc/system.xml +47 -47
  44. app/code/community/Icepay/IceAdvanced/sql/icepayadvanced_setup/mysql4-install-1.0.0.php +44 -44
  45. app/code/community/Icepay/IceAdvanced/sql/icepayadvanced_setup/mysql4-upgrade-1.0.0-1.0.1.php +11 -11
  46. app/code/community/Icepay/IceCore/Block/Adminhtml/CheckSettings.php +54 -54
  47. app/code/community/Icepay/IceCore/Block/Adminhtml/GenerateURL.php +37 -37
  48. app/code/community/Icepay/IceCore/Block/Adminhtml/Grid/Modules.php +49 -49
  49. app/code/community/Icepay/IceCore/Block/Adminhtml/Init.php +41 -41
  50. app/code/community/Icepay/IceCore/Block/Front/Statement.php +25 -25
  51. app/code/community/Icepay/IceCore/Block/Front/Template.php +20 -20
  52. app/code/community/Icepay/IceCore/Helper/Data.php +252 -252
  53. app/code/community/Icepay/IceCore/Model/Config.php +45 -45
  54. app/code/community/Icepay/IceCore/Model/Icepay/Postback.php +363 -363
  55. app/code/community/Icepay/IceCore/Model/Icepay/Result.php +60 -60
  56. app/code/community/Icepay/IceCore/Model/Mysql4/IceCore.php +188 -188
  57. app/code/community/Icepay/IceCore/Model/Webservice/Core.php +111 -111
  58. app/code/community/Icepay/IceCore/controllers/AboutController.php +24 -24
  59. app/code/community/Icepay/IceCore/controllers/CheckController.php +32 -32
  60. app/code/community/Icepay/IceCore/controllers/IndexController.php +24 -24
  61. app/code/community/Icepay/IceCore/controllers/ProcessingController.php +31 -31
  62. app/code/community/Icepay/IceCore/etc/config.xml +180 -180
  63. app/code/community/Icepay/IceCore/etc/system.xml +180 -180
  64. app/code/community/Icepay/IceCore/sql/icepaycore_setup/mysql4-install-1.0.0.php +48 -48
  65. app/code/community/Icepay/IceCore/sql/icepaycore_setup/mysql4-upgrade-1.0.0-1.0.1.php +10 -10
  66. app/code/community/Icepay/IceCore/sql/icepaycore_setup/mysql4-upgrade-1.0.1-1.2.10.php +8 -0
  67. app/design/adminhtml/default/default/layout/icecore.xml +14 -14
  68. app/design/adminhtml/default/default/template/icepayadvanced/form/default.phtml +52 -52
  69. app/design/adminhtml/default/default/template/icepayadvanced/grid_paymentmethods.phtml +304 -304
  70. app/design/adminhtml/default/default/template/icepayadvanced/paymentmethod.phtml +84 -84
  71. app/design/adminhtml/default/default/template/icepaycore/grid_modules.phtml +79 -79
  72. app/design/frontend/base/default/layout/icecore.xml +9 -9
  73. app/design/frontend/base/default/template/icepayadvanced/form/default.phtml +52 -52
  74. app/design/frontend/base/default/template/icepaycore/front/check.phtml +1 -0
  75. app/design/frontend/base/default/template/icepaycore/front/statement.phtml +21 -0
  76. app/etc/modules/Icepay_IceAdvanced.xml +9 -9
  77. app/etc/modules/Icepay_IceCore.xml +9 -9
  78. app/locale/de_DE/Icepay_IceAdvanced.csv +31 -31
  79. app/locale/de_DE/Icepay_IceCore.csv +61 -61
  80. app/locale/en_US/Icepay_IceAdvanced.csv +38 -38
  81. app/locale/en_US/Icepay_IceCore.csv +60 -60
  82. app/locale/es_ES/Icepay_IceAdvanced.csv +31 -31
  83. app/locale/es_ES/Icepay_IceCore.csv +61 -61
  84. app/locale/fr_FR/Icepay_IceAdvanced.csv +31 -31
  85. app/locale/fr_FR/Icepay_IceCore.csv +61 -61
  86. app/locale/it_IT/Icepay_IceAdvanced.csv +31 -31
  87. app/locale/it_IT/Icepay_IceCore.csv +61 -61
  88. app/locale/nl_NL/Icepay_IceAdvanced.csv +36 -36
  89. app/locale/nl_NL/Icepay_IceCore.csv +64 -64
  90. package.xml +5 -5
  91. skin/adminhtml/default/default/icepay/admin.css +132 -132
app/code/community/Icepay/IceAdvanced/Block/Adminhtml/CheckSettings.php CHANGED
@@ -1,36 +1,36 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Block displays settings check
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceAdvanced_Block_Adminhtml_CheckSettings extends Mage_Adminhtml_Block_System_Config_Form_Field {
18
-
19
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
20
- $html = "";
21
-
22
-
23
- foreach (Mage::helper("iceadvanced")->doChecks() as $key => $value) {
24
- $html.= 'ICEPAY.addMessage(\'' . $value['result'] . '\',\''.$value['line'].'\');';
25
- }
26
-
27
- return '<div class="icepay_debug" id="icepay_debugger"></div>
28
- <script type="text/javascript">
29
- //<![CDATA[
30
- '.$html.'
31
- //]]>
32
- </script>
33
- ';
34
- }
35
-
36
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Block displays settings check
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceAdvanced_Block_Adminhtml_CheckSettings extends Mage_Adminhtml_Block_System_Config_Form_Field {
18
+
19
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
20
+ $html = "";
21
+
22
+
23
+ foreach (Mage::helper("iceadvanced")->doChecks() as $key => $value) {
24
+ $html.= 'ICEPAY.addMessage(\'' . $value['result'] . '\',\''.$value['line'].'\');';
25
+ }
26
+
27
+ return '<div class="icepay_debug" id="icepay_debugger"></div>
28
+ <script type="text/javascript">
29
+ //<![CDATA[
30
+ '.$html.'
31
+ //]]>
32
+ </script>
33
+ ';
34
+ }
35
+
36
  }
app/code/community/Icepay/IceAdvanced/Block/Adminhtml/Grid/Paymentmethods.php CHANGED
@@ -1,92 +1,92 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Block displays paymentmethods grid
5
- * @version 1.0.1
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceAdvanced_Block_Adminhtml_Grid_PaymentMethods extends Mage_Adminhtml_Block_Widget implements Varien_Data_Form_Element_Renderer_Interface {
17
-
18
- protected $_element;
19
- protected $_scope;
20
- protected $_ajaxLoadPaymentMethodURL;
21
- protected $_ajaxSavePaymentMethodURL;
22
- protected $_ajaxGetPaymentMethodsURL;
23
- protected $debug;
24
-
25
- public function __construct()
26
- {
27
- $this->_scope = Mage::app()->getStore(Mage::helper("icecore")->getStoreFromRequest())->getId();
28
- $this->_ajaxLoadPaymentMethodURL = Mage::helper('adminhtml')->getUrl('icepayadvanced/config/index/paymentmethod/{{pm_code}}', array('_secure' => true, 'scope' => $this->_scope));
29
- $this->_ajaxSavePaymentMethodURL = Mage::helper('adminhtml')->getUrl('icepayadvanced/ajax/save_paymentmethod', array('_secure' => true, 'scope' => $this->_scope));
30
- $this->_ajaxGetPaymentMethodsURL = Mage::helper('adminhtml')->getUrl('icepayadvanced/ajax/get_paymentmethods', array('_secure' => true));
31
-
32
- $this->setTemplate('icepayadvanced/grid_paymentmethods.phtml');
33
- }
34
-
35
- public function render(Varien_Data_Form_Element_Abstract $element)
36
- {
37
- $this->setElement($element);
38
- return $this->toHtml();
39
- }
40
-
41
- public function setElement(Varien_Data_Form_Element_Abstract $element)
42
- {
43
- $this->_element = $element;
44
- return $this;
45
- }
46
-
47
- public function getElement()
48
- {
49
- return $this->_element;
50
- }
51
-
52
- public function getJS($uri)
53
- {
54
- return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS, true) . $uri;
55
- }
56
-
57
- public function getPaymentmethods()
58
- {
59
- return Mage::getSingleton('iceadvanced/mysql4_iceAdvanced')->getAdminPaymentmethodConfigForStore($this->_scope);
60
- }
61
-
62
- public function getAddButtonHtml()
63
- {
64
- return $this->getChildHtml('add_button');
65
- }
66
-
67
- protected function _prepareLayout()
68
- {
69
- $button = $this->getLayout()->createBlock('adminhtml/widget_button')
70
- ->setData(array(
71
- 'label' => Mage::helper('icecore')->__('Get paymentmethods'),
72
- 'onclick' => 'return ICEPAY.retrieveFromICEPAY()',
73
- 'class' => 'add'
74
- ));
75
- $button->setName('add_tier_price_item_button');
76
-
77
- $this->setChild('add_button', $button);
78
-
79
- if (version_compare(Mage::getVersion(), '1.7.0.0', '<')) {
80
- $this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/magento.css');
81
- } else {
82
- $this->getLayout()->getBlock('head')->addItem('skin_css', 'lib/prototype/windows/themes/magento.css');
83
- }
84
-
85
- $this->getLayout()
86
- ->getBlock('head')
87
- ->addItem('js_css', 'prototype/windows/themes/default.css');
88
-
89
- return parent::_prepareLayout();
90
- }
91
-
92
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Block displays paymentmethods grid
5
+ * @version 1.0.1
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceAdvanced_Block_Adminhtml_Grid_PaymentMethods extends Mage_Adminhtml_Block_Widget implements Varien_Data_Form_Element_Renderer_Interface {
17
+
18
+ protected $_element;
19
+ protected $_scope;
20
+ protected $_ajaxLoadPaymentMethodURL;
21
+ protected $_ajaxSavePaymentMethodURL;
22
+ protected $_ajaxGetPaymentMethodsURL;
23
+ protected $debug;
24
+
25
+ public function __construct()
26
+ {
27
+ $this->_scope = Mage::app()->getStore(Mage::helper("icecore")->getStoreFromRequest())->getId();
28
+ $this->_ajaxLoadPaymentMethodURL = Mage::helper('adminhtml')->getUrl('adminhtml/iceadvanced_config/index/paymentmethod/{{pm_code}}', array('_secure' => true, 'scope' => $this->_scope));
29
+ $this->_ajaxSavePaymentMethodURL = Mage::helper('adminhtml')->getUrl('adminhtml/iceadvanced_ajax/save_paymentmethod', array('_secure' => true, 'scope' => $this->_scope));
30
+ $this->_ajaxGetPaymentMethodsURL = Mage::helper('adminhtml')->getUrl('adminhtml/iceadvanced_ajax/get_paymentmethods', array('_secure' => true));
31
+
32
+ $this->setTemplate('icepayadvanced/grid_paymentmethods.phtml');
33
+ }
34
+
35
+ public function render(Varien_Data_Form_Element_Abstract $element)
36
+ {
37
+ $this->setElement($element);
38
+ return $this->toHtml();
39
+ }
40
+
41
+ public function setElement(Varien_Data_Form_Element_Abstract $element)
42
+ {
43
+ $this->_element = $element;
44
+ return $this;
45
+ }
46
+
47
+ public function getElement()
48
+ {
49
+ return $this->_element;
50
+ }
51
+
52
+ public function getJS($uri)
53
+ {
54
+ return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS, true) . $uri;
55
+ }
56
+
57
+ public function getPaymentmethods()
58
+ {
59
+ return Mage::getSingleton('iceadvanced/mysql4_iceAdvanced')->getAdminPaymentmethodConfigForStore($this->_scope);
60
+ }
61
+
62
+ public function getAddButtonHtml()
63
+ {
64
+ return $this->getChildHtml('add_button');
65
+ }
66
+
67
+ protected function _prepareLayout()
68
+ {
69
+ $button = $this->getLayout()->createBlock('adminhtml/widget_button')
70
+ ->setData(array(
71
+ 'label' => Mage::helper('icecore')->__('Get paymentmethods'),
72
+ 'onclick' => 'return ICEPAY.retrieveFromICEPAY()',
73
+ 'class' => 'add'
74
+ ));
75
+ $button->setName('add_tier_price_item_button');
76
+
77
+ $this->setChild('add_button', $button);
78
+
79
+ if (version_compare(Mage::getVersion(), '1.7.0.0', '<')) {
80
+ $this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/magento.css');
81
+ } else {
82
+ $this->getLayout()->getBlock('head')->addItem('skin_css', 'lib/prototype/windows/themes/magento.css');
83
+ }
84
+
85
+ $this->getLayout()
86
+ ->getBlock('head')
87
+ ->addItem('js_css', 'prototype/windows/themes/default.css');
88
+
89
+ return parent::_prepareLayout();
90
+ }
91
+
92
  }
app/code/community/Icepay/IceAdvanced/Block/Adminhtml/Setting/Paymentmethod.php CHANGED
@@ -1,58 +1,58 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Block displays settings check
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceAdvanced_Block_Adminhtml_Setting_Paymentmethod extends Mage_Core_Block_Template {
18
-
19
- protected $_template = 'icepayadvanced/paymentmethod.phtml';
20
- private $viewData = null;
21
- private $method = "";
22
- protected $scopeID = null;
23
-
24
- private $sqlModel = null;
25
-
26
- private function useAdvancedSQL(){
27
- if ($this->sqlModel == null) $this->sqlModel = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
28
- return $this->sqlModel;
29
- }
30
-
31
-
32
- public function setPaymentmethod($method, $scopeID){
33
- $this->method = $method;
34
- $this->scopeID = $this->getRequest()->getParam('scope');
35
- $this->setViewData();
36
- return $this;
37
- }
38
-
39
- private function setViewData(){
40
- if ($this->viewData != null) return;
41
-
42
- $this->useAdvancedSQL()->setScope($this->getRequest()->getParam('scope'));
43
-
44
- $reference = $this->useAdvancedSQL()->getReferenceFromPMCode($this->method);
45
- $data = $this->useAdvancedSQL()->getConfigDataByReference($reference);
46
- $this->viewData = new stdClass();
47
- $this->viewData->module = $reference;
48
- $this->viewData->config = $data['config'];
49
- $this->viewData->issuers = $data['issuers'];
50
-
51
- $this->viewData->countryCollection = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(true);
52
- }
53
-
54
- public function getViewData(){
55
- return $this->viewData;
56
- }
57
-
58
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Block displays settings check
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceAdvanced_Block_Adminhtml_Setting_Paymentmethod extends Mage_Core_Block_Template {
18
+
19
+ protected $_template = 'icepayadvanced/paymentmethod.phtml';
20
+ private $viewData = null;
21
+ private $method = "";
22
+ protected $scopeID = null;
23
+
24
+ private $sqlModel = null;
25
+
26
+ private function useAdvancedSQL(){
27
+ if ($this->sqlModel == null) $this->sqlModel = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
28
+ return $this->sqlModel;
29
+ }
30
+
31
+
32
+ public function setPaymentmethod($method, $scopeID){
33
+ $this->method = $method;
34
+ $this->scopeID = $this->getRequest()->getParam('scope');
35
+ $this->setViewData();
36
+ return $this;
37
+ }
38
+
39
+ private function setViewData(){
40
+ if ($this->viewData != null) return;
41
+
42
+ $this->useAdvancedSQL()->setScope($this->getRequest()->getParam('scope'));
43
+
44
+ $reference = $this->useAdvancedSQL()->getReferenceFromPMCode($this->method);
45
+ $data = $this->useAdvancedSQL()->getConfigDataByReference($reference);
46
+ $this->viewData = new stdClass();
47
+ $this->viewData->module = $reference;
48
+ $this->viewData->config = $data['config'];
49
+ $this->viewData->issuers = $data['issuers'];
50
+
51
+ $this->viewData->countryCollection = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(true);
52
+ }
53
+
54
+ public function getViewData(){
55
+ return $this->viewData;
56
+ }
57
+
58
  }
app/code/community/Icepay/IceAdvanced/Block/Payment/Form/Default.php CHANGED
@@ -1,57 +1,57 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Block displays payment method
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceAdvanced_Block_Payment_Form_Default extends Mage_Payment_Block_Form {
18
-
19
- public $_code;
20
- public $_issuer;
21
- public $_model;
22
- public $_countryArr = null;
23
- public $_country;
24
-
25
- protected function _construct() {
26
- $this->setTemplate('icepayadvanced/form/default.phtml');
27
- $this->model = Mage::getModel('iceadvanced/checkout_standard');
28
- parent::_construct();
29
- }
30
-
31
- protected function _toHtml() {
32
- $this->model->setCode($this->getMethodCode());
33
- $this->_issuer = $this->model->getIssuerOptionArray();
34
- Mage::dispatchEvent('payment_form_block_to_html_before', array(
35
- 'block' => $this
36
- ));
37
- return parent::_toHtml();
38
- }
39
-
40
- public function getConfig($config) {
41
- return $this->model->getConfigData($config);
42
- }
43
-
44
- public function getDescription() {
45
- return $this->getConfig("description");
46
- }
47
-
48
- public function getPMCode() {
49
- return $this->getConfig("pm_code");
50
- }
51
-
52
- public function getCountry(){
53
- return $this->_country;
54
- }
55
-
56
- }
57
-
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Block displays payment method
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceAdvanced_Block_Payment_Form_Default extends Mage_Payment_Block_Form {
18
+
19
+ public $_code;
20
+ public $_issuer;
21
+ public $_model;
22
+ public $_countryArr = null;
23
+ public $_country;
24
+
25
+ protected function _construct() {
26
+ $this->setTemplate('icepayadvanced/form/default.phtml');
27
+ $this->model = Mage::getModel('iceadvanced/checkout_standard');
28
+ parent::_construct();
29
+ }
30
+
31
+ protected function _toHtml() {
32
+ $this->model->setCode($this->getMethodCode());
33
+ $this->_issuer = $this->model->getIssuerOptionArray();
34
+ Mage::dispatchEvent('payment_form_block_to_html_before', array(
35
+ 'block' => $this
36
+ ));
37
+ return parent::_toHtml();
38
+ }
39
+
40
+ public function getConfig($config) {
41
+ return $this->model->getConfigData($config);
42
+ }
43
+
44
+ public function getDescription() {
45
+ return $this->getConfig("description");
46
+ }
47
+
48
+ public function getPMCode() {
49
+ return $this->getConfig("pm_code");
50
+ }
51
+
52
+ public function getCountry(){
53
+ return $this->_country;
54
+ }
55
+
56
+ }
57
+
app/code/community/Icepay/IceAdvanced/Helper/Data.php CHANGED
@@ -1,236 +1,236 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Helper class
5
- * @version 1.1.0
6
- * @author Olaf Abbenhuis
7
- * @author Wouter van Tilburg
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceAdvanced_Helper_Data extends Mage_Core_Helper_Abstract
18
- {
19
- /* Install values */
20
-
21
- public $title = 'Advanced';
22
- public $version = '1.2.9';
23
- public $id = 'ADV';
24
- public $fingerprint = '7f4de76ecbf7d847caeba64c42938a6a05821c4f';
25
- public $compatibility_oldest_version = '1.5.0.0';
26
- public $compatibility_latest_version = '1.9.2.1';
27
- public $section = 'iceadvanced';
28
- public $serial_required = '0';
29
- public $filteredPaymentmethods = array('SMS', 'PHONE');
30
- public $filteredPaymentMethodIssuers = array('CCAUTOCHECKOUT', 'IDEALINCASSO');
31
-
32
- public function doChecks()
33
- {
34
- $lines = array();
35
-
36
- /* Check SOAP */
37
- $check = Mage::helper("icecore")->hasSOAP();
38
- array_push($lines, array(
39
- 'id' => "soap",
40
- 'line' => ($check) ? $this->__("SOAP webservices available") : $this->__("SOAP was not found on this server"),
41
- 'result' => ($check) ? "ok" : "err"));
42
-
43
- /* Check Paymentmethods */
44
- $showDefault = true;
45
-
46
- if (Mage::helper("icecore")->adminGetFrontScope()) {
47
- $check = $this->countStoredPaymentmethods(Mage::helper("icecore")->adminGetStoreScopeID());
48
- array_push($lines, array(
49
- 'id' => "database",
50
- 'line' => $check["msg"],
51
- 'result' => ($check["val"]) ? "ok" : "err"));
52
- if ($check["val"])
53
- $showDefault = false;
54
- };
55
-
56
- /* Check Default Paymentmethods */
57
- if ($showDefault) {
58
- $check = $this->countStoredPaymentmethods(0);
59
- array_push($lines, array(
60
- 'id' => "default_database",
61
- 'line' => $check["msg"],
62
- 'result' => ($check["val"]) ? "ok" : "err"));
63
- }
64
-
65
- $adv_sql = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
66
-
67
- if ($adv_sql->getPMbyCode('afterpay')) {
68
- if (Mage::getModel('tax/config')->getAlgorithm() != Mage_Tax_Model_Calculation::CALC_UNIT_BASE)
69
- array_push($lines, array(
70
- 'id' => "tax",
71
- 'line' => "In order to use Afterpay you must have set the Tax Calculation Method Based On Unit Price.",
72
- 'result' => "err"));
73
- }
74
-
75
- return $lines;
76
- }
77
-
78
- public function getPaymentmethodExtraSettings()
79
- {
80
- return array(
81
- "description",
82
- //"active_issuers",
83
- "allowspecific",
84
- "specificcountry",
85
- "min_order_total",
86
- "max_order_total",
87
- "sort_order"
88
- );
89
- }
90
-
91
- public function countStoredPaymentmethods($storeID)
92
- {
93
- $adv_sql = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
94
- $adv_sql->setScope($storeID);
95
-
96
- $count = $adv_sql->countPaymentMethods();
97
-
98
- if ($storeID == 0) {
99
- $return = array('val' => false, 'msg' => $this->__("No paymentmethods stored in Default settings"));
100
- $langvar = $this->__("%s paymentmethods stored in Default settings");
101
- } else {
102
- $return = array('val' => false, 'msg' => $this->__("No paymentmethods stored for this Store view"));
103
- $langvar = $this->__("%s paymentmethods stored for this Store view");
104
- }
105
-
106
- if ($count > 0)
107
- $return = array('val' => true, 'msg' => sprintf($langvar, $count));
108
-
109
- return $return;
110
- }
111
-
112
- public function addIcons($obj, $isArray = false)
113
- {
114
- if ($isArray) {
115
- foreach ($obj as $key => $value) {
116
- $img = Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($value["code"]));
117
- $obj[$key]["Image"] = ($img) ? $img : $value["code"];
118
- }
119
- } else {
120
- foreach ($obj as $key => $value) {
121
- $img = Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($value->PaymentMethodCode));
122
- $obj[$key]->Image = ($img) ? $img : $value->PaymentMethodCode;
123
- };
124
- }
125
-
126
- return $obj;
127
- }
128
-
129
- public function getIssuerArray($value)
130
- {
131
- return unserialize(urldecode($value));
132
- }
133
-
134
- protected function getValueForStore($val)
135
- {
136
- $store = Mage::helper('icecore')->getStoreScopeID();
137
- return Mage::helper('icecore')->getConfigForStore($store, $val);
138
- }
139
-
140
- /**
141
- * Remove all whitespace from a string
142
- *
143
- * @param string $string
144
- *
145
- * @author Wouter van Tilburg
146
- * @since 1.1.0
147
- * @return string
148
- */
149
- private function removeWhitespace($string)
150
- {
151
- return str_replace(' ', '', $string);
152
- }
153
-
154
- /**
155
- * Validate's the postcode based on country
156
- *
157
- * @param string $country
158
- * @param string $postCode
159
- *
160
- * @author Wouter van Tilburg
161
- * @since 1.1.0
162
- * @throws Mage_Payment_Model_Info_Exception
163
- */
164
- public function validatePostCode($country, $postCode)
165
- {
166
- $postCode = $this->removeWhitespace($postCode);
167
-
168
- switch ($country) {
169
- case 'NL':
170
- if (!preg_match('/^[1-9]{1}[0-9]{3}[A-Z]{2}$/', $postCode))
171
- return false;
172
- break;
173
- case 'BE':
174
- if (!preg_match('/^[1-9]{4}$/', $postCode))
175
- throw new Mage_Payment_Model_Info_Exception('Your postal code is incorrect, must be in 1111 format.');
176
- break;
177
- case 'DE':
178
- if (!preg_match('/^[1-9]{5}$/', $postCode))
179
- throw new Mage_Payment_Model_Info_Exception('Your postal code is incorrect, must be in 11111 format.');
180
- break;
181
- }
182
-
183
- return true;
184
- }
185
-
186
- /**
187
- * Validate's the phonenumber based on country
188
- *
189
- * @param type $country
190
- * @param type $phoneNumber
191
- *
192
- * @author Wouter van Tilburg
193
- * @since 1.1.0
194
- * @throws Mage_Payment_Model_Info_Exception
195
- */
196
- public function validatePhonenumber($country, $phoneNumber)
197
- {
198
- switch ($country) {
199
- case 'NL':
200
- if (!preg_match('/^\(?\+?\d{1,3}\)?\s?-?\s?[\d\s]*$/', $phoneNumber) OR strlen($phoneNumber) < 10)
201
- return false;
202
- break;
203
- }
204
-
205
- return true;
206
- }
207
-
208
- /**
209
- * Validate's the street address (Afterpay)
210
- *
211
- * @param string $streetAddress
212
- *
213
- * @author Wouter van Tilburg
214
- * @since 1.1.0
215
- * @return boolean
216
- */
217
- public function validateStreetAddress($streetAddress)
218
- {
219
- $streetAddress = implode(' ', $streetAddress);
220
-
221
- $pattern = '#^(.+\D+){1} ([0-9]{1,})\s?([\s\/]?[0-9]{0,}?[\s\S]{0,}?)?$#i';
222
-
223
- $aMatch = array();
224
-
225
- if (preg_match($pattern, $streetAddress, $aMatch)) {
226
- $street = utf8_decode($aMatch[1]);
227
- $houseNumber = utf8_decode($aMatch[2]);
228
-
229
- if (!empty($street) && !empty($houseNumber))
230
- return true;
231
- }
232
-
233
- return false;
234
- }
235
-
236
- }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Helper class
5
+ * @version 1.1.0
6
+ * @author Olaf Abbenhuis
7
+ * @author Wouter van Tilburg
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceAdvanced_Helper_Data extends Mage_Core_Helper_Abstract
18
+ {
19
+ /* Install values */
20
+
21
+ public $title = 'Advanced';
22
+ public $version = '1.2.11';
23
+ public $id = 'ADV';
24
+ public $fingerprint = '7f4de76ecbf7d847caeba64c42938a6a05821c4f';
25
+ public $compatibility_oldest_version = '1.5.0.0';
26
+ public $compatibility_latest_version = '1.9.2.2';
27
+ public $section = 'iceadvanced';
28
+ public $serial_required = '0';
29
+ public $filteredPaymentmethods = array('SMS', 'PHONE');
30
+ public $filteredPaymentMethodIssuers = array('CCAUTOCHECKOUT', 'IDEALINCASSO');
31
+
32
+ public function doChecks()
33
+ {
34
+ $lines = array();
35
+
36
+ /* Check SOAP */
37
+ $check = Mage::helper("icecore")->hasSOAP();
38
+ array_push($lines, array(
39
+ 'id' => "soap",
40
+ 'line' => ($check) ? $this->__("SOAP webservices available") : $this->__("SOAP was not found on this server"),
41
+ 'result' => ($check) ? "ok" : "err"));
42
+
43
+ /* Check Paymentmethods */
44
+ $showDefault = true;
45
+
46
+ if (Mage::helper("icecore")->adminGetFrontScope()) {
47
+ $check = $this->countStoredPaymentmethods(Mage::helper("icecore")->adminGetStoreScopeID());
48
+ array_push($lines, array(
49
+ 'id' => "database",
50
+ 'line' => $check["msg"],
51
+ 'result' => ($check["val"]) ? "ok" : "err"));
52
+ if ($check["val"])
53
+ $showDefault = false;
54
+ };
55
+
56
+ /* Check Default Paymentmethods */
57
+ if ($showDefault) {
58
+ $check = $this->countStoredPaymentmethods(0);
59
+ array_push($lines, array(
60
+ 'id' => "default_database",
61
+ 'line' => $check["msg"],
62
+ 'result' => ($check["val"]) ? "ok" : "err"));
63
+ }
64
+
65
+ $adv_sql = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
66
+
67
+ if ($adv_sql->getPMbyCode('afterpay')) {
68
+ if (Mage::getModel('tax/config')->getAlgorithm() != Mage_Tax_Model_Calculation::CALC_UNIT_BASE)
69
+ array_push($lines, array(
70
+ 'id' => "tax",
71
+ 'line' => "In order to use Afterpay you must have set the Tax Calculation Method Based On Unit Price.",
72
+ 'result' => "err"));
73
+ }
74
+
75
+ return $lines;
76
+ }
77
+
78
+ public function getPaymentmethodExtraSettings()
79
+ {
80
+ return array(
81
+ "description",
82
+ //"active_issuers",
83
+ "allowspecific",
84
+ "specificcountry",
85
+ "min_order_total",
86
+ "max_order_total",
87
+ "sort_order"
88
+ );
89
+ }
90
+
91
+ public function countStoredPaymentmethods($storeID)
92
+ {
93
+ $adv_sql = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
94
+ $adv_sql->setScope($storeID);
95
+
96
+ $count = $adv_sql->countPaymentMethods();
97
+
98
+ if ($storeID == 0) {
99
+ $return = array('val' => false, 'msg' => $this->__("No paymentmethods stored in Default settings"));
100
+ $langvar = $this->__("%s paymentmethods stored in Default settings");
101
+ } else {
102
+ $return = array('val' => false, 'msg' => $this->__("No paymentmethods stored for this Store view"));
103
+ $langvar = $this->__("%s paymentmethods stored for this Store view");
104
+ }
105
+
106
+ if ($count > 0)
107
+ $return = array('val' => true, 'msg' => sprintf($langvar, $count));
108
+
109
+ return $return;
110
+ }
111
+
112
+ public function addIcons($obj, $isArray = false)
113
+ {
114
+ if ($isArray) {
115
+ foreach ($obj as $key => $value) {
116
+ $img = Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($value["code"]));
117
+ $obj[$key]["Image"] = ($img) ? $img : $value["code"];
118
+ }
119
+ } else {
120
+ foreach ($obj as $key => $value) {
121
+ $img = Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($value->PaymentMethodCode));
122
+ $obj[$key]->Image = ($img) ? $img : $value->PaymentMethodCode;
123
+ };
124
+ }
125
+
126
+ return $obj;
127
+ }
128
+
129
+ public function getIssuerArray($value)
130
+ {
131
+ return unserialize(urldecode($value));
132
+ }
133
+
134
+ protected function getValueForStore($val)
135
+ {
136
+ $store = Mage::helper('icecore')->getStoreScopeID();
137
+ return Mage::helper('icecore')->getConfigForStore($store, $val);
138
+ }
139
+
140
+ /**
141
+ * Remove all whitespace from a string
142
+ *
143
+ * @param string $string
144
+ *
145
+ * @author Wouter van Tilburg
146
+ * @since 1.1.0
147
+ * @return string
148
+ */
149
+ private function removeWhitespace($string)
150
+ {
151
+ return str_replace(' ', '', $string);
152
+ }
153
+
154
+ /**
155
+ * Validate's the postcode based on country
156
+ *
157
+ * @param string $country
158
+ * @param string $postCode
159
+ *
160
+ * @author Wouter van Tilburg
161
+ * @since 1.1.0
162
+ * @throws Mage_Payment_Model_Info_Exception
163
+ */
164
+ public function validatePostCode($country, $postCode)
165
+ {
166
+ $postCode = $this->removeWhitespace($postCode);
167
+
168
+ switch ($country) {
169
+ case 'NL':
170
+ if (!preg_match('/^[1-9]{1}[0-9]{3}[A-Z]{2}$/', $postCode))
171
+ return false;
172
+ break;
173
+ case 'BE':
174
+ if (!preg_match('/^[1-9]{4}$/', $postCode))
175
+ throw new Mage_Payment_Model_Info_Exception('Your postal code is incorrect, must be in 1111 format.');
176
+ break;
177
+ case 'DE':
178
+ if (!preg_match('/^[1-9]{5}$/', $postCode))
179
+ throw new Mage_Payment_Model_Info_Exception('Your postal code is incorrect, must be in 11111 format.');
180
+ break;
181
+ }
182
+
183
+ return true;
184
+ }
185
+
186
+ /**
187
+ * Validate's the phonenumber based on country
188
+ *
189
+ * @param type $country
190
+ * @param type $phoneNumber
191
+ *
192
+ * @author Wouter van Tilburg
193
+ * @since 1.1.0
194
+ * @throws Mage_Payment_Model_Info_Exception
195
+ */
196
+ public function validatePhonenumber($country, $phoneNumber)
197
+ {
198
+ switch ($country) {
199
+ case 'NL':
200
+ if (!preg_match('/^\(?\+?\d{1,3}\)?\s?-?\s?[\d\s]*$/', $phoneNumber) OR strlen($phoneNumber) < 10)
201
+ return false;
202
+ break;
203
+ }
204
+
205
+ return true;
206
+ }
207
+
208
+ /**
209
+ * Validate's the street address (Afterpay)
210
+ *
211
+ * @param string $streetAddress
212
+ *
213
+ * @author Wouter van Tilburg
214
+ * @since 1.1.0
215
+ * @return boolean
216
+ */
217
+ public function validateStreetAddress($streetAddress)
218
+ {
219
+ $streetAddress = implode(' ', $streetAddress);
220
+
221
+ $pattern = '#^(.+\D+){1} ([0-9]{1,})\s?([\s\/]?[0-9]{0,}?[\s\S]{0,}?)?$#i';
222
+
223
+ $aMatch = array();
224
+
225
+ if (preg_match($pattern, $streetAddress, $aMatch)) {
226
+ $street = utf8_decode($aMatch[1]);
227
+ $houseNumber = utf8_decode($aMatch[2]);
228
+
229
+ if (!empty($street) && !empty($houseNumber))
230
+ return true;
231
+ }
232
+
233
+ return false;
234
+ }
235
+
236
+ }
app/code/community/Icepay/IceAdvanced/Model/Checkout/PaymentObject.php CHANGED
@@ -1,236 +1,236 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Pro - Webservice PaymentObject
5
- *
6
- * @version 1.0.0
7
- * @author Wouter van Tilburg <wouter@icepay.eu>
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceAdvanced_Model_Checkout_PaymentObject {
18
-
19
- private $amount;
20
- private $country;
21
- private $currency;
22
- private $description = '';
23
- private $language;
24
- private $orderID;
25
- private $paymentMethod;
26
- private $paymentMethodIssuer;
27
- private $reference = '';
28
-
29
- /**
30
- * Sets the total amount to be paid in cents
31
- *
32
- * @param int $amount
33
- * @since 1.0.0
34
- * @return Icepay_Pro_Model_Webservice_PaymentObject
35
- */
36
- public function setAmount($amount) {
37
- $this->amount = $amount;
38
-
39
- return $this;
40
- }
41
-
42
- /**
43
- * sets the country
44
- *
45
- * @param string $country
46
- * @since 1.0.0
47
- * @return Icepay_Pro_Model_Webservice_PaymentObject
48
- */
49
- public function setCountry($country) {
50
- $this->country = (string) strtoupper($country);
51
-
52
- return $this;
53
- }
54
-
55
- /**
56
- * Sets the currency
57
- *
58
- * @param string $currency
59
- * @since 1.0.0
60
- * @return Icepay_Pro_Model_Webservice_PaymentObject
61
- */
62
- public function setCurrency($currency) {
63
- $this->currency = (string) strtoupper($currency);
64
-
65
- return $this;
66
- }
67
-
68
- /**
69
- * Sets the description
70
- *
71
- * @param string $description
72
- * @since 1.0.0
73
- * @return Icepay_Pro_Model_Webservice_PaymentObject
74
- */
75
- public function setDescription($description = '') {
76
- $this->description = (string) $description;
77
-
78
- return $this;
79
- }
80
-
81
- /**
82
- * Sets the language
83
- *
84
- * @param string $language
85
- * @since 1.0.0
86
- * @return Icepay_Pro_Model_Webservice_PaymentObject
87
- */
88
- public function setLanguage($language) {
89
- $this->language = (string) strtoupper($language);
90
-
91
- return $this;
92
- }
93
-
94
- /**
95
- * Sets the OrderID
96
- *
97
- * @param string $orderID
98
- * @since 1.0.0
99
- * @return Icepay_Pro_Model_Webservice_PaymentObject
100
- */
101
- public function setOrderID($orderID) {
102
- $this->orderID = (string) $orderID;
103
-
104
- return $this;
105
- }
106
-
107
- /**
108
- * Sets the paymentmethod
109
- *
110
- * @param string $paymentMethod
111
- * @since 1.0.0
112
- * @return Icepay_Pro_Model_Webservice_PaymentObject
113
- */
114
- public function setPaymentMethod($paymentMethod) {
115
- $this->paymentMethod = (string) $paymentMethod;
116
-
117
- return $this;
118
- }
119
-
120
- /**
121
- * Set the paymentmethod issuer
122
- *
123
- * @param string $paymentMethodIssuer
124
- * @since 1.0.0
125
- * @return Icepay_Pro_Model_Webservice_PaymentObject
126
- */
127
- public function setPaymentMethodIssuer($paymentMethodIssuer) {
128
- $this->paymentMethodIssuer = (string) $paymentMethodIssuer;
129
-
130
- return $this;
131
- }
132
-
133
- /**
134
- * Sets the reference
135
- *
136
- * @param string $reference
137
- * @since 1.0.0
138
- * @return Icepay_Pro_Model_Webservice_PaymentObject
139
- */
140
- public function setReference($reference = '') {
141
- $this->reference = (string) $reference;
142
-
143
- return $this;
144
- }
145
-
146
- /**
147
- * Returns the total amount in cents
148
- *
149
- * @since 1.0.0
150
- * @return int
151
- */
152
- public function getAmount() {
153
- return $this->amount;
154
- }
155
-
156
- /**
157
- * Returns the country
158
- *
159
- * @since 1.0.0
160
- * @return string
161
- */
162
- public function getCountry() {
163
- return $this->country;
164
- }
165
-
166
- /**
167
- * Returns the currency
168
- *
169
- * @since 1.0.0
170
- * @return string
171
- */
172
- public function getCurrency() {
173
- return $this->currency;
174
- }
175
-
176
- /**
177
- * Returns the description
178
- *
179
- * @since 1.0.0
180
- * @return string
181
- */
182
- public function getDescription() {
183
- return $this->description;
184
- }
185
-
186
- /**
187
- * Returns the language
188
- *
189
- * @since 1.0.0
190
- * @return string
191
- */
192
- public function getLanguage() {
193
- return $this->language;
194
- }
195
-
196
- /**
197
- * Returns the order ID
198
- *
199
- * @since 1.0.0
200
- * @return string
201
- */
202
- public function getOrderID() {
203
- return $this->orderID;
204
- }
205
-
206
- /**
207
- * Returns the paymentmethod
208
- *
209
- * @since 1.0.0
210
- * @return string
211
- */
212
- public function getPaymentMethod() {
213
- return $this->paymentMethod;
214
- }
215
-
216
- /**
217
- * Returns the paymentmethod issuer
218
- *
219
- * @since 1.0.0
220
- * @return string
221
- */
222
- public function getPaymentMethodIssuer() {
223
- return $this->paymentMethodIssuer;
224
- }
225
-
226
- /**
227
- * Returns the reference
228
- *
229
- * @since 1.0.0
230
- * @return string
231
- */
232
- public function getReference() {
233
- return $this->reference;
234
- }
235
-
236
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Pro - Webservice PaymentObject
5
+ *
6
+ * @version 1.0.0
7
+ * @author Wouter van Tilburg <wouter@icepay.eu>
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceAdvanced_Model_Checkout_PaymentObject {
18
+
19
+ private $amount;
20
+ private $country;
21
+ private $currency;
22
+ private $description = '';
23
+ private $language;
24
+ private $orderID;
25
+ private $paymentMethod;
26
+ private $paymentMethodIssuer;
27
+ private $reference = '';
28
+
29
+ /**
30
+ * Sets the total amount to be paid in cents
31
+ *
32
+ * @param int $amount
33
+ * @since 1.0.0
34
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
35
+ */
36
+ public function setAmount($amount) {
37
+ $this->amount = $amount;
38
+
39
+ return $this;
40
+ }
41
+
42
+ /**
43
+ * sets the country
44
+ *
45
+ * @param string $country
46
+ * @since 1.0.0
47
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
48
+ */
49
+ public function setCountry($country) {
50
+ $this->country = (string) strtoupper($country);
51
+
52
+ return $this;
53
+ }
54
+
55
+ /**
56
+ * Sets the currency
57
+ *
58
+ * @param string $currency
59
+ * @since 1.0.0
60
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
61
+ */
62
+ public function setCurrency($currency) {
63
+ $this->currency = (string) strtoupper($currency);
64
+
65
+ return $this;
66
+ }
67
+
68
+ /**
69
+ * Sets the description
70
+ *
71
+ * @param string $description
72
+ * @since 1.0.0
73
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
74
+ */
75
+ public function setDescription($description = '') {
76
+ $this->description = (string) $description;
77
+
78
+ return $this;
79
+ }
80
+
81
+ /**
82
+ * Sets the language
83
+ *
84
+ * @param string $language
85
+ * @since 1.0.0
86
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
87
+ */
88
+ public function setLanguage($language) {
89
+ $this->language = (string) strtoupper($language);
90
+
91
+ return $this;
92
+ }
93
+
94
+ /**
95
+ * Sets the OrderID
96
+ *
97
+ * @param string $orderID
98
+ * @since 1.0.0
99
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
100
+ */
101
+ public function setOrderID($orderID) {
102
+ $this->orderID = (string) $orderID;
103
+
104
+ return $this;
105
+ }
106
+
107
+ /**
108
+ * Sets the paymentmethod
109
+ *
110
+ * @param string $paymentMethod
111
+ * @since 1.0.0
112
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
113
+ */
114
+ public function setPaymentMethod($paymentMethod) {
115
+ $this->paymentMethod = (string) $paymentMethod;
116
+
117
+ return $this;
118
+ }
119
+
120
+ /**
121
+ * Set the paymentmethod issuer
122
+ *
123
+ * @param string $paymentMethodIssuer
124
+ * @since 1.0.0
125
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
126
+ */
127
+ public function setPaymentMethodIssuer($paymentMethodIssuer) {
128
+ $this->paymentMethodIssuer = (string) $paymentMethodIssuer;
129
+
130
+ return $this;
131
+ }
132
+
133
+ /**
134
+ * Sets the reference
135
+ *
136
+ * @param string $reference
137
+ * @since 1.0.0
138
+ * @return Icepay_Pro_Model_Webservice_PaymentObject
139
+ */
140
+ public function setReference($reference = '') {
141
+ $this->reference = (string) $reference;
142
+
143
+ return $this;
144
+ }
145
+
146
+ /**
147
+ * Returns the total amount in cents
148
+ *
149
+ * @since 1.0.0
150
+ * @return int
151
+ */
152
+ public function getAmount() {
153
+ return $this->amount;
154
+ }
155
+
156
+ /**
157
+ * Returns the country
158
+ *
159
+ * @since 1.0.0
160
+ * @return string
161
+ */
162
+ public function getCountry() {
163
+ return $this->country;
164
+ }
165
+
166
+ /**
167
+ * Returns the currency
168
+ *
169
+ * @since 1.0.0
170
+ * @return string
171
+ */
172
+ public function getCurrency() {
173
+ return $this->currency;
174
+ }
175
+
176
+ /**
177
+ * Returns the description
178
+ *
179
+ * @since 1.0.0
180
+ * @return string
181
+ */
182
+ public function getDescription() {
183
+ return $this->description;
184
+ }
185
+
186
+ /**
187
+ * Returns the language
188
+ *
189
+ * @since 1.0.0
190
+ * @return string
191
+ */
192
+ public function getLanguage() {
193
+ return $this->language;
194
+ }
195
+
196
+ /**
197
+ * Returns the order ID
198
+ *
199
+ * @since 1.0.0
200
+ * @return string
201
+ */
202
+ public function getOrderID() {
203
+ return $this->orderID;
204
+ }
205
+
206
+ /**
207
+ * Returns the paymentmethod
208
+ *
209
+ * @since 1.0.0
210
+ * @return string
211
+ */
212
+ public function getPaymentMethod() {
213
+ return $this->paymentMethod;
214
+ }
215
+
216
+ /**
217
+ * Returns the paymentmethod issuer
218
+ *
219
+ * @since 1.0.0
220
+ * @return string
221
+ */
222
+ public function getPaymentMethodIssuer() {
223
+ return $this->paymentMethodIssuer;
224
+ }
225
+
226
+ /**
227
+ * Returns the reference
228
+ *
229
+ * @since 1.0.0
230
+ * @return string
231
+ */
232
+ public function getReference() {
233
+ return $this->reference;
234
+ }
235
+
236
  }
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod01.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod01
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_01";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod01
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_01";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod02.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod02
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_02";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod02
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_02";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod03.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod03
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_03";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod03
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_03";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod04.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod04
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_04";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod04
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_04";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod05.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod05
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_05";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod05
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_05";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod06.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod06
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_06";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod06
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_06";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod07.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod07
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_07";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod07
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_07";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod08.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod08
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_08";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod08
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_08";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod09.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod09
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_09";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod09
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_09";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod10.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod10
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_10";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod10
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_10";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod11.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod11
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_11";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod11
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_11";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod12.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod12
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_12";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod12
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_12";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod13.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod13
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_13";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod13
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_13";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod14.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod14
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_14";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod14
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_14";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod15.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod15
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_15";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod15
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_15";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod16.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod16
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_16";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod16
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_16";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod17.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod17
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_17";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod17
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_17";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod18.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod18
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_18";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod18
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_18";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod19.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod19
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_19";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod19
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_19";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Placeholder/Paymentmethod20.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod20
4
- extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
-
6
- public $_code = "icepayadv_20";
7
-
8
- }
9
-
10
  ?>
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Checkout_Placeholder_Paymentmethod20
4
+ extends Icepay_IceAdvanced_Model_Checkout_Standard {
5
+
6
+ public $_code = "icepayadv_20";
7
+
8
+ }
9
+
10
  ?>
app/code/community/Icepay/IceAdvanced/Model/Checkout/Standard.php CHANGED
@@ -1,297 +1,297 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Main Paymentmethod class
5
- * @version 1.0.2
6
- * @author Olaf Abbenhuis
7
- * @author Wouter van Tilburg
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceAdvanced_Model_Checkout_Standard extends Mage_Payment_Model_Method_Abstract {
18
-
19
- public $_code;
20
- public $_formBlockType = 'iceadvanced/payment_form_default';
21
- private $_issuer;
22
- private $_avail_issuer;
23
- public $_quote;
24
- protected $_coreSQL = null;
25
- protected $_advancedSQL = null;
26
-
27
- /**
28
- * Payment Method features
29
- * @var bool
30
- */
31
- public $_isGateway = true;
32
- public $_canOrder = true;
33
- public $_canAuthorize = false;
34
- public $_canCapture = false;
35
- public $_canCapturePartial = false;
36
- public $_canRefund = true;
37
- public $_canRefundInvoicePartial = true;
38
- public $_canVoid = false;
39
- public $_canUseInternal = true;
40
- public $_canUseCheckout = true;
41
- public $_canUseForMultishipping = false;
42
- public $_isInitializeNeeded = true;
43
- public $_canFetchTransactionInfo = false;
44
- public $_canReviewPayment = false;
45
- public $_canCreateBillingAgreement = false;
46
- public $_canManageRecurringProfiles = false;
47
-
48
- public function __construct()
49
- {
50
- $this->advSQL()->setScope(Mage::app()->getStore()->getID());
51
- if ((int) $this->advSQL()->countPaymentMethods() == 0)
52
- $this->advSQL()->setScope(0); //Fallback to default store
53
- }
54
-
55
- /**
56
- * Request an online refund
57
- *
58
- * @param Varien_Object $payment
59
- * @param string $amount
60
- *
61
- * @since 1.0.2
62
- * @return \Icepay_IceAdvanced_Model_Checkout_Standard
63
- */
64
- public function refund(Varien_Object $payment, $amount)
65
- {
66
- // Get Magento Order
67
- $order = $payment->getOrder();
68
-
69
- // Get StoreId
70
- $storeId = $order->getStoreId();
71
-
72
- // Check if Auto Refund is enabled
73
- if (!Mage::getStoreConfig(Icepay_IceCore_Model_Config::AUTOREFUND, $storeId))
74
- return $this;
75
-
76
- // Fetch ICEPAY merchant settings
77
- $merchantID = Mage::getStoreConfig(Icepay_IceCore_Model_Config::MERCHANTID, $storeId);
78
- $secretCode = Mage::getStoreConfig(Icepay_IceCore_Model_Config::SECRETCODE, $storeId);
79
-
80
- // Get CurrencyCode
81
- $currency = $order->getOrderCurrencyCode();
82
-
83
- // Amount must be in cents
84
- $amount = (int) (string) ($amount * 100);
85
-
86
- // Fetch ICEPAY Payment ID
87
- $paymentID = $payment->getLastTransId();
88
-
89
- // Setup webservice
90
- $webservice = Mage::getModel('Icepay_IceAdvanced_Model_Webservice_Refund');
91
- $webservice->init($merchantID, $secretCode);
92
-
93
- // Request refund
94
- try {
95
- $webservice->requestRefund($paymentID, $amount, $currency);
96
- } catch (Exception $e) {
97
- Mage::getSingleton('adminhtml/session')->addError("ICEPAY: Refund Failed! {$e->getMessage()}");
98
- Mage::helper('icecore')->log("ICEPAY: Refund Failed! {$e->getMessage()}");
99
- }
100
-
101
- return $this;
102
- }
103
-
104
- public function initialize($paymentAction, $stateObject)
105
- {
106
- $stateObject->setState(Mage_Sales_Model_Order::STATE_NEW);
107
- $stateObject->setStatus(Icepay_IceCore_Model_Config::STATUS_MAGENTO_NEW);
108
- $stateObject->setIsNotified(false);
109
- }
110
-
111
- public function getDescription()
112
- {
113
- return $this->getConfigData("info");
114
- }
115
-
116
- public function getIssuers()
117
- {
118
- if (!$this->_issuer)
119
- $this->_issuer = $this->advSQL()->getIssuersByPMReference($this->_code);
120
- return $this->_issuer;
121
- }
122
-
123
- public function getAvailableIssuers()
124
- {
125
- if (!$this->_avail_issuer)
126
- $this->_avail_issuer = $this->advSQL()->getAvailableIssuers($this->getConfigData("active_issuers"), $this->_code);
127
-
128
- return $this->_avail_issuer;
129
- }
130
-
131
- public function getIssuerOptionArray()
132
- {
133
- $options = array();
134
- foreach ($this->getAvailableIssuers() as $issuer) {
135
- $options[] = array('value' => $issuer['issuer_code'], 'label' => $issuer['issuer_name']);
136
- }
137
-
138
- return $options;
139
- }
140
-
141
- public function isAvailable($quote = null)
142
- {
143
- $this->_quote = $quote;
144
-
145
- if (strtoupper($this->getConfigData('pm_code')) == 'AFTERPAY') {
146
- if (!$this->checkEqualBillingAndShippingCountry($quote))
147
- return false;
148
-
149
- if (!$this->checkTaxCalculationUnitBase())
150
- return false;
151
- }
152
-
153
- if ($this->getActive() && parent::isAvailable($quote))
154
- return true;
155
-
156
- return false;
157
- }
158
-
159
- private function checkTaxCalculationUnitBase()
160
- {
161
- if (Mage::getModel('tax/config')->getAlgorithm() != Mage_Tax_Model_Calculation::CALC_UNIT_BASE)
162
- return false;
163
-
164
- return true;
165
- }
166
-
167
- private function checkEqualBillingAndShippingCountry($quote)
168
- {
169
- $billingCountry = $quote->getBillingAddress()->getCountry();
170
- $shippingCountry = $quote->getShippingAddress()->getCountry();
171
-
172
- if (isset($billingCountry) && isset($shippingCountry)) {
173
- if ($billingCountry != $shippingCountry) {
174
- return false;
175
- }
176
- }
177
-
178
- return true;
179
- }
180
-
181
- public function getActive()
182
- {
183
- if ($this->getConfigData("active") != 1)
184
- return false;
185
- if ($this->getConfigData("active_issuers") == "")
186
- return false;
187
-
188
- return $this->coreSQL()->isActive(Mage::helper("iceadvanced")->section);
189
- }
190
-
191
- public function getOrderPlaceRedirectUrl()
192
- {
193
- return Mage::getUrl('iceadvanced/processing/pay');
194
- }
195
-
196
- public function setCode($str)
197
- {
198
- $this->_code = $str;
199
- return;
200
- }
201
-
202
- public function canUseForCurrency($currencyCode)
203
- {
204
- return (count($this->filterByCurrency($currencyCode)) > 0);
205
- }
206
-
207
- private function filterByCurrency($currencyCode)
208
- {
209
- $filtered_issuers = array();
210
- foreach ($this->getAvailableIssuers() as $issuer) {
211
- $currencies = unserialize($issuer['issuer_currency']);
212
- if (in_array($currencyCode, $currencies))
213
- $filtered_issuers[] = $issuer;
214
- }
215
- return $filtered_issuers;
216
- }
217
-
218
- public function canUseForCountry($country)
219
- {
220
- if ($this->getConfigData('allowspecific') == 1) {
221
- $availableCountries = explode(',', $this->getConfigData('specificcountry'));
222
- if (!in_array($country, $availableCountries)) {
223
- return false;
224
- }
225
- }
226
-
227
- $this->_avail_issuer = $this->filterByCountry($country);
228
- if (count($this->_avail_issuer) == 0)
229
- return false;
230
-
231
- return true;
232
- }
233
-
234
- private function filterByCountry($country)
235
- {
236
- $filtered_issuers = array();
237
- foreach ($this->getAvailableIssuers() as $issuer) {
238
- $countries = unserialize($issuer['issuer_country']);
239
- if (in_array($country, $countries) || in_array("00", $countries))
240
- $filtered_issuers[] = $issuer;
241
- }
242
- $filtered_issuers = $this->filterByAmountForCountry($filtered_issuers, $country);
243
- return $filtered_issuers;
244
- }
245
-
246
- public function filterByAmountForCountry($issuers, $country)
247
- {
248
- $grandTotal = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();
249
-
250
- // Order is being created from admin
251
- if (is_null($grandTotal)) {
252
- return $issuers;
253
- }
254
-
255
- $grandTotal = $grandTotal * 100;
256
-
257
- $filtered_issuers = array();
258
-
259
- foreach ($issuers as $key => $issuer) {
260
- $issuerMinimum = unserialize($issuer['issuer_minimum']);
261
- $issuerMaximum = unserialize($issuer['issuer_maximum']);
262
- $issuerCountry = unserialize($issuer['issuer_country']);
263
-
264
- $countryValues = array();
265
-
266
- foreach ($issuerCountry as $key => $value) {
267
- $countryValues[$value]['minimum'] = $issuerMinimum[$key];
268
- $countryValues[$value]['maximum'] = $issuerMaximum[$key];
269
- }
270
-
271
- if ((isset($countryValues['00'])) && $grandTotal < $countryValues['00']['maximum'] && $grandTotal > $countryValues['00']['minimum'])
272
- $filtered_issuers[] = $issuer;
273
-
274
- if ((isset($countryValues[$country])) && $grandTotal < $countryValues[$country]['maximum'] && $grandTotal > $countryValues[$country]['minimum'])
275
- $filtered_issuers[] = $issuer;
276
- }
277
-
278
- return $filtered_issuers;
279
- }
280
-
281
- protected function advSQL()
282
- {
283
- if ($this->_advancedSQL == null)
284
- $this->_advancedSQL = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
285
- return $this->_advancedSQL;
286
- }
287
-
288
- protected function coreSQL()
289
- {
290
- if ($this->_coreSQL == null)
291
- $this->_coreSQL = Mage::getSingleton('icecore/mysql4_iceCore');
292
- return $this->_coreSQL;
293
- }
294
-
295
- }
296
-
297
  ?>
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Main Paymentmethod class
5
+ * @version 1.0.2
6
+ * @author Olaf Abbenhuis
7
+ * @author Wouter van Tilburg
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceAdvanced_Model_Checkout_Standard extends Mage_Payment_Model_Method_Abstract {
18
+
19
+ public $_code;
20
+ public $_formBlockType = 'iceadvanced/payment_form_default';
21
+ private $_issuer;
22
+ private $_avail_issuer;
23
+ public $_quote;
24
+ protected $_coreSQL = null;
25
+ protected $_advancedSQL = null;
26
+
27
+ /**
28
+ * Payment Method features
29
+ * @var bool
30
+ */
31
+ public $_isGateway = true;
32
+ public $_canOrder = true;
33
+ public $_canAuthorize = false;
34
+ public $_canCapture = false;
35
+ public $_canCapturePartial = false;
36
+ public $_canRefund = true;
37
+ public $_canRefundInvoicePartial = true;
38
+ public $_canVoid = false;
39
+ public $_canUseInternal = true;
40
+ public $_canUseCheckout = true;
41
+ public $_canUseForMultishipping = false;
42
+ public $_isInitializeNeeded = true;
43
+ public $_canFetchTransactionInfo = false;
44
+ public $_canReviewPayment = false;
45
+ public $_canCreateBillingAgreement = false;
46
+ public $_canManageRecurringProfiles = false;
47
+
48
+ public function __construct()
49
+ {
50
+ $this->advSQL()->setScope(Mage::app()->getStore()->getID());
51
+ if ((int) $this->advSQL()->countPaymentMethods() == 0)
52
+ $this->advSQL()->setScope(0); //Fallback to default store
53
+ }
54
+
55
+ /**
56
+ * Request an online refund
57
+ *
58
+ * @param Varien_Object $payment
59
+ * @param string $amount
60
+ *
61
+ * @since 1.0.2
62
+ * @return \Icepay_IceAdvanced_Model_Checkout_Standard
63
+ */
64
+ public function refund(Varien_Object $payment, $amount)
65
+ {
66
+ // Get Magento Order
67
+ $order = $payment->getOrder();
68
+
69
+ // Get StoreId
70
+ $storeId = $order->getStoreId();
71
+
72
+ // Check if Auto Refund is enabled
73
+ if (!Mage::getStoreConfig(Icepay_IceCore_Model_Config::AUTOREFUND, $storeId))
74
+ return $this;
75
+
76
+ // Fetch ICEPAY merchant settings
77
+ $merchantID = Mage::getStoreConfig(Icepay_IceCore_Model_Config::MERCHANTID, $storeId);
78
+ $secretCode = Mage::getStoreConfig(Icepay_IceCore_Model_Config::SECRETCODE, $storeId);
79
+
80
+ // Get CurrencyCode
81
+ $currency = $order->getOrderCurrencyCode();
82
+
83
+ // Amount must be in cents
84
+ $amount = (int) (string) ($amount * 100);
85
+
86
+ // Fetch ICEPAY Payment ID
87
+ $paymentID = $payment->getLastTransId();
88
+
89
+ // Setup webservice
90
+ $webservice = Mage::getModel('Icepay_IceAdvanced_Model_Webservice_Refund');
91
+ $webservice->init($merchantID, $secretCode);
92
+
93
+ // Request refund
94
+ try {
95
+ $webservice->requestRefund($paymentID, $amount, $currency);
96
+ } catch (Exception $e) {
97
+ Mage::getSingleton('adminhtml/session')->addError("ICEPAY: Refund Failed! {$e->getMessage()}");
98
+ Mage::helper('icecore')->log("ICEPAY: Refund Failed! {$e->getMessage()}");
99
+ }
100
+
101
+ return $this;
102
+ }
103
+
104
+ public function initialize($paymentAction, $stateObject)
105
+ {
106
+ $stateObject->setState(Mage_Sales_Model_Order::STATE_NEW);
107
+ $stateObject->setStatus(Icepay_IceCore_Model_Config::STATUS_MAGENTO_NEW);
108
+ $stateObject->setIsNotified(false);
109
+ }
110
+
111
+ public function getDescription()
112
+ {
113
+ return $this->getConfigData("info");
114
+ }
115
+
116
+ public function getIssuers()
117
+ {
118
+ if (!$this->_issuer)
119
+ $this->_issuer = $this->advSQL()->getIssuersByPMReference($this->_code);
120
+ return $this->_issuer;
121
+ }
122
+
123
+ public function getAvailableIssuers()
124
+ {
125
+ if (!$this->_avail_issuer)
126
+ $this->_avail_issuer = $this->advSQL()->getAvailableIssuers($this->getConfigData("active_issuers"), $this->_code);
127
+
128
+ return $this->_avail_issuer;
129
+ }
130
+
131
+ public function getIssuerOptionArray()
132
+ {
133
+ $options = array();
134
+ foreach ($this->getAvailableIssuers() as $issuer) {
135
+ $options[] = array('value' => $issuer['issuer_code'], 'label' => $issuer['issuer_name']);
136
+ }
137
+
138
+ return $options;
139
+ }
140
+
141
+ public function isAvailable($quote = null)
142
+ {
143
+ $this->_quote = $quote;
144
+
145
+ if (strtoupper($this->getConfigData('pm_code')) == 'AFTERPAY') {
146
+ if (!$this->checkEqualBillingAndShippingCountry($quote))
147
+ return false;
148
+
149
+ if (!$this->checkTaxCalculationUnitBase())
150
+ return false;
151
+ }
152
+
153
+ if ($this->getActive() && parent::isAvailable($quote))
154
+ return true;
155
+
156
+ return false;
157
+ }
158
+
159
+ private function checkTaxCalculationUnitBase()
160
+ {
161
+ if (Mage::getModel('tax/config')->getAlgorithm() != Mage_Tax_Model_Calculation::CALC_UNIT_BASE)
162
+ return false;
163
+
164
+ return true;
165
+ }
166
+
167
+ private function checkEqualBillingAndShippingCountry($quote)
168
+ {
169
+ $billingCountry = $quote->getBillingAddress()->getCountry();
170
+ $shippingCountry = $quote->getShippingAddress()->getCountry();
171
+
172
+ if (isset($billingCountry) && isset($shippingCountry)) {
173
+ if ($billingCountry != $shippingCountry) {
174
+ return false;
175
+ }
176
+ }
177
+
178
+ return true;
179
+ }
180
+
181
+ public function getActive()
182
+ {
183
+ if ($this->getConfigData("active") != 1)
184
+ return false;
185
+ if ($this->getConfigData("active_issuers") == "")
186
+ return false;
187
+
188
+ return $this->coreSQL()->isActive(Mage::helper("iceadvanced")->section);
189
+ }
190
+
191
+ public function getOrderPlaceRedirectUrl()
192
+ {
193
+ return Mage::getUrl('iceadvanced/processing/pay', array('_secure' => true));
194
+ }
195
+
196
+ public function setCode($str)
197
+ {
198
+ $this->_code = $str;
199
+ return;
200
+ }
201
+
202
+ public function canUseForCurrency($currencyCode)
203
+ {
204
+ return (count($this->filterByCurrency($currencyCode)) > 0);
205
+ }
206
+
207
+ private function filterByCurrency($currencyCode)
208
+ {
209
+ $filtered_issuers = array();
210
+ foreach ($this->getAvailableIssuers() as $issuer) {
211
+ $currencies = unserialize($issuer['issuer_currency']);
212
+ if (in_array($currencyCode, $currencies))
213
+ $filtered_issuers[] = $issuer;
214
+ }
215
+ return $filtered_issuers;
216
+ }
217
+
218
+ public function canUseForCountry($country)
219
+ {
220
+ if ($this->getConfigData('allowspecific') == 1) {
221
+ $availableCountries = explode(',', $this->getConfigData('specificcountry'));
222
+ if (!in_array($country, $availableCountries)) {
223
+ return false;
224
+ }
225
+ }
226
+
227
+ $this->_avail_issuer = $this->filterByCountry($country);
228
+ if (count($this->_avail_issuer) == 0)
229
+ return false;
230
+
231
+ return true;
232
+ }
233
+
234
+ private function filterByCountry($country)
235
+ {
236
+ $filtered_issuers = array();
237
+ foreach ($this->getAvailableIssuers() as $issuer) {
238
+ $countries = unserialize($issuer['issuer_country']);
239
+ if (in_array($country, $countries) || in_array("00", $countries))
240
+ $filtered_issuers[] = $issuer;
241
+ }
242
+ $filtered_issuers = $this->filterByAmountForCountry($filtered_issuers, $country);
243
+ return $filtered_issuers;
244
+ }
245
+
246
+ public function filterByAmountForCountry($issuers, $country)
247
+ {
248
+ $grandTotal = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();
249
+
250
+ // Order is being created from admin
251
+ if (is_null($grandTotal)) {
252
+ return $issuers;
253
+ }
254
+
255
+ $grandTotal = $grandTotal * 100;
256
+
257
+ $filtered_issuers = array();
258
+
259
+ foreach ($issuers as $key => $issuer) {
260
+ $issuerMinimum = unserialize($issuer['issuer_minimum']);
261
+ $issuerMaximum = unserialize($issuer['issuer_maximum']);
262
+ $issuerCountry = unserialize($issuer['issuer_country']);
263
+
264
+ $countryValues = array();
265
+
266
+ foreach ($issuerCountry as $key => $value) {
267
+ $countryValues[$value]['minimum'] = $issuerMinimum[$key];
268
+ $countryValues[$value]['maximum'] = $issuerMaximum[$key];
269
+ }
270
+
271
+ if ((isset($countryValues['00'])) && $grandTotal < $countryValues['00']['maximum'] && $grandTotal > $countryValues['00']['minimum'])
272
+ $filtered_issuers[] = $issuer;
273
+
274
+ if ((isset($countryValues[$country])) && $grandTotal < $countryValues[$country]['maximum'] && $grandTotal > $countryValues[$country]['minimum'])
275
+ $filtered_issuers[] = $issuer;
276
+ }
277
+
278
+ return $filtered_issuers;
279
+ }
280
+
281
+ protected function advSQL()
282
+ {
283
+ if ($this->_advancedSQL == null)
284
+ $this->_advancedSQL = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
285
+ return $this->_advancedSQL;
286
+ }
287
+
288
+ protected function coreSQL()
289
+ {
290
+ if ($this->_coreSQL == null)
291
+ $this->_coreSQL = Mage::getSingleton('icecore/mysql4_iceCore');
292
+ return $this->_coreSQL;
293
+ }
294
+
295
+ }
296
+
297
  ?>
app/code/community/Icepay/IceAdvanced/Model/Extensions/MS/Customerreward.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Extensions_MS_Customerreward extends Mage_Payment_Model_Method_Abstract {
4
-
5
- public function addCustomerRewardPrices($orderData, $ic_order)
6
- {
7
- $rawDiscount = $orderData['current_money'];
8
-
9
- $discount = (int) ($rawDiscount * 100);
10
-
11
- $product = $ic_order->createProduct()
12
- ->setProductID('03')
13
- ->setProductName('Reward Points')
14
- ->setDescription('Reward Points')
15
- ->setQuantity(1)
16
- ->setUnitPrice($discount)
17
- ->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage(21))
18
- ;
19
-
20
- $ic_order->addProduct($product);
21
-
22
- return $ic_order;
23
- }
24
-
25
  }
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Extensions_MS_Customerreward extends Mage_Payment_Model_Method_Abstract {
4
+
5
+ public function addCustomerRewardPrices($orderData, $ic_order)
6
+ {
7
+ $rawDiscount = $orderData['current_money'];
8
+
9
+ $discount = (int) ($rawDiscount * 100);
10
+
11
+ $product = $ic_order->createProduct()
12
+ ->setProductID('03')
13
+ ->setProductName('Reward Points')
14
+ ->setDescription('Reward Points')
15
+ ->setQuantity(1)
16
+ ->setUnitPrice($discount)
17
+ ->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage(21))
18
+ ;
19
+
20
+ $ic_order->addProduct($product);
21
+
22
+ return $ic_order;
23
+ }
24
+
25
  }
app/code/community/Icepay/IceAdvanced/Model/Extensions/MW/GiftWrap.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Extensions_MW_GiftWrap extends Mage_Payment_Model_Method_Abstract {
4
-
5
- public function addGiftWrapPrices($quoteID, $ic_order)
6
- {
7
- $collections1 = Mage::getModel('giftwrap/quote')->getCollection()
8
- ->addFieldToFilter('quote_id', array('eq' => $quoteID));
9
-
10
- foreach ($collections1 as $collection1) {
11
- $productID = '00';
12
- $productQuantity = '1';
13
- $giftPrice = $collection1->getPrice();
14
-
15
- $collections2 = Mage::getModel('giftwrap/quoteitem')->getCollection()
16
- ->addFieldToFilter('gw_quote_id', array('eq' => $collection1->getEntityId()));
17
- foreach ($collections2 as $collection2) {
18
- $productID = $collection2->getProductId();
19
- $productQuantity = $collection2->getQuantity();
20
- }
21
-
22
- $product = $ic_order->createProduct()
23
- ->setProductID($productID)
24
- ->setProductName('Gift Wrapping')
25
- ->setDescription('Gift Wrapping')
26
- ->setQuantity($productQuantity)
27
- ->setUnitPrice($giftPrice * 100)
28
- ->setVATCategory($ic_order->getCategoryForPercentage(0))
29
- ;
30
-
31
- $ic_order->addProduct($product);
32
-
33
- return $ic_order;
34
- }
35
- }
36
-
37
  }
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Extensions_MW_GiftWrap extends Mage_Payment_Model_Method_Abstract {
4
+
5
+ public function addGiftWrapPrices($quoteID, $ic_order)
6
+ {
7
+ $collections1 = Mage::getModel('giftwrap/quote')->getCollection()
8
+ ->addFieldToFilter('quote_id', array('eq' => $quoteID));
9
+
10
+ foreach ($collections1 as $collection1) {
11
+ $productID = '00';
12
+ $productQuantity = '1';
13
+ $giftPrice = $collection1->getPrice();
14
+
15
+ $collections2 = Mage::getModel('giftwrap/quoteitem')->getCollection()
16
+ ->addFieldToFilter('gw_quote_id', array('eq' => $collection1->getEntityId()));
17
+ foreach ($collections2 as $collection2) {
18
+ $productID = $collection2->getProductId();
19
+ $productQuantity = $collection2->getQuantity();
20
+ }
21
+
22
+ $product = $ic_order->createProduct()
23
+ ->setProductID($productID)
24
+ ->setProductName('Gift Wrapping')
25
+ ->setDescription('Gift Wrapping')
26
+ ->setQuantity($productQuantity)
27
+ ->setUnitPrice($giftPrice * 100)
28
+ ->setVATCategory($ic_order->getCategoryForPercentage(0))
29
+ ;
30
+
31
+ $ic_order->addProduct($product);
32
+
33
+ return $ic_order;
34
+ }
35
+ }
36
+
37
  }
app/code/community/Icepay/IceAdvanced/Model/Extensions/MageWorx/MultiFees.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- class Icepay_IceAdvanced_Model_Extensions_MageWorx_MultiFees extends Mage_Payment_Model_Method_Abstract {
4
-
5
- private $helper;
6
-
7
- public function __construct()
8
- {
9
- $this->helper = Mage::helper('multifees');
10
- }
11
-
12
- public function addPrice($fee, $ic_order)
13
- {
14
- $feeDetails = $fee[1];
15
-
16
- // Get Total price in cents
17
- $price = (int) (string) ($feeDetails['price'] * 100);
18
-
19
- // Calculate VAT percentage
20
- $vatPercentage = 0;
21
-
22
- if ($feeDetails['tax_class_id'] != '0') {
23
- $tax = (int) (string) ($feeDetails['tax'] * 100);
24
- $priceExTax = $price - $tax;
25
- $vatPercentage = (int)(string)(($tax / $priceExTax) * 100);
26
- }
27
-
28
- $product = $ic_order->createProduct()
29
- ->setProductID('00')
30
- ->setProductName($feeDetails['title'])
31
- ->setDescription($feeDetails['options'][1]['title'])
32
- ->setQuantity('1')
33
- ->setUnitPrice($price)
34
- ->setVATCategory($ic_order->getCategoryForPercentage($vatPercentage))
35
- ;
36
-
37
- $ic_order->addProduct($product);
38
-
39
- return $ic_order;
40
- }
41
-
42
- }
1
+ <?php
2
+
3
+ class Icepay_IceAdvanced_Model_Extensions_MageWorx_MultiFees extends Mage_Payment_Model_Method_Abstract {
4
+
5
+ private $helper;
6
+
7
+ public function __construct()
8
+ {
9
+ $this->helper = Mage::helper('multifees');
10
+ }
11
+
12
+ public function addPrice($fee, $ic_order)
13
+ {
14
+ $feeDetails = $fee[1];
15
+
16
+ // Get Total price in cents
17
+ $price = (int) (string) ($feeDetails['price'] * 100);
18
+
19
+ // Calculate VAT percentage
20
+ $vatPercentage = 0;
21
+
22
+ if ($feeDetails['tax_class_id'] != '0') {
23
+ $tax = (int) (string) ($feeDetails['tax'] * 100);
24
+ $priceExTax = $price - $tax;
25
+ $vatPercentage = (int)(string)(($tax / $priceExTax) * 100);
26
+ }
27
+
28
+ $product = $ic_order->createProduct()
29
+ ->setProductID('00')
30
+ ->setProductName($feeDetails['title'])
31
+ ->setDescription($feeDetails['options'][1]['title'])
32
+ ->setQuantity('1')
33
+ ->setUnitPrice($price)
34
+ ->setVATCategory($ic_order->getCategoryForPercentage($vatPercentage))
35
+ ;
36
+
37
+ $ic_order->addProduct($product);
38
+
39
+ return $ic_order;
40
+ }
41
+
42
+ }
app/code/community/Icepay/IceAdvanced/Model/Mysql4/IceAdvanced.php CHANGED
@@ -1,415 +1,415 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Database model
5
- * @version 1.0.1
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceAdvanced_Model_Mysql4_IceAdvanced extends Mage_Core_Model_Mysql4_Abstract {
17
-
18
- private $issuer_table = 'icepay_issuerdata';
19
- private $pm_table = 'icepay_pmdata';
20
- private $db = null;
21
- private $_reference = "icepayadv_%s";
22
- private $_standardModel = "iceadvanced/checkout_placeholder_paymentmethod%s";
23
- private $scope = null;
24
-
25
- public function _construct()
26
- {
27
- // Note that the basicgateway_id refers to the key field in your database table.
28
- $this->_init('icecore/icecore', 'icecore_id');
29
- }
30
-
31
- private function doSQL()
32
- {
33
- if ($this->db == null)
34
- $this->db = $this->_getReadAdapter();
35
- return $this->db;
36
- }
37
-
38
- public function getPaymentmethods()
39
- {
40
- $config = array();
41
- $mod_code = $this->getConfigData("code");
42
- $mod_title = $this->getConfigData("title");
43
- $mod_active = $this->getConfigData("active");
44
- $mod_issuers = $this->getConfigData("issuer");
45
- $mod_info = $this->getConfigData("info");
46
-
47
- for ($i = 0; $i < count($mod_title); $i++) {
48
- array_push($config, array(
49
- 'code' => $mod_code[$i]["value"],
50
- 'name' => $mod_title[$i]["value"],
51
- 'info' => $mod_info[$i]["value"],
52
- 'issuers' => $mod_issuers[$i]["value"],
53
- 'active' => $mod_active[$i]["value"]
54
- ));
55
- }
56
-
57
- return $config;
58
- }
59
-
60
- public function getPaymentmethodsForConfig()
61
- {
62
- $config = array();
63
-
64
- $mod_title = array();
65
-
66
- for ($i = 0; $i < count($mod_title); $i++) {
67
- array_push($config, array(
68
- 'code' => $mod_code[$i]["value"],
69
- 'name' => $mod_title[$i]["value"],
70
- 'info' => $mod_info[$i]["value"],
71
- 'issuers' => $mod_issuers[$i]["value"],
72
- 'active' => $mod_active[$i]["value"]
73
- ));
74
- };
75
-
76
- return $config;
77
- }
78
-
79
- public function getAdminPaymentmethodConfigForStore($storeScope)
80
- {
81
- $this->setScope($storeScope);
82
-
83
- $total = $this->getAllConfigData();
84
- $returnArr = array();
85
-
86
- foreach ($total as $pm) {
87
- array_push($returnArr, array(
88
- 'code' => $pm["config"]["pm_code"],
89
- 'name' => $pm["config"]["title"],
90
- 'issuers' => count($pm["issuers"]),
91
- 'active' => $pm["config"]["active"],
92
- 'info' => "",
93
- 'image' => Mage::helper("icecore")->toIcon($pm["config"]["pm_code"])
94
- ));
95
- }
96
-
97
- return $returnArr;
98
- }
99
-
100
- public function setScope($storeScope)
101
- {
102
- /* allow overrides in same instance */
103
- //if ($this->scope != null) return;
104
- $this->scope = new stdClass();
105
- $this->scope->scope = ((int) $storeScope == 0) ? "default" : "stores";
106
- $this->scope->ID = $storeScope;
107
- }
108
-
109
- private function getScope()
110
- {
111
- return $this->scope;
112
- }
113
-
114
- private function getPMIDbyCode($code)
115
- {
116
- $pm = $this->getPMbyCode($code);
117
- return $pm['pm_id'];
118
- }
119
-
120
- public function getPMbyCode($code)
121
- {
122
- $select = $this->doSQL()
123
- ->select()
124
- ->from($this->getTable("iceadvanced/{$this->pm_table}"), array('pm_id'))
125
- ->where('pm_code=?', $code);
126
- return $this->doSQL()->fetchRow($select);
127
- }
128
-
129
- private function getModelFromID($id)
130
- {
131
- $sref = $this->createSrefFromID($id);
132
- return $this->getModelFromSref($sref);
133
- }
134
-
135
- private function getModelFromSref($sref)
136
- {
137
- return sprintf($this->_standardModel, $sref);
138
- }
139
-
140
- private function getReferenceFromID($id)
141
- {
142
- $ref = $this->createSrefFromID($id);
143
- return $this->getReferenceFromSref($ref);
144
- }
145
-
146
- private function getReferenceFromSref($sref)
147
- {
148
- return sprintf($this->_reference, $sref);
149
- }
150
-
151
- public function getReferenceFromPMCode($code)
152
- {
153
- return $this->getReferenceFromID($this->getPMIDbyCode($code));
154
- }
155
-
156
- private function createSrefFromID($id)
157
- {
158
- $id = intval($id);
159
- if ($id < 10)
160
- return "0{$id}";
161
- return "{$id}";
162
- }
163
-
164
- public function clearConfig()
165
- {
166
- // Clear the issuer table
167
- $condition = array('store_scope_id = ?' => $this->getScope()->ID);
168
- $this->doSQL()->delete($this->getTable("iceadvanced/{$this->issuer_table}"), $condition);
169
-
170
- $condition = array('store_scope_id = ?' => Mage::app()->getStore()->getId());
171
- $this->doSQL()->delete($this->getTable("iceadvanced/{$this->issuer_table}"), $condition);
172
-
173
- // Disable the config data
174
- $where = array('path LIKE ?' => "payment/icepayadv___/active",
175
- 'scope = ?' => $this->getScope()->scope,
176
- 'scope_id = ?' => $this->getScope()->ID
177
- );
178
- $data["value"] = 0;
179
- $this->doSQL()->update(
180
- $this->getTable('core/config_data'), $data, $where
181
- );
182
- }
183
-
184
- public function savePaymentMethod($code, $merchant, $storeScope, $issuerlist)
185
- {
186
- $id = $this->getPMIDbyCode($code);
187
- /* create main paymentmethod if not exists */
188
- if (!$id) {
189
- $this->doSQL()->insertOnDuplicate(
190
- $this->getTable("iceadvanced/{$this->pm_table}"), array(
191
- 'pm_code' => $code
192
- ), array('pm_code')
193
- );
194
- $id = $this->getPMIDbyCode($code);
195
- }
196
-
197
- $this->setScope($storeScope);
198
-
199
- /* Save payment configuration for store view */
200
-
201
- $this->saveConfigValue($this->getReferenceFromID($id), "model", $this->getModelFromID($id));
202
- $this->saveConfigValue($this->getReferenceFromID($id), "group", "icepay");
203
- $this->saveConfigValue($this->getReferenceFromID($id), "pm_code", $code);
204
- $this->saveConfigValue($this->getReferenceFromID($id), "pm_id", $id);
205
- $this->saveConfigValue($this->getReferenceFromID($id), "pm_ref", $this->getReferenceFromID($id));
206
-
207
- $this->saveConfigValue($this->getReferenceFromID($id), "description", "");
208
- $this->saveConfigValue($this->getReferenceFromID($id), "allowspecific", 0);
209
- $this->saveConfigValue($this->getReferenceFromID($id), "specificcountry", "");
210
- $this->saveConfigValue($this->getReferenceFromID($id), "sort_order", $id);
211
- $this->saveConfigValue($this->getReferenceFromID($id), "min_order_total", "");
212
- $this->saveConfigValue($this->getReferenceFromID($id), "max_order_total", "");
213
-
214
- $this->saveConfigValue($this->getReferenceFromID($id), "active_issuers", $issuerlist);
215
- }
216
-
217
- public function saveIssuer($storeScope, $code, $merchant, $issuercode, $issuername, $countries, $currencies, $languages, $minimum, $maximum)
218
- {
219
- $id = $this->getPMIDbyCode($code);
220
-
221
- $this->setScope($storeScope);
222
-
223
- $result = $this->doSQL()->insertOnDuplicate(
224
- $this->getTable("iceadvanced/{$this->issuer_table}"), array(
225
- 'pm_code' => $code,
226
- 'store_scope_id' => $this->getScope()->ID,
227
- 'merchant_id' => $merchant,
228
- 'magento_code' => $this->getReferenceFromID($id),
229
- 'issuer_code' => $issuercode,
230
- 'issuer_name' => $issuername,
231
- 'issuer_country' => $this->arrEncode($countries),
232
- 'issuer_currency' => $this->arrEncode($currencies),
233
- 'issuer_language' => $this->arrEncode($languages),
234
- 'issuer_minimum' => $this->arrEncode($minimum),
235
- 'issuer_maximum' => $this->arrEncode($maximum)
236
- ), array('issuer_code')
237
- );
238
-
239
- $select = $this->doSQL()
240
- ->select()
241
- ->from($this->getTable("iceadvanced/{$this->issuer_table}"))
242
- ->where('magento_code=?', $this->getReferenceFromID($id))
243
- ->where('store_scope_id =?', Mage::app()->getStore()->getId())
244
- ->where('issuer_name =?', $issuername);
245
- $res = $this->doSQL()->fetchRow($select);
246
-
247
- if (!$res) {
248
- $result = $this->doSQL()->insertOnDuplicate(
249
- $this->getTable("iceadvanced/{$this->issuer_table}"), array(
250
- 'pm_code' => $code,
251
- 'store_scope_id' => Mage::app()->getStore()->getId(),
252
- 'merchant_id' => $merchant,
253
- 'magento_code' => $this->getReferenceFromID($id),
254
- 'issuer_code' => $issuercode,
255
- 'issuer_name' => $issuername,
256
- 'issuer_country' => $this->arrEncode($countries),
257
- 'issuer_currency' => $this->arrEncode($currencies),
258
- 'issuer_language' => $this->arrEncode($languages),
259
- 'issuer_minimum' => $this->arrEncode($minimum),
260
- 'issuer_maximum' => $this->arrEncode($maximum)
261
- ), array('issuer_code')
262
- );
263
- }
264
- }
265
-
266
- public function saveConfigFromAdmin($code, $option, $value)
267
- {
268
- $this->saveConfigValue($this->getReferenceFromPMCode($code), $option, $value);
269
- }
270
-
271
- public function saveConfigValue($reference, $option, $value)
272
- {
273
- $this->doSQL()->insertOnDuplicate(
274
- $this->getTable('core/config_data'), array(
275
- 'path' => "payment/{$reference}/{$option}",
276
- 'value' => $value,
277
- 'scope' => $this->getScope()->scope,
278
- 'scope_id' => $this->getScope()->ID
279
- ), array('value')
280
- );
281
-
282
- $this->doSQL()->insertOnDuplicate(
283
- $this->getTable('core/config_data'), array(
284
- 'path' => "payment/{$reference}/{$option}",
285
- 'value' => $value,
286
- 'scope' => 'default',
287
- 'scope_id' => Mage::app()->getStore()->getId()
288
- ), array('value')
289
- );
290
- }
291
-
292
- private function getPaymentMethodIDs()
293
- {
294
- $select = $this->doSQL()
295
- ->select()
296
- ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path', 'value'))
297
- ->where(new Zend_Db_Expr("path LIKE 'payment/icepayadv_%%/pm_ref'"))
298
- ->where('scope=?', $this->getScope()->scope)
299
- ->where('scope_id=?', $this->getScope()->ID)
300
- ->order('path');
301
- return $this->doSQL()->fetchAll($select);
302
- }
303
-
304
- public function getAvailableIssuers($activeIssuers, $reference)
305
- {
306
- $issuers = explode(",", $activeIssuers);
307
- $arr = array();
308
- foreach ($issuers as $issuer) {
309
- $arr[] = $this->getIssuerData($issuer, $reference);
310
- }
311
- return $arr;
312
- }
313
-
314
- public function getIssuerData($issuerCode, $reference)
315
- {
316
- $select = $this->doSQL()
317
- ->select()
318
- ->from($this->getTable("iceadvanced/{$this->issuer_table}"))
319
- ->where('magento_code=?', $reference)
320
- ->where('store_scope_id=?', $this->getScope()->ID)
321
- ->where('issuer_code=?', $issuerCode);
322
- return $this->doSQL()->fetchRow($select);
323
- }
324
-
325
- public function getIssuersByPMReference($reference)
326
- {
327
- $select = $this->doSQL()
328
- ->select()
329
- ->from($this->getTable("iceadvanced/{$this->issuer_table}"))
330
- ->where('magento_code=?', $reference)
331
- ->where('store_scope_id=?', $this->getScope()->ID)
332
- ->order('config_id');
333
- return $this->doSQL()->fetchAll($select);
334
- }
335
-
336
- private function getPaymentMethodDataByReference($ref)
337
- {
338
- $select = $this->doSQL()
339
- ->select()
340
- ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path', 'value'))
341
- ->where(new Zend_Db_Expr("path LIKE 'payment/" . $ref . "/%'"))
342
- ->where('scope=?', $this->getScope()->scope)
343
- ->where('scope_id=?', $this->getScope()->ID)
344
- ->order('path');
345
-
346
- return $this->doSQL()->fetchAll($select);
347
- }
348
-
349
- public function getPaymentMethodDataArrayByReference($ref)
350
- {
351
- $data = $this->getPaymentMethodDataByReference($ref);
352
- $returnArr = array();
353
- foreach ($data as $value) {
354
- $returnArr[$this->getFieldName($value["path"])] = $value["value"];
355
- }
356
- return $returnArr;
357
- }
358
-
359
- private function getFieldName($configValue)
360
- {
361
- $arr = explode("/", $configValue);
362
- return $arr[2];
363
- }
364
-
365
- public function getAllConfigData()
366
- {
367
- $pms = $this->getPaymentMethodIDs();
368
- $returnArr = array();
369
-
370
- foreach ($pms as $value) {
371
- array_push($returnArr, $this->getConfigDataByReference($value["value"]));
372
- }
373
-
374
- return $returnArr;
375
- }
376
-
377
- public function getConfigDataByReference($reference)
378
- {
379
-
380
- return array(
381
- "reference" => $reference,
382
- "config" => $this->getPaymentMethodDataArrayByReference($reference),
383
- "issuers" => $this->getIssuersByPMReference($reference)
384
- );
385
- }
386
-
387
- public function arrEncode($arr)
388
- {
389
- return serialize($arr);
390
- return urlencode(serialize($arr));
391
- }
392
-
393
- public function arrDecode($str)
394
- {
395
- return unserialize(urldecode($str));
396
- }
397
-
398
- /* Used for admin count and also to fallback to default if no paymentmethods are found for the current store view */
399
-
400
- public function countPaymentMethods()
401
- {
402
- $select = $this->doSQL()
403
- ->select()
404
- ->from($this->getTable('core/config_data'), array('count(value)'))
405
- ->where(new Zend_Db_Expr("path LIKE 'payment/icepayadv___/title'"))
406
- ->where('scope=?', $this->getScope()->scope)
407
- ->where('scope_id=?', $this->getScope()->ID)
408
- ->order('path');
409
- $data = $this->doSQL()->fetchRow($select);
410
- return $data["count(value)"];
411
- }
412
-
413
- }
414
-
415
- ?>
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Database model
5
+ * @version 1.0.1
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceAdvanced_Model_Mysql4_IceAdvanced extends Mage_Core_Model_Mysql4_Abstract {
17
+
18
+ private $issuer_table = 'icepay_issuerdata';
19
+ private $pm_table = 'icepay_pmdata';
20
+ private $db = null;
21
+ private $_reference = "icepayadv_%s";
22
+ private $_standardModel = "iceadvanced/checkout_placeholder_paymentmethod%s";
23
+ private $scope = null;
24
+
25
+ public function _construct()
26
+ {
27
+ // Note that the basicgateway_id refers to the key field in your database table.
28
+ $this->_init('icecore/icecore', 'icecore_id');
29
+ }
30
+
31
+ private function doSQL()
32
+ {
33
+ if ($this->db == null)
34
+ $this->db = $this->_getReadAdapter();
35
+ return $this->db;
36
+ }
37
+
38
+ public function getPaymentmethods()
39
+ {
40
+ $config = array();
41
+ $mod_code = $this->getConfigData("code");
42
+ $mod_title = $this->getConfigData("title");
43
+ $mod_active = $this->getConfigData("active");
44
+ $mod_issuers = $this->getConfigData("issuer");
45
+ $mod_info = $this->getConfigData("info");
46
+
47
+ for ($i = 0; $i < count($mod_title); $i++) {
48
+ array_push($config, array(
49
+ 'code' => $mod_code[$i]["value"],
50
+ 'name' => $mod_title[$i]["value"],
51
+ 'info' => $mod_info[$i]["value"],
52
+ 'issuers' => $mod_issuers[$i]["value"],
53
+ 'active' => $mod_active[$i]["value"]
54
+ ));
55
+ }
56
+
57
+ return $config;
58
+ }
59
+
60
+ public function getPaymentmethodsForConfig()
61
+ {
62
+ $config = array();
63
+
64
+ $mod_title = array();
65
+
66
+ for ($i = 0; $i < count($mod_title); $i++) {
67
+ array_push($config, array(
68
+ 'code' => $mod_code[$i]["value"],
69
+ 'name' => $mod_title[$i]["value"],
70
+ 'info' => $mod_info[$i]["value"],
71
+ 'issuers' => $mod_issuers[$i]["value"],
72
+ 'active' => $mod_active[$i]["value"]
73
+ ));
74
+ };
75
+
76
+ return $config;
77
+ }
78
+
79
+ public function getAdminPaymentmethodConfigForStore($storeScope)
80
+ {
81
+ $this->setScope($storeScope);
82
+
83
+ $total = $this->getAllConfigData();
84
+ $returnArr = array();
85
+
86
+ foreach ($total as $pm) {
87
+ array_push($returnArr, array(
88
+ 'code' => $pm["config"]["pm_code"],
89
+ 'name' => $pm["config"]["title"],
90
+ 'issuers' => count($pm["issuers"]),
91
+ 'active' => $pm["config"]["active"],
92
+ 'info' => "",
93
+ 'image' => Mage::helper("icecore")->toIcon($pm["config"]["pm_code"])
94
+ ));
95
+ }
96
+
97
+ return $returnArr;
98
+ }
99
+
100
+ public function setScope($storeScope)
101
+ {
102
+ /* allow overrides in same instance */
103
+ //if ($this->scope != null) return;
104
+ $this->scope = new stdClass();
105
+ $this->scope->scope = ((int) $storeScope == 0) ? "default" : "stores";
106
+ $this->scope->ID = $storeScope;
107
+ }
108
+
109
+ private function getScope()
110
+ {
111
+ return $this->scope;
112
+ }
113
+
114
+ private function getPMIDbyCode($code)
115
+ {
116
+ $pm = $this->getPMbyCode($code);
117
+ return $pm['pm_id'];
118
+ }
119
+
120
+ public function getPMbyCode($code)
121
+ {
122
+ $select = $this->doSQL()
123
+ ->select()
124
+ ->from($this->getTable("iceadvanced/{$this->pm_table}"), array('pm_id'))
125
+ ->where('pm_code=?', $code);
126
+ return $this->doSQL()->fetchRow($select);
127
+ }
128
+
129
+ private function getModelFromID($id)
130
+ {
131
+ $sref = $this->createSrefFromID($id);
132
+ return $this->getModelFromSref($sref);
133
+ }
134
+
135
+ private function getModelFromSref($sref)
136
+ {
137
+ return sprintf($this->_standardModel, $sref);
138
+ }
139
+
140
+ private function getReferenceFromID($id)
141
+ {
142
+ $ref = $this->createSrefFromID($id);
143
+ return $this->getReferenceFromSref($ref);
144
+ }
145
+
146
+ private function getReferenceFromSref($sref)
147
+ {
148
+ return sprintf($this->_reference, $sref);
149
+ }
150
+
151
+ public function getReferenceFromPMCode($code)
152
+ {
153
+ return $this->getReferenceFromID($this->getPMIDbyCode($code));
154
+ }
155
+
156
+ private function createSrefFromID($id)
157
+ {
158
+ $id = intval($id);
159
+ if ($id < 10)
160
+ return "0{$id}";
161
+ return "{$id}";
162
+ }
163
+
164
+ public function clearConfig()
165
+ {
166
+ // Clear the issuer table
167
+ $condition = array('store_scope_id = ?' => $this->getScope()->ID);
168
+ $this->doSQL()->delete($this->getTable("iceadvanced/{$this->issuer_table}"), $condition);
169
+
170
+ $condition = array('store_scope_id = ?' => Mage::app()->getStore()->getId());
171
+ $this->doSQL()->delete($this->getTable("iceadvanced/{$this->issuer_table}"), $condition);
172
+
173
+ // Disable the config data
174
+ $where = array('path LIKE ?' => "payment/icepayadv___/active",
175
+ 'scope = ?' => $this->getScope()->scope,
176
+ 'scope_id = ?' => $this->getScope()->ID
177
+ );
178
+ $data["value"] = 0;
179
+ $this->doSQL()->update(
180
+ $this->getTable('core/config_data'), $data, $where
181
+ );
182
+ }
183
+
184
+ public function savePaymentMethod($code, $merchant, $storeScope, $issuerlist)
185
+ {
186
+ $id = $this->getPMIDbyCode($code);
187
+ /* create main paymentmethod if not exists */
188
+ if (!$id) {
189
+ $this->doSQL()->insertOnDuplicate(
190
+ $this->getTable("iceadvanced/{$this->pm_table}"), array(
191
+ 'pm_code' => $code
192
+ ), array('pm_code')
193
+ );
194
+ $id = $this->getPMIDbyCode($code);
195
+ }
196
+
197
+ $this->setScope($storeScope);
198
+
199
+ /* Save payment configuration for store view */
200
+
201
+ $this->saveConfigValue($this->getReferenceFromID($id), "model", $this->getModelFromID($id));
202
+ $this->saveConfigValue($this->getReferenceFromID($id), "group", "icepay");
203
+ $this->saveConfigValue($this->getReferenceFromID($id), "pm_code", $code);
204
+ $this->saveConfigValue($this->getReferenceFromID($id), "pm_id", $id);
205
+ $this->saveConfigValue($this->getReferenceFromID($id), "pm_ref", $this->getReferenceFromID($id));
206
+
207
+ $this->saveConfigValue($this->getReferenceFromID($id), "description", "");
208
+ $this->saveConfigValue($this->getReferenceFromID($id), "allowspecific", 0);
209
+ $this->saveConfigValue($this->getReferenceFromID($id), "specificcountry", "");
210
+ $this->saveConfigValue($this->getReferenceFromID($id), "sort_order", $id);
211
+ $this->saveConfigValue($this->getReferenceFromID($id), "min_order_total", "");
212
+ $this->saveConfigValue($this->getReferenceFromID($id), "max_order_total", "");
213
+
214
+ $this->saveConfigValue($this->getReferenceFromID($id), "active_issuers", $issuerlist);
215
+ }
216
+
217
+ public function saveIssuer($storeScope, $code, $merchant, $issuercode, $issuername, $countries, $currencies, $languages, $minimum, $maximum)
218
+ {
219
+ $id = $this->getPMIDbyCode($code);
220
+
221
+ $this->setScope($storeScope);
222
+
223
+ $result = $this->doSQL()->insertOnDuplicate(
224
+ $this->getTable("iceadvanced/{$this->issuer_table}"), array(
225
+ 'pm_code' => $code,
226
+ 'store_scope_id' => $this->getScope()->ID,
227
+ 'merchant_id' => $merchant,
228
+ 'magento_code' => $this->getReferenceFromID($id),
229
+ 'issuer_code' => $issuercode,
230
+ 'issuer_name' => $issuername,
231
+ 'issuer_country' => $this->arrEncode($countries),
232
+ 'issuer_currency' => $this->arrEncode($currencies),
233
+ 'issuer_language' => $this->arrEncode($languages),
234
+ 'issuer_minimum' => $this->arrEncode($minimum),
235
+ 'issuer_maximum' => $this->arrEncode($maximum)
236
+ ), array('issuer_code')
237
+ );
238
+
239
+ $select = $this->doSQL()
240
+ ->select()
241
+ ->from($this->getTable("iceadvanced/{$this->issuer_table}"))
242
+ ->where('magento_code=?', $this->getReferenceFromID($id))
243
+ ->where('store_scope_id =?', Mage::app()->getStore()->getId())
244
+ ->where('issuer_name =?', $issuername);
245
+ $res = $this->doSQL()->fetchRow($select);
246
+
247
+ if (!$res) {
248
+ $result = $this->doSQL()->insertOnDuplicate(
249
+ $this->getTable("iceadvanced/{$this->issuer_table}"), array(
250
+ 'pm_code' => $code,
251
+ 'store_scope_id' => Mage::app()->getStore()->getId(),
252
+ 'merchant_id' => $merchant,
253
+ 'magento_code' => $this->getReferenceFromID($id),
254
+ 'issuer_code' => $issuercode,
255
+ 'issuer_name' => $issuername,
256
+ 'issuer_country' => $this->arrEncode($countries),
257
+ 'issuer_currency' => $this->arrEncode($currencies),
258
+ 'issuer_language' => $this->arrEncode($languages),
259
+ 'issuer_minimum' => $this->arrEncode($minimum),
260
+ 'issuer_maximum' => $this->arrEncode($maximum)
261
+ ), array('issuer_code')
262
+ );
263
+ }
264
+ }
265
+
266
+ public function saveConfigFromAdmin($code, $option, $value)
267
+ {
268
+ $this->saveConfigValue($this->getReferenceFromPMCode($code), $option, $value);
269
+ }
270
+
271
+ public function saveConfigValue($reference, $option, $value)
272
+ {
273
+ $this->doSQL()->insertOnDuplicate(
274
+ $this->getTable('core/config_data'), array(
275
+ 'path' => "payment/{$reference}/{$option}",
276
+ 'value' => $value,
277
+ 'scope' => $this->getScope()->scope,
278
+ 'scope_id' => $this->getScope()->ID
279
+ ), array('value')
280
+ );
281
+
282
+ $this->doSQL()->insertOnDuplicate(
283
+ $this->getTable('core/config_data'), array(
284
+ 'path' => "payment/{$reference}/{$option}",
285
+ 'value' => $value,
286
+ 'scope' => 'default',
287
+ 'scope_id' => Mage::app()->getStore()->getId()
288
+ ), array('value')
289
+ );
290
+ }
291
+
292
+ private function getPaymentMethodIDs()
293
+ {
294
+ $select = $this->doSQL()
295
+ ->select()
296
+ ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path', 'value'))
297
+ ->where(new Zend_Db_Expr("path LIKE 'payment/icepayadv_%%/pm_ref'"))
298
+ ->where('scope=?', $this->getScope()->scope)
299
+ ->where('scope_id=?', $this->getScope()->ID)
300
+ ->order('path');
301
+ return $this->doSQL()->fetchAll($select);
302
+ }
303
+
304
+ public function getAvailableIssuers($activeIssuers, $reference)
305
+ {
306
+ $issuers = explode(",", $activeIssuers);
307
+ $arr = array();
308
+ foreach ($issuers as $issuer) {
309
+ $arr[] = $this->getIssuerData($issuer, $reference);
310
+ }
311
+ return $arr;
312
+ }
313
+
314
+ public function getIssuerData($issuerCode, $reference)
315
+ {
316
+ $select = $this->doSQL()
317
+ ->select()
318
+ ->from($this->getTable("iceadvanced/{$this->issuer_table}"))
319
+ ->where('magento_code=?', $reference)
320
+ ->where('store_scope_id=?', $this->getScope()->ID)
321
+ ->where('issuer_code=?', $issuerCode);
322
+ return $this->doSQL()->fetchRow($select);
323
+ }
324
+
325
+ public function getIssuersByPMReference($reference)
326
+ {
327
+ $select = $this->doSQL()
328
+ ->select()
329
+ ->from($this->getTable("iceadvanced/{$this->issuer_table}"))
330
+ ->where('magento_code=?', $reference)
331
+ ->where('store_scope_id=?', $this->getScope()->ID)
332
+ ->order('config_id');
333
+ return $this->doSQL()->fetchAll($select);
334
+ }
335
+
336
+ private function getPaymentMethodDataByReference($ref)
337
+ {
338
+ $select = $this->doSQL()
339
+ ->select()
340
+ ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path', 'value'))
341
+ ->where(new Zend_Db_Expr("path LIKE 'payment/" . $ref . "/%'"))
342
+ ->where('scope=?', $this->getScope()->scope)
343
+ ->where('scope_id=?', $this->getScope()->ID)
344
+ ->order('path');
345
+
346
+ return $this->doSQL()->fetchAll($select);
347
+ }
348
+
349
+ public function getPaymentMethodDataArrayByReference($ref)
350
+ {
351
+ $data = $this->getPaymentMethodDataByReference($ref);
352
+ $returnArr = array();
353
+ foreach ($data as $value) {
354
+ $returnArr[$this->getFieldName($value["path"])] = $value["value"];
355
+ }
356
+ return $returnArr;
357
+ }
358
+
359
+ private function getFieldName($configValue)
360
+ {
361
+ $arr = explode("/", $configValue);
362
+ return $arr[2];
363
+ }
364
+
365
+ public function getAllConfigData()
366
+ {
367
+ $pms = $this->getPaymentMethodIDs();
368
+ $returnArr = array();
369
+
370
+ foreach ($pms as $value) {
371
+ array_push($returnArr, $this->getConfigDataByReference($value["value"]));
372
+ }
373
+
374
+ return $returnArr;
375
+ }
376
+
377
+ public function getConfigDataByReference($reference)
378
+ {
379
+
380
+ return array(
381
+ "reference" => $reference,
382
+ "config" => $this->getPaymentMethodDataArrayByReference($reference),
383
+ "issuers" => $this->getIssuersByPMReference($reference)
384
+ );
385
+ }
386
+
387
+ public function arrEncode($arr)
388
+ {
389
+ return serialize($arr);
390
+ return urlencode(serialize($arr));
391
+ }
392
+
393
+ public function arrDecode($str)
394
+ {
395
+ return unserialize(urldecode($str));
396
+ }
397
+
398
+ /* Used for admin count and also to fallback to default if no paymentmethods are found for the current store view */
399
+
400
+ public function countPaymentMethods()
401
+ {
402
+ $select = $this->doSQL()
403
+ ->select()
404
+ ->from($this->getTable('core/config_data'), array('count(value)'))
405
+ ->where(new Zend_Db_Expr("path LIKE 'payment/icepayadv___/title'"))
406
+ ->where('scope=?', $this->getScope()->scope)
407
+ ->where('scope_id=?', $this->getScope()->ID)
408
+ ->order('path');
409
+ $data = $this->doSQL()->fetchRow($select);
410
+ return $data["count(value)"];
411
+ }
412
+
413
+ }
414
+
415
+ ?>
app/code/community/Icepay/IceAdvanced/Model/Observer.php CHANGED
@@ -1,311 +1,315 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Observer to save admin paymentmethods and save checkout payment
5
- * @version 1.2.0
6
- * @author Wouter van Tilburg
7
- * @author Olaf Abbenhuis
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceAdvanced_Model_Observer extends Mage_Payment_Block_Form_Container
18
- {
19
-
20
- public $_currencyArr = array();
21
- public $_countryArr = array();
22
- public $_minimumAmountArr = array();
23
- public $_maximumAmountArr = array();
24
- private $_setting = array();
25
- private $_issuers = array();
26
- private $_value;
27
- private $_advancedSQL = null;
28
- private $_coreSQL = null;
29
-
30
- /**
31
- * Checks if an Icepay quote id is set, if so make the checkout session active
32
- * Note: This is done so cancelled orders no longer have an empty card upon returning
33
- *
34
- * @param Varien_Event_Observer $observer
35
- *
36
- * @since 1.2.0
37
- * @author Wouter van Tilburg
38
- * @return \Varien_Event_Observer
39
- */
40
- public function custom_quote_process(Varien_Event_Observer $observer)
41
- {
42
- $session = Mage::getSingleton('core/session');
43
- $quoteID = $session->getData('ic_quoteid');
44
-
45
- if (!is_null($quoteID)) {
46
- $quoteDate = $session->getData('ic_quotedate');
47
-
48
- $diff = abs(strtotime(date("Y-m-d H:i:s")) - strtotime($quoteDate));
49
-
50
- if ($diff < 360) {
51
- $observer['checkout_session']->setQuoteId($quoteID);
52
- $observer['checkout_session']->setLoadInactive(true);
53
- }
54
- }
55
-
56
- return $observer;
57
- }
58
-
59
- /**
60
- * sales_order_place_before
61
- *
62
- * @param Varien_Event_Observer $observer
63
- *
64
- * @since 1.2.0
65
- * @author Wouter van Tilburg
66
- * @return \Icepay_IceAdvanced_Model_Observer
67
- */
68
- public function sales_order_place_before(Varien_Event_Observer $observer)
69
- {
70
- $quote = Mage::getSingleton('checkout/session')->getQuote();
71
-
72
- $paymentMethodCode = $quote->getPayment()->getMethodInstance()->getCode();
73
- $paymentMethodTitle = $quote->getPayment()->getMethodInstance()->getTitle();
74
-
75
- if (false === strpos($paymentMethodCode, 'icepayadv_'))
76
- return;
77
-
78
- if (strtoupper($paymentMethodTitle) == 'AFTERPAY')
79
- $this->initAfterpayValidation($quote);
80
-
81
- return $this;
82
- }
83
-
84
- /**
85
- * Validate additional information (Only for Afterpay)
86
- *
87
- * @param Object $quote
88
- *
89
- * @since 1.2.0
90
- * @author Wouter van Tilburg
91
- * @throws Mage_Payment_Model_Info_Exception
92
- */
93
- public function initAfterpayValidation($observer)
94
- {
95
- $billingAddress = $observer->getBillingAddress();
96
- $shippingAddress = $observer->getShippingAddress();
97
-
98
- $billingCountry = $billingAddress->getCountry();
99
-
100
- $errorMessage = false;
101
-
102
- // Validate postcode
103
- if (!Mage::Helper('iceadvanced')->validatePostCode($billingCountry, $billingAddress->getPostcode()))
104
- $errorMessage = Mage::helper('iceadvanced')->__('It seems your billing address is incorrect, please confirm the postal code.');
105
-
106
- // Validate phonenumber
107
- if (!Mage::Helper('iceadvanced')->validatePhonenumber($billingCountry, $billingAddress->getTelephone()))
108
- $errorMessage = Mage::helper('iceadvanced')->__('It seems your billing address is incorrect, please confirm the phonenumber.');
109
-
110
- // Validate billing streetaddress
111
- if (!Mage::helper('iceadvanced')->validateStreetAddress($billingAddress->getStreet()))
112
- $errorMessage = Mage::helper('iceadvanced')->__('It seems your billing address is incorrect, please confirm the street and housenumber.');
113
-
114
- // Validate shipping streetaddress
115
- if (!Mage::helper('iceadvanced')->validateStreetAddress($shippingAddress->getStreet()))
116
- $errorMessage = Mage::helper('iceadvanced')->__('It seems your shipping address is incorrect, please confirm the street and housenumber.');
117
-
118
- if ($errorMessage) {
119
- Mage::getSingleton('checkout/session')->addError($errorMessage);
120
- Mage::app()->getResponse()->setRedirect(Mage::getUrl('checkout/cart'));
121
- session_write_close();
122
- Mage::app()->getResponse()->sendResponse();
123
- exit();
124
- }
125
- }
126
-
127
- /* Save order */
128
-
129
- public function sales_order_payment_place_end(Varien_Event_Observer $observer)
130
- {
131
- $payment = $observer->getPayment();
132
- $paymentMethodCode = $payment->getMethodInstance()->getCode();
133
-
134
- if (strpos($paymentMethodCode, 'icepayadv_') === false)
135
- return;
136
-
137
- if ($this->coreSQL()->isActive("iceadvanced"))
138
- $this->coreSQL()->savePayment($observer);
139
-
140
- return;
141
- }
142
-
143
- /* From admin */
144
-
145
- public function model_save_before(Varien_Event_Observer $observer)
146
- {
147
- /* Make sure we clear all the previously stored paymentmethods if the new total is less than stored in the database */
148
- $data = $observer->getEvent()->getObject();
149
- if ($data->getData("path") != "icecore/iceadvanced/webservice_data")
150
- return;
151
- if ($data->getData("value") != "1")
152
- return;
153
- if ($data->getData("scope") == "default" || $data->getData("scope") == "stores") {
154
- $storeScope = $data->getData("scope_id");
155
- } else
156
- return;
157
- $this->advSQL()->setScope($storeScope);
158
- $this->advSQL()->clearConfig();
159
- }
160
-
161
- private function set($setting)
162
- {
163
- $var = explode("_", $setting);
164
- $this->_setting = $var;
165
- }
166
-
167
- private function getValue()
168
- {
169
- return $this->_value;
170
- }
171
-
172
- private function getIssuers()
173
- {
174
- return Mage::helper("icecore")->makeArray($this->_issuers['issuers']);
175
- }
176
-
177
- private function getIssuerPMCode()
178
- {
179
- if (isset($this->_issuers['code']))
180
- return strtolower($this->_issuers['code']);
181
- }
182
-
183
- private function getIssuerMerchantID()
184
- {
185
- if (isset($this->_issuers['merchant']))
186
- return strtolower($this->_issuers['merchant']);
187
- }
188
-
189
- private function getPMCode()
190
- {
191
- return strtolower($this->_setting[1]);
192
- }
193
-
194
- private function handle($object)
195
- {
196
- $this->_value = $object->getData("value");
197
-
198
- if ($this->isIssuer())
199
- $this->_issuers = $this->advSQL()->arrDecode($this->getValue());
200
- }
201
-
202
- private function isActivate()
203
- {
204
- return ($this->_setting[2] == "active") ? true : false;
205
- }
206
-
207
- private function isTitle()
208
- {
209
- return ($this->_setting[2] == "title") ? true : false;
210
- }
211
-
212
- private function isIssuer()
213
- {
214
- return ($this->_setting[2] == "issuer") ? true : false;
215
- }
216
-
217
- protected function advSQL()
218
- {
219
- if ($this->_advancedSQL == null)
220
- $this->_advancedSQL = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
221
- return $this->_advancedSQL;
222
- }
223
-
224
- protected function coreSQL()
225
- {
226
- if ($this->_coreSQL == null)
227
- $this->_coreSQL = Mage::getSingleton('icecore/mysql4_iceCore');
228
- return $this->_coreSQL;
229
- }
230
-
231
- public function model_save_after(Varien_Event_Observer $observer)
232
- {
233
- $data = $observer->getEvent()->getObject();
234
-
235
- /* Save all the dynamic paymentmethods */
236
- $object = $observer->getEvent()->getObject();
237
- $setting = strstr($object->getData("path"), "icecore/paymentmethod/pm_");
238
- if (!$setting)
239
- return;
240
-
241
- // Load models
242
- $this->set($setting);
243
- $this->handle($object);
244
-
245
- $storeScope = null;
246
- // Only allow payment and issuer data at default and store level
247
- if ($data->getData("scope") == "default" || $data->getData("scope") == "stores") {
248
- $storeScope = $data->getData("scope_id");
249
- } else
250
- return;
251
- $this->advSQL()->setScope($storeScope);
252
-
253
- // Issuer data is being saved from Admin
254
- if ($this->isIssuer()) {
255
-
256
- $issuerListArr = array();
257
- foreach ($this->getIssuers() as $issuer) {
258
- if (!in_array($issuer->IssuerKeyword, Mage::helper("iceadvanced")->filteredPaymentMethodIssuers))
259
- array_push($issuerListArr, $issuer->IssuerKeyword);
260
- }
261
-
262
- $issuerList = implode(",", $issuerListArr);
263
-
264
- /* Save paymentmethod through issuer data */
265
- $this->advSQL()->savePaymentMethod(
266
- $this->getIssuerPMCode(), $this->getIssuerMerchantID(), $storeScope, $issuerList
267
- );
268
-
269
-
270
- foreach ($this->getIssuers() as $issuer) {
271
- if (in_array($issuer->IssuerKeyword, Mage::helper("iceadvanced")->filteredPaymentMethodIssuers))
272
- continue;
273
-
274
- $arrCountry = array();
275
- $arrCurrency = array();
276
- $arrMinimum = array();
277
- $arrMaximum = array();
278
-
279
- foreach (Mage::helper("icecore")->makeArray($issuer->Countries->Country) as $country) {
280
- array_push($arrCountry, trim($country->CountryCode));
281
- array_push($arrMinimum, $country->MinimumAmount);
282
- array_push($arrMaximum, $country->MaximumAmount);
283
-
284
- $arrCurrency = $this->addCurrencies($arrCurrency, explode(',', $country->Currency));
285
- }
286
-
287
- $this->advSQL()->saveIssuer(
288
- $storeScope, $this->getIssuerPMCode(), $this->getIssuerMerchantID(), $issuer->IssuerKeyword, $issuer->Description, $arrCountry, $arrCurrency, $this->_countryArr, $arrMinimum, $arrMaximum
289
- );
290
- };
291
- }
292
-
293
- if ($this->isTitle()) {
294
- $this->advSQL()->saveConfigFromAdmin($this->getPMCode(), "title", $this->getValue());
295
- }
296
-
297
- if ($this->isActivate()) {
298
- $this->advSQL()->saveConfigFromAdmin($this->getPMCode(), "active", $this->getValue());
299
- }
300
- return;
301
- }
302
-
303
- private function addCurrencies($arr, $currencyArr)
304
- {
305
- foreach ($currencyArr as $currency) {
306
- array_push($arr, trim($currency));
307
- }
308
- return $arr;
309
- }
310
-
311
- }
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Observer to save admin paymentmethods and save checkout payment
5
+ * @version 1.2.0
6
+ * @author Wouter van Tilburg
7
+ * @author Olaf Abbenhuis
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceAdvanced_Model_Observer extends Mage_Payment_Block_Form_Container
18
+ {
19
+
20
+ public $_currencyArr = array();
21
+ public $_countryArr = array();
22
+ public $_minimumAmountArr = array();
23
+ public $_maximumAmountArr = array();
24
+ private $_setting = array();
25
+ private $_issuers = array();
26
+ private $_value;
27
+ private $_advancedSQL = null;
28
+ private $_coreSQL = null;
29
+
30
+ /**
31
+ * Checks if an Icepay quote id is set, if so make the checkout session active
32
+ * Note: This is done so cancelled orders no longer have an empty card upon returning
33
+ *
34
+ * @param Varien_Event_Observer $observer
35
+ *
36
+ * @since 1.2.0
37
+ * @author Wouter van Tilburg
38
+ * @return \Varien_Event_Observer
39
+ */
40
+ public function custom_quote_process(Varien_Event_Observer $observer)
41
+ {
42
+ $session = Mage::getSingleton('core/session');
43
+ $quoteID = $session->getData('ic_quoteid');
44
+
45
+ if (!is_null($quoteID)) {
46
+ $quoteDate = $session->getData('ic_quotedate');
47
+
48
+ $diff = abs(strtotime(date("Y-m-d H:i:s")) - strtotime($quoteDate));
49
+
50
+ if ($diff < 360) {
51
+ $observer['checkout_session']->setQuoteId($quoteID);
52
+ $observer['checkout_session']->setLoadInactive(true);
53
+ }
54
+ }
55
+
56
+ return $observer;
57
+ }
58
+
59
+ /**
60
+ * sales_order_place_before
61
+ *
62
+ * @param Varien_Event_Observer $observer
63
+ *
64
+ * @since 1.2.0
65
+ * @author Wouter van Tilburg
66
+ * @return \Icepay_IceAdvanced_Model_Observer
67
+ */
68
+ public function sales_order_place_before(Varien_Event_Observer $observer)
69
+ {
70
+ $quote = $observer->getEvent()->getOrder()->getQuote();
71
+
72
+ if (!$quote->getId()) {
73
+ $quote = Mage::getSingleton('checkout/session')->getQuote();
74
+ }
75
+
76
+ $paymentMethodCode = $quote->getPayment()->getMethodInstance()->getCode();
77
+ $paymentMethodTitle = $quote->getPayment()->getMethodInstance()->getTitle();
78
+
79
+ if (false === strpos($paymentMethodCode, 'icepayadv_'))
80
+ return;
81
+
82
+ if (strtoupper($paymentMethodTitle) == 'AFTERPAY')
83
+ $this->initAfterpayValidation($quote);
84
+
85
+ return $this;
86
+ }
87
+
88
+ /**
89
+ * Validate additional information (Only for Afterpay)
90
+ *
91
+ * @param Object $quote
92
+ *
93
+ * @since 1.2.0
94
+ * @author Wouter van Tilburg
95
+ * @throws Mage_Payment_Model_Info_Exception
96
+ */
97
+ public function initAfterpayValidation($observer)
98
+ {
99
+ $billingAddress = $observer->getBillingAddress();
100
+ $shippingAddress = $observer->getShippingAddress();
101
+
102
+ $billingCountry = $billingAddress->getCountry();
103
+
104
+ $errorMessage = false;
105
+
106
+ // Validate postcode
107
+ if (!Mage::Helper('iceadvanced')->validatePostCode($billingCountry, $billingAddress->getPostcode()))
108
+ $errorMessage = Mage::helper('iceadvanced')->__('It seems your billing address is incorrect, please confirm the postal code.');
109
+
110
+ // Validate phonenumber
111
+ if (!Mage::Helper('iceadvanced')->validatePhonenumber($billingCountry, $billingAddress->getTelephone()))
112
+ $errorMessage = Mage::helper('iceadvanced')->__('It seems your billing address is incorrect, please confirm the phonenumber.');
113
+
114
+ // Validate billing streetaddress
115
+ if (!Mage::helper('iceadvanced')->validateStreetAddress($billingAddress->getStreet()))
116
+ $errorMessage = Mage::helper('iceadvanced')->__('It seems your billing address is incorrect, please confirm the street and housenumber.');
117
+
118
+ // Validate shipping streetaddress
119
+ if (!Mage::helper('iceadvanced')->validateStreetAddress($shippingAddress->getStreet()))
120
+ $errorMessage = Mage::helper('iceadvanced')->__('It seems your shipping address is incorrect, please confirm the street and housenumber.');
121
+
122
+ if ($errorMessage) {
123
+ Mage::getSingleton('checkout/session')->addError($errorMessage);
124
+ Mage::app()->getResponse()->setRedirect(Mage::getUrl('checkout/cart'));
125
+ session_write_close();
126
+ Mage::app()->getResponse()->sendResponse();
127
+ exit();
128
+ }
129
+ }
130
+
131
+ /* Save order */
132
+
133
+ public function sales_order_payment_place_end(Varien_Event_Observer $observer)
134
+ {
135
+ $payment = $observer->getPayment();
136
+ $paymentMethodCode = $payment->getMethodInstance()->getCode();
137
+
138
+ if (strpos($paymentMethodCode, 'icepayadv_') === false)
139
+ return;
140
+
141
+ if ($this->coreSQL()->isActive("iceadvanced"))
142
+ $this->coreSQL()->savePayment($observer);
143
+
144
+ return;
145
+ }
146
+
147
+ /* From admin */
148
+
149
+ public function model_save_before(Varien_Event_Observer $observer)
150
+ {
151
+ /* Make sure we clear all the previously stored paymentmethods if the new total is less than stored in the database */
152
+ $data = $observer->getEvent()->getObject();
153
+ if ($data->getData("path") != "icecore/iceadvanced/webservice_data")
154
+ return;
155
+ if ($data->getData("value") != "1")
156
+ return;
157
+ if ($data->getData("scope") == "default" || $data->getData("scope") == "stores") {
158
+ $storeScope = $data->getData("scope_id");
159
+ } else
160
+ return;
161
+ $this->advSQL()->setScope($storeScope);
162
+ $this->advSQL()->clearConfig();
163
+ }
164
+
165
+ private function set($setting)
166
+ {
167
+ $var = explode("_", $setting);
168
+ $this->_setting = $var;
169
+ }
170
+
171
+ private function getValue()
172
+ {
173
+ return $this->_value;
174
+ }
175
+
176
+ private function getIssuers()
177
+ {
178
+ return Mage::helper("icecore")->makeArray($this->_issuers['issuers']);
179
+ }
180
+
181
+ private function getIssuerPMCode()
182
+ {
183
+ if (isset($this->_issuers['code']))
184
+ return strtolower($this->_issuers['code']);
185
+ }
186
+
187
+ private function getIssuerMerchantID()
188
+ {
189
+ if (isset($this->_issuers['merchant']))
190
+ return strtolower($this->_issuers['merchant']);
191
+ }
192
+
193
+ private function getPMCode()
194
+ {
195
+ return strtolower($this->_setting[1]);
196
+ }
197
+
198
+ private function handle($object)
199
+ {
200
+ $this->_value = $object->getData("value");
201
+
202
+ if ($this->isIssuer())
203
+ $this->_issuers = $this->advSQL()->arrDecode($this->getValue());
204
+ }
205
+
206
+ private function isActivate()
207
+ {
208
+ return ($this->_setting[2] == "active") ? true : false;
209
+ }
210
+
211
+ private function isTitle()
212
+ {
213
+ return ($this->_setting[2] == "title") ? true : false;
214
+ }
215
+
216
+ private function isIssuer()
217
+ {
218
+ return ($this->_setting[2] == "issuer") ? true : false;
219
+ }
220
+
221
+ protected function advSQL()
222
+ {
223
+ if ($this->_advancedSQL == null)
224
+ $this->_advancedSQL = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
225
+ return $this->_advancedSQL;
226
+ }
227
+
228
+ protected function coreSQL()
229
+ {
230
+ if ($this->_coreSQL == null)
231
+ $this->_coreSQL = Mage::getSingleton('icecore/mysql4_iceCore');
232
+ return $this->_coreSQL;
233
+ }
234
+
235
+ public function model_save_after(Varien_Event_Observer $observer)
236
+ {
237
+ $data = $observer->getEvent()->getObject();
238
+
239
+ /* Save all the dynamic paymentmethods */
240
+ $object = $observer->getEvent()->getObject();
241
+ $setting = strstr($object->getData("path"), "icecore/paymentmethod/pm_");
242
+ if (!$setting)
243
+ return;
244
+
245
+ // Load models
246
+ $this->set($setting);
247
+ $this->handle($object);
248
+
249
+ $storeScope = null;
250
+ // Only allow payment and issuer data at default and store level
251
+ if ($data->getData("scope") == "default" || $data->getData("scope") == "stores") {
252
+ $storeScope = $data->getData("scope_id");
253
+ } else
254
+ return;
255
+ $this->advSQL()->setScope($storeScope);
256
+
257
+ // Issuer data is being saved from Admin
258
+ if ($this->isIssuer()) {
259
+
260
+ $issuerListArr = array();
261
+ foreach ($this->getIssuers() as $issuer) {
262
+ if (!in_array($issuer->IssuerKeyword, Mage::helper("iceadvanced")->filteredPaymentMethodIssuers))
263
+ array_push($issuerListArr, $issuer->IssuerKeyword);
264
+ }
265
+
266
+ $issuerList = implode(",", $issuerListArr);
267
+
268
+ /* Save paymentmethod through issuer data */
269
+ $this->advSQL()->savePaymentMethod(
270
+ $this->getIssuerPMCode(), $this->getIssuerMerchantID(), $storeScope, $issuerList
271
+ );
272
+
273
+
274
+ foreach ($this->getIssuers() as $issuer) {
275
+ if (in_array($issuer->IssuerKeyword, Mage::helper("iceadvanced")->filteredPaymentMethodIssuers))
276
+ continue;
277
+
278
+ $arrCountry = array();
279
+ $arrCurrency = array();
280
+ $arrMinimum = array();
281
+ $arrMaximum = array();
282
+
283
+ foreach (Mage::helper("icecore")->makeArray($issuer->Countries->Country) as $country) {
284
+ array_push($arrCountry, trim($country->CountryCode));
285
+ array_push($arrMinimum, $country->MinimumAmount);
286
+ array_push($arrMaximum, $country->MaximumAmount);
287
+
288
+ $arrCurrency = $this->addCurrencies($arrCurrency, explode(',', $country->Currency));
289
+ }
290
+
291
+ $this->advSQL()->saveIssuer(
292
+ $storeScope, $this->getIssuerPMCode(), $this->getIssuerMerchantID(), $issuer->IssuerKeyword, $issuer->Description, $arrCountry, $arrCurrency, $this->_countryArr, $arrMinimum, $arrMaximum
293
+ );
294
+ };
295
+ }
296
+
297
+ if ($this->isTitle()) {
298
+ $this->advSQL()->saveConfigFromAdmin($this->getPMCode(), "title", $this->getValue());
299
+ }
300
+
301
+ if ($this->isActivate()) {
302
+ $this->advSQL()->saveConfigFromAdmin($this->getPMCode(), "active", $this->getValue());
303
+ }
304
+ return;
305
+ }
306
+
307
+ private function addCurrencies($arr, $currencyArr)
308
+ {
309
+ foreach ($currencyArr as $currency) {
310
+ array_push($arr, trim($currency));
311
+ }
312
+ return $arr;
313
+ }
314
+
315
+ }
app/code/community/Icepay/IceAdvanced/Model/Order.php CHANGED
@@ -1,640 +1,640 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Webservice Order
5
- *
6
- * @version 1.0.0
7
- * @author Wouter van Tilburg <wouter@icepay.eu>
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceAdvanced_Model_Order {
18
-
19
- private $data = array();
20
- private $defaultVATCategories = array();
21
- private $orderData;
22
- private $consumerNode;
23
- private $addressesNode;
24
- private $productsNode;
25
- private $debug = false;
26
-
27
- public function __construct()
28
- {
29
- $this->setData('products', array());
30
-
31
- $this->defaultVATCategories = array(
32
- 'zero' => 0,
33
- 'reduced-low' => array('1', '6'),
34
- 'reduced-middle' => array('7', '12'),
35
- 'standard' => array('13', '100')
36
- );
37
- }
38
-
39
- public function getProducts()
40
- {
41
- return $this->data['products'];
42
- }
43
-
44
- private function setData($tag, $object)
45
- {
46
- $this->data[$tag] = $object;
47
- }
48
-
49
- public function setShippingAddress(Icepay_Order_Address $shippingAddress)
50
- {
51
- $this->setData('shippingAddress', $shippingAddress);
52
- return $this;
53
- }
54
-
55
- public function setBillingAddress(Icepay_Order_Address $billingAddress)
56
- {
57
- $this->setData('billingAddress', $billingAddress);
58
- return $this;
59
- }
60
-
61
- public function setConsumer(Icepay_Order_Consumer $consumer)
62
- {
63
- $this->setData('consumer', $consumer);
64
- return $this;
65
- }
66
-
67
- public function addProduct(Icepay_Order_Product $product)
68
- {
69
- array_push($this->data["products"], $product);
70
- return $this;
71
- }
72
-
73
- public function createAddress()
74
- {
75
- return new Icepay_Order_Address();
76
- }
77
-
78
- public function createConsumer()
79
- {
80
- return new Icepay_Order_Consumer();
81
- }
82
-
83
- public function createProduct()
84
- {
85
- return new Icepay_Order_Product();
86
- }
87
-
88
- public function getCategoryForPercentage($number = null, $default = "exempt")
89
- {
90
- foreach ($this->defaultVATCategories as $category => $value) {
91
- if (!is_array($value)) {
92
- if ($value == $number)
93
- return $category;
94
- }
95
-
96
- if ($number >= $value[0] && $number <= $value[1])
97
- return $category;
98
- }
99
-
100
- return $default;
101
- }
102
-
103
- public function setOrderDiscountAmount($amount, $name = 'Discount', $description = 'Order Discount')
104
- {
105
- $obj = $this->createProduct();
106
- $obj->setProductID('02')
107
- ->setProductName($name)
108
- ->setDescription($description)
109
- ->setQuantity('1')
110
- ->setUnitPrice(-$amount)
111
- ->setVATCategory($this->getCategoryForPercentage(-1));
112
-
113
- $this->addProduct($obj);
114
-
115
- return $this;
116
- }
117
-
118
- public function setShippingCosts($amount, $vat = -1, $name = 'Shipping Costs')
119
- {
120
- $obj = $this->createProduct();
121
- $obj->setProductID('01')
122
- ->setProductName($name)
123
- ->setDescription('')
124
- ->setQuantity('1')
125
- ->setUnitPrice($amount)
126
- ->setVATCategory($this->getCategoryForPercentage($vat));
127
-
128
- $this->addProduct($obj);
129
-
130
- return $this;
131
- }
132
-
133
- private function array_to_xml($childs, $node = 'Order')
134
- {
135
- $childs = (array) $childs;
136
-
137
- foreach ($childs as $key => $value) {
138
- $node->addChild(ucfirst($key), $value);
139
- }
140
-
141
- return $node;
142
- }
143
-
144
- public function getXML()
145
- {
146
-
147
- $this->orderData = new SimpleXMLElement("<?xml version=\"1.0\" encoding=\"UTF-8\"?><Order></Order>");
148
- $this->consumerNode = $this->orderData->addChild('Consumer');
149
- $this->addressesNode = $this->orderData->addChild('Addresses');
150
- $this->productsNode = $this->orderData->addChild('Products');
151
-
152
- // Set Consumer
153
- $this->array_to_xml($this->data['consumer'], $this->consumerNode);
154
-
155
- // Set Addresses
156
- $shippingNode = $this->addressesNode->addChild('Address');
157
- $shippingNode->addAttribute('id', 'shipping');
158
-
159
- $this->array_to_xml($this->data['shippingAddress'], $shippingNode);
160
-
161
- $billingNode = $this->addressesNode->addChild('Address');
162
- $billingNode->addAttribute('id', 'billing');
163
-
164
- $this->array_to_xml($this->data['billingAddress'], $billingNode);
165
-
166
- // Set Products
167
- foreach ($this->data['products'] as $product) {
168
- $productNode = $this->productsNode->addChild('Product');
169
- $this->array_to_xml($product, $productNode);
170
- }
171
-
172
- if ($this->debug == true) {
173
- header("Content-type: text/xml");
174
- echo $this->orderData->asXML();
175
- exit;
176
- }
177
-
178
- return $this->orderData->asXML();
179
- }
180
-
181
- public function validateOrder($paymentObj)
182
- {
183
- switch (strtoupper($paymentObj->getPaymentMethod())) {
184
- case 'AFTERPAY':
185
- if ($this->data['shippingAddress']->country !== $this->data['billingAddress']->country)
186
- throw new Exception('Billing and Shipping country must be equal in order to use Afterpay.');
187
-
188
- if (!Icepay_Order_Helper::validateZipCode($this->data['shippingAddress']->zipCode, $this->data['shippingAddress']->country))
189
- throw new Exception('Zipcode format for shipping address is incorrect.');
190
-
191
- if (!Icepay_Order_Helper::validateZipCode($this->data['billingAddress']->zipCode, $this->data['billingAddress']->country))
192
- throw new Exception('Zipcode format for billing address is incorrect.');
193
-
194
- if (!Icepay_Order_Helper::validatePhonenumber($this->data['consumer']->phone))
195
- throw new Exception('Phonenumber is incorrect.');
196
-
197
- break;
198
- }
199
- }
200
-
201
- }
202
-
203
- /**
204
- * ICEPAY - Webservice Order Consumer Class
205
- *
206
- * @version 1.0.0
207
- * @author Wouter van Tilburg <wouter@icepay.eu>
208
- * @copyright ICEPAY <www.icepay.com>
209
- */
210
- class Icepay_Order_Consumer {
211
-
212
- public $consumerID = '';
213
- public $email = '';
214
- public $phone = '';
215
-
216
- /**
217
- * Sets the consumer ID
218
- *
219
- * @since 1.0.0
220
- * @param string $consumerID
221
- * @return \Icepay_Order_Consumer
222
- */
223
- public function setConsumerID($consumerID)
224
- {
225
- $this->consumerID = (string) $consumerID;
226
- return $this;
227
- }
228
-
229
- /**
230
- * Sets the consumer email address
231
- *
232
- * @since 1.0.0
233
- * @param string $emailAddress
234
- * @return \Icepay_Order_Consumer
235
- */
236
- public function setEmailAddress($emailAddress)
237
- {
238
- $this->email = (string) $emailAddress;
239
- return $this;
240
- }
241
-
242
- /**
243
- * sets the consumer phonenumber
244
- *
245
- * @since 1.0.0
246
- * @param string $phoneNumber
247
- * @return \Icepay_Order_Consumer
248
- */
249
- public function setPhoneNumber($phoneNumber)
250
- {
251
- $this->phone = (string) $phoneNumber;
252
- return $this;
253
- }
254
-
255
- }
256
-
257
- /**
258
- * ICEPAY - Webservice Order Product Class
259
- *
260
- * @version 1.0.0
261
- * @author Wouter van Tilburg <wouter@icepay.eu>
262
- * @copyright ICEPAY <www.icepay.com>
263
- */
264
- class Icepay_Order_Product {
265
-
266
- public $productID = '00';
267
- public $productName = '';
268
- public $description = '';
269
- public $quantity = '1';
270
- public $unitPrice = '0';
271
- public $VATCategory = 'standard';
272
-
273
- /**
274
- * Sets the Product's ID
275
- *
276
- * @since 1.0.0
277
- * @param string $productID
278
- * @return \Icepay_Order_Product
279
- */
280
- public function setProductID($productID)
281
- {
282
- $this->productID = (string) $productID;
283
- return $this;
284
- }
285
-
286
- /**
287
- * Sets the Product's name
288
- *
289
- * @since 1.0.0
290
- * @param string $productName
291
- * @return \Icepay_Order_Product
292
- */
293
- public function setProductName($productName)
294
- {
295
- $this->productName = (string) $productName;
296
- return $this;
297
- }
298
-
299
- /**
300
- * Sets the description
301
- *
302
- * @since 1.0.0
303
- * @param string $description
304
- * @return \Icepay_Order_Product
305
- */
306
- public function setDescription($description)
307
- {
308
- $this->description = (string) $description;
309
- return $this;
310
- }
311
-
312
- /**
313
- * Sets the quantity
314
- *
315
- * @since 1.0.0
316
- * @param string $quantity
317
- * @return \Icepay_Order_Product
318
- */
319
- public function setQuantity($quantity)
320
- {
321
- $this->quantity = (string) $quantity;
322
- return $this;
323
- }
324
-
325
- /**
326
- * Sets the unitprice
327
- *
328
- * @since 1.0.0
329
- * @param string $unitPrice
330
- * @return \Icepay_Order_Product
331
- */
332
- public function setUnitPrice($unitPrice)
333
- {
334
- $this->unitPrice = (string) $unitPrice;
335
- return $this;
336
- }
337
-
338
- /**
339
- * Sets the VAT Category
340
- *
341
- * @since 1.0.0
342
- * @param string $category
343
- * @return \Icepay_Order_Product
344
- */
345
- public function setVATCategory($category)
346
- {
347
- $this->VATCategory = (string) $category;
348
- return $this;
349
- }
350
-
351
- }
352
-
353
- /**
354
- * ICEPAY - Webservice Order Address Class
355
- *
356
- * @version 1.0.0
357
- * @author Wouter van Tilburg <wouter@icepay.eu>
358
- * @copyright ICEPAY <www.icepay.com>
359
- */
360
- class Icepay_Order_Address {
361
-
362
- public $initials = '';
363
- public $prefix = '';
364
- public $lastName = '';
365
- public $street = '';
366
- public $houseNumber = '';
367
- public $houseNumberAddition = '';
368
- public $zipCode = '';
369
- public $city = '';
370
- public $country = '';
371
-
372
- /**
373
- * Sets the address initials
374
- *
375
- * @since 1.0.0
376
- * @param string $initials
377
- * @return \Icepay_Order_Address
378
- */
379
- public function setInitials($initials)
380
- {
381
- $initials = preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities(utf8_encode($initials), ENT_QUOTES, 'UTF-8'));
382
-
383
- $this->initials = (string) $initials;
384
- return $this;
385
- }
386
-
387
- /**
388
- * Sets the address prefix
389
- *
390
- * @since 1.0.0
391
- * @param string $prefix
392
- * @return \Icepay_Order_Address
393
- */
394
- public function setPrefix($prefix)
395
- {
396
- $this->prefix = (string) $prefix;
397
- return $this;
398
- }
399
-
400
- /**
401
- * Sets the address lastname
402
- *
403
- * @since 1.0.0
404
- * @param string $lastName
405
- * @return \Icepay_Order_Address
406
- */
407
- public function setLastname($lastName)
408
- {
409
- $lastName = preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities(utf8_encode($lastName), ENT_QUOTES, 'UTF-8'));
410
-
411
- $this->lastName = (string) $lastName;
412
- return $this;
413
- }
414
-
415
- /**
416
- * Sets the address streetname
417
- *
418
- * @since 1.0.0
419
- * @param string $streetName
420
- * @return \Icepay_Order_Address
421
- */
422
- public function setStreetName($streetName)
423
- {
424
- $streetName = preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities(utf8_encode($streetName), ENT_QUOTES, 'UTF-8'));
425
- $this->street = (string) $streetName;
426
- return $this;
427
- }
428
-
429
- /**
430
- * Sets the address housenumber
431
- *
432
- * @since 1.0.0
433
- * @param string $houseNumber
434
- * @return \Icepay_Order_Address
435
- */
436
- public function setHouseNumber($houseNumber)
437
- {
438
- $this->houseNumber = (string) $houseNumber;
439
- return $this;
440
- }
441
-
442
- /**
443
- * Sets the address housenumber addition
444
- *
445
- * @since 1.0.0
446
- * @param string $houseNumberAddition
447
- * @return \Icepay_Order_Address
448
- */
449
- public function setHouseNumberAddition($houseNumberAddition)
450
- {
451
- $this->houseNumberAddition = (string) $houseNumberAddition;
452
- return $this;
453
- }
454
-
455
- /**
456
- * Sets the address zipcode
457
- *
458
- * @since 1.0.0
459
- * @param string $zipCode
460
- * @return \Icepay_Order_Address
461
- */
462
- public function setZipCode($zipCode)
463
- {
464
- $this->zipCode = (string) $zipCode;
465
- return $this;
466
- }
467
-
468
- /**
469
- * Sets the address city
470
- *
471
- * @since 1.0.0
472
- * @param string $city
473
- * @return \Icepay_Order_Address
474
- */
475
- public function setCity($city)
476
- {
477
- $this->city = (string) $city;
478
- return $this;
479
- }
480
-
481
- /**
482
- * Sets the address country
483
- *
484
- * @since 1.0.0
485
- * @param string $country
486
- * @return \Icepay_Order_Address
487
- */
488
- public function setCountry($country)
489
- {
490
- $this->country = (string) $country;
491
- return $this;
492
- }
493
-
494
- }
495
-
496
- /**
497
- * ICEPAY - Webservice Order Helper Class
498
- *
499
- * The Order Helper class contains handy fuctions to validate the input, such as a telephonenumber and zipcode check
500
- *
501
- * @version 1.0.0
502
- *
503
- * @author Wouter van Tilburg
504
- * @author Olaf Abbenhuis
505
- * @copyright Copyright (c) 2011-2012, ICEPAY
506
- */
507
- class Icepay_Order_Helper {
508
-
509
- private static $street;
510
- private static $houseNumber;
511
- private static $houseNumberAddition;
512
-
513
- /**
514
- * Sets and explodes the streetaddress
515
- *
516
- * @since 1.0.0
517
- * @param string Contains the street address
518
- * @return Icepay_Order_Helper
519
- */
520
- public static function setStreetAddress($streetAddress)
521
- {
522
- self::explodeStreetAddress($streetAddress);
523
-
524
- return new self;
525
- }
526
-
527
- /**
528
- * Get the street from address
529
- *
530
- * @since 1.0.0
531
- * @param string Contains the street address
532
- * @return Icepay_Order_Helper
533
- */
534
- public static function getStreetFromAddress($streetAddress = null)
535
- {
536
- if ($streetAddress)
537
- self::explodeStreetAddress($streetAddress);
538
-
539
- return self::$street;
540
- }
541
-
542
- /**
543
- * Get the housenumber from address
544
- *
545
- * @since 1.0.0
546
- * @param string Contains the street address
547
- * @return Icepay_Order_Helper
548
- */
549
- public static function getHouseNumberFromAddress($streetAddress = null)
550
- {
551
- if ($streetAddress)
552
- self::explodeStreetAddress($streetAddress);
553
-
554
- return self::$houseNumber;
555
- }
556
-
557
- /**
558
- * Get the housenumber addition from address
559
- *
560
- * @since 1.0.0
561
- * @param string Contains the street address
562
- * @return Icepay_Order_Helper
563
- */
564
- public static function getHouseNumberAdditionFromAddress($streetAddress = null)
565
- {
566
- if ($streetAddress)
567
- self::explodeStreetAddress($streetAddress);
568
-
569
- return self::$houseNumberAddition;
570
- }
571
-
572
- /**
573
- * Validates a zipcode based on country
574
- *
575
- * @since 1.0.0
576
- * @param string $zipCode A string containing the zipcode
577
- * @param string $country A string containing the ISO 3166-1 alpha-2 code of the country
578
- * @example validateZipCode('1122AA', 'NL')
579
- * @return boolean
580
- */
581
- public static function validateZipCode($zipCode, $country)
582
- {
583
- switch (strtoupper($country)) {
584
- case 'NL':
585
- if (preg_match('/^[1-9]{1}[0-9]{3}[A-Z]{2}$/', $zipCode))
586
- return true;
587
- break;
588
- case 'BE':
589
- if (preg_match('/^[1-9]{4}$/', $zipCode))
590
- return true;
591
- break;
592
- case 'DE':
593
- if (preg_match('/^[1-9]{5}$/', $zipCode))
594
- return true;
595
- break;
596
- }
597
-
598
- return false;
599
- }
600
-
601
- /**
602
- * Validates a phonenumber
603
- *
604
- * @since 1.0.0
605
- * @param string Contains the phonenumber
606
- * @return boolean
607
- */
608
- public static function validatePhonenumber($phoneNumber)
609
- {
610
- if (strlen($phoneNumber) < 10) {
611
- return false;
612
- }
613
-
614
- if (preg_match('/^(?:\((\+?\d+)?\)|\+?\d+) ?\d*(-?\d{2,3} ?){0,4}$/', $phoneNumber)) {
615
- return true;
616
- }
617
-
618
- return false;
619
- }
620
-
621
- private static function explodeStreetAddress($streetAddress)
622
- {
623
-
624
- $streetAddress = utf8_decode($streetAddress);
625
-
626
- $pattern = '#^(.+\D+){1} ([0-9]{1,})\s?([\s\/]?[0-9]{0,}?[\s\S]{0,}?)?$#i';
627
-
628
- $aMatch = array();
629
-
630
- if (preg_match($pattern, $streetAddress, $aMatch)) {
631
- self::$street = $aMatch[1];
632
- self::$houseNumber = $aMatch[2];
633
-
634
- $houseNumberAddition = $aMatch[3];
635
- $hNa = str_replace('/', '', $houseNumberAddition);
636
- self::$houseNumberAddition = $hNa;
637
- }
638
- }
639
-
640
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Webservice Order
5
+ *
6
+ * @version 1.0.0
7
+ * @author Wouter van Tilburg <wouter@icepay.eu>
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceAdvanced_Model_Order {
18
+
19
+ private $data = array();
20
+ private $defaultVATCategories = array();
21
+ private $orderData;
22
+ private $consumerNode;
23
+ private $addressesNode;
24
+ private $productsNode;
25
+ private $debug = false;
26
+
27
+ public function __construct()
28
+ {
29
+ $this->setData('products', array());
30
+
31
+ $this->defaultVATCategories = array(
32
+ 'zero' => 0,
33
+ 'reduced-low' => array('1', '6'),
34
+ 'reduced-middle' => array('7', '12'),
35
+ 'standard' => array('13', '100')
36
+ );
37
+ }
38
+
39
+ public function getProducts()
40
+ {
41
+ return $this->data['products'];
42
+ }
43
+
44
+ private function setData($tag, $object)
45
+ {
46
+ $this->data[$tag] = $object;
47
+ }
48
+
49
+ public function setShippingAddress(Icepay_Order_Address $shippingAddress)
50
+ {
51
+ $this->setData('shippingAddress', $shippingAddress);
52
+ return $this;
53
+ }
54
+
55
+ public function setBillingAddress(Icepay_Order_Address $billingAddress)
56
+ {
57
+ $this->setData('billingAddress', $billingAddress);
58
+ return $this;
59
+ }
60
+
61
+ public function setConsumer(Icepay_Order_Consumer $consumer)
62
+ {
63
+ $this->setData('consumer', $consumer);
64
+ return $this;
65
+ }
66
+
67
+ public function addProduct(Icepay_Order_Product $product)
68
+ {
69
+ array_push($this->data["products"], $product);
70
+ return $this;
71
+ }
72
+
73
+ public function createAddress()
74
+ {
75
+ return new Icepay_Order_Address();
76
+ }
77
+
78
+ public function createConsumer()
79
+ {
80
+ return new Icepay_Order_Consumer();
81
+ }
82
+
83
+ public function createProduct()
84
+ {
85
+ return new Icepay_Order_Product();
86
+ }
87
+
88
+ public function getCategoryForPercentage($number = null, $default = "exempt")
89
+ {
90
+ foreach ($this->defaultVATCategories as $category => $value) {
91
+ if (!is_array($value)) {
92
+ if ($value == $number)
93
+ return $category;
94
+ }
95
+
96
+ if ($number >= $value[0] && $number <= $value[1])
97
+ return $category;
98
+ }
99
+
100
+ return $default;
101
+ }
102
+
103
+ public function setOrderDiscountAmount($amount, $name = 'Discount', $description = 'Order Discount')
104
+ {
105
+ $obj = $this->createProduct();
106
+ $obj->setProductID('02')
107
+ ->setProductName($name)
108
+ ->setDescription($description)
109
+ ->setQuantity('1')
110
+ ->setUnitPrice(-$amount)
111
+ ->setVATCategory($this->getCategoryForPercentage(-1));
112
+
113
+ $this->addProduct($obj);
114
+
115
+ return $this;
116
+ }
117
+
118
+ public function setShippingCosts($amount, $vat = -1, $name = 'Shipping Costs')
119
+ {
120
+ $obj = $this->createProduct();
121
+ $obj->setProductID('01')
122
+ ->setProductName($name)
123
+ ->setDescription('')
124
+ ->setQuantity('1')
125
+ ->setUnitPrice($amount)
126
+ ->setVATCategory($this->getCategoryForPercentage($vat));
127
+
128
+ $this->addProduct($obj);
129
+
130
+ return $this;
131
+ }
132
+
133
+ private function array_to_xml($childs, $node = 'Order')
134
+ {
135
+ $childs = (array) $childs;
136
+
137
+ foreach ($childs as $key => $value) {
138
+ $node->addChild(ucfirst($key), $value);
139
+ }
140
+
141
+ return $node;
142
+ }
143
+
144
+ public function getXML()
145
+ {
146
+
147
+ $this->orderData = new SimpleXMLElement("<?xml version=\"1.0\" encoding=\"UTF-8\"?><Order></Order>");
148
+ $this->consumerNode = $this->orderData->addChild('Consumer');
149
+ $this->addressesNode = $this->orderData->addChild('Addresses');
150
+ $this->productsNode = $this->orderData->addChild('Products');
151
+
152
+ // Set Consumer
153
+ $this->array_to_xml($this->data['consumer'], $this->consumerNode);
154
+
155
+ // Set Addresses
156
+ $shippingNode = $this->addressesNode->addChild('Address');
157
+ $shippingNode->addAttribute('id', 'shipping');
158
+
159
+ $this->array_to_xml($this->data['shippingAddress'], $shippingNode);
160
+
161
+ $billingNode = $this->addressesNode->addChild('Address');
162
+ $billingNode->addAttribute('id', 'billing');
163
+
164
+ $this->array_to_xml($this->data['billingAddress'], $billingNode);
165
+
166
+ // Set Products
167
+ foreach ($this->data['products'] as $product) {
168
+ $productNode = $this->productsNode->addChild('Product');
169
+ $this->array_to_xml($product, $productNode);
170
+ }
171
+
172
+ if ($this->debug == true) {
173
+ header("Content-type: text/xml");
174
+ echo $this->orderData->asXML();
175
+ exit;
176
+ }
177
+
178
+ return $this->orderData->asXML();
179
+ }
180
+
181
+ public function validateOrder($paymentObj)
182
+ {
183
+ switch (strtoupper($paymentObj->getPaymentMethod())) {
184
+ case 'AFTERPAY':
185
+ if ($this->data['shippingAddress']->country !== $this->data['billingAddress']->country)
186
+ throw new Exception('Billing and Shipping country must be equal in order to use Afterpay.');
187
+
188
+ if (!Icepay_Order_Helper::validateZipCode($this->data['shippingAddress']->zipCode, $this->data['shippingAddress']->country))
189
+ throw new Exception('Zipcode format for shipping address is incorrect.');
190
+
191
+ if (!Icepay_Order_Helper::validateZipCode($this->data['billingAddress']->zipCode, $this->data['billingAddress']->country))
192
+ throw new Exception('Zipcode format for billing address is incorrect.');
193
+
194
+ if (!Icepay_Order_Helper::validatePhonenumber($this->data['consumer']->phone))
195
+ throw new Exception('Phonenumber is incorrect.');
196
+
197
+ break;
198
+ }
199
+ }
200
+
201
+ }
202
+
203
+ /**
204
+ * ICEPAY - Webservice Order Consumer Class
205
+ *
206
+ * @version 1.0.0
207
+ * @author Wouter van Tilburg <wouter@icepay.eu>
208
+ * @copyright ICEPAY <www.icepay.com>
209
+ */
210
+ class Icepay_Order_Consumer {
211
+
212
+ public $consumerID = '';
213
+ public $email = '';
214
+ public $phone = '';
215
+
216
+ /**
217
+ * Sets the consumer ID
218
+ *
219
+ * @since 1.0.0
220
+ * @param string $consumerID
221
+ * @return \Icepay_Order_Consumer
222
+ */
223
+ public function setConsumerID($consumerID)
224
+ {
225
+ $this->consumerID = (string) $consumerID;
226
+ return $this;
227
+ }
228
+
229
+ /**
230
+ * Sets the consumer email address
231
+ *
232
+ * @since 1.0.0
233
+ * @param string $emailAddress
234
+ * @return \Icepay_Order_Consumer
235
+ */
236
+ public function setEmailAddress($emailAddress)
237
+ {
238
+ $this->email = (string) $emailAddress;
239
+ return $this;
240
+ }
241
+
242
+ /**
243
+ * sets the consumer phonenumber
244
+ *
245
+ * @since 1.0.0
246
+ * @param string $phoneNumber
247
+ * @return \Icepay_Order_Consumer
248
+ */
249
+ public function setPhoneNumber($phoneNumber)
250
+ {
251
+ $this->phone = (string) $phoneNumber;
252
+ return $this;
253
+ }
254
+
255
+ }
256
+
257
+ /**
258
+ * ICEPAY - Webservice Order Product Class
259
+ *
260
+ * @version 1.0.0
261
+ * @author Wouter van Tilburg <wouter@icepay.eu>
262
+ * @copyright ICEPAY <www.icepay.com>
263
+ */
264
+ class Icepay_Order_Product {
265
+
266
+ public $productID = '00';
267
+ public $productName = '';
268
+ public $description = '';
269
+ public $quantity = '1';
270
+ public $unitPrice = '0';
271
+ public $VATCategory = 'standard';
272
+
273
+ /**
274
+ * Sets the Product's ID
275
+ *
276
+ * @since 1.0.0
277
+ * @param string $productID
278
+ * @return \Icepay_Order_Product
279
+ */
280
+ public function setProductID($productID)
281
+ {
282
+ $this->productID = (string) $productID;
283
+ return $this;
284
+ }
285
+
286
+ /**
287
+ * Sets the Product's name
288
+ *
289
+ * @since 1.0.0
290
+ * @param string $productName
291
+ * @return \Icepay_Order_Product
292
+ */
293
+ public function setProductName($productName)
294
+ {
295
+ $this->productName = (string) $productName;
296
+ return $this;
297
+ }
298
+
299
+ /**
300
+ * Sets the description
301
+ *
302
+ * @since 1.0.0
303
+ * @param string $description
304
+ * @return \Icepay_Order_Product
305
+ */
306
+ public function setDescription($description)
307
+ {
308
+ $this->description = (string) $description;
309
+ return $this;
310
+ }
311
+
312
+ /**
313
+ * Sets the quantity
314
+ *
315
+ * @since 1.0.0
316
+ * @param string $quantity
317
+ * @return \Icepay_Order_Product
318
+ */
319
+ public function setQuantity($quantity)
320
+ {
321
+ $this->quantity = (string) $quantity;
322
+ return $this;
323
+ }
324
+
325
+ /**
326
+ * Sets the unitprice
327
+ *
328
+ * @since 1.0.0
329
+ * @param string $unitPrice
330
+ * @return \Icepay_Order_Product
331
+ */
332
+ public function setUnitPrice($unitPrice)
333
+ {
334
+ $this->unitPrice = (string) $unitPrice;
335
+ return $this;
336
+ }
337
+
338
+ /**
339
+ * Sets the VAT Category
340
+ *
341
+ * @since 1.0.0
342
+ * @param string $category
343
+ * @return \Icepay_Order_Product
344
+ */
345
+ public function setVATCategory($category)
346
+ {
347
+ $this->VATCategory = (string) $category;
348
+ return $this;
349
+ }
350
+
351
+ }
352
+
353
+ /**
354
+ * ICEPAY - Webservice Order Address Class
355
+ *
356
+ * @version 1.0.0
357
+ * @author Wouter van Tilburg <wouter@icepay.eu>
358
+ * @copyright ICEPAY <www.icepay.com>
359
+ */
360
+ class Icepay_Order_Address {
361
+
362
+ public $initials = '';
363
+ public $prefix = '';
364
+ public $lastName = '';
365
+ public $street = '';
366
+ public $houseNumber = '';
367
+ public $houseNumberAddition = '';
368
+ public $zipCode = '';
369
+ public $city = '';
370
+ public $country = '';
371
+
372
+ /**
373
+ * Sets the address initials
374
+ *
375
+ * @since 1.0.0
376
+ * @param string $initials
377
+ * @return \Icepay_Order_Address
378
+ */
379
+ public function setInitials($initials)
380
+ {
381
+ $initials = preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities(utf8_encode($initials), ENT_QUOTES, 'UTF-8'));
382
+
383
+ $this->initials = (string) $initials;
384
+ return $this;
385
+ }
386
+
387
+ /**
388
+ * Sets the address prefix
389
+ *
390
+ * @since 1.0.0
391
+ * @param string $prefix
392
+ * @return \Icepay_Order_Address
393
+ */
394
+ public function setPrefix($prefix)
395
+ {
396
+ $this->prefix = (string) $prefix;
397
+ return $this;
398
+ }
399
+
400
+ /**
401
+ * Sets the address lastname
402
+ *
403
+ * @since 1.0.0
404
+ * @param string $lastName
405
+ * @return \Icepay_Order_Address
406
+ */
407
+ public function setLastname($lastName)
408
+ {
409
+ $lastName = preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities(utf8_encode($lastName), ENT_QUOTES, 'UTF-8'));
410
+
411
+ $this->lastName = (string) $lastName;
412
+ return $this;
413
+ }
414
+
415
+ /**
416
+ * Sets the address streetname
417
+ *
418
+ * @since 1.0.0
419
+ * @param string $streetName
420
+ * @return \Icepay_Order_Address
421
+ */
422
+ public function setStreetName($streetName)
423
+ {
424
+ $streetName = preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities(utf8_encode($streetName), ENT_QUOTES, 'UTF-8'));
425
+ $this->street = (string) $streetName;
426
+ return $this;
427
+ }
428
+
429
+ /**
430
+ * Sets the address housenumber
431
+ *
432
+ * @since 1.0.0
433
+ * @param string $houseNumber
434
+ * @return \Icepay_Order_Address
435
+ */
436
+ public function setHouseNumber($houseNumber)
437
+ {
438
+ $this->houseNumber = (string) $houseNumber;
439
+ return $this;
440
+ }
441
+
442
+ /**
443
+ * Sets the address housenumber addition
444
+ *
445
+ * @since 1.0.0
446
+ * @param string $houseNumberAddition
447
+ * @return \Icepay_Order_Address
448
+ */
449
+ public function setHouseNumberAddition($houseNumberAddition)
450
+ {
451
+ $this->houseNumberAddition = (string) $houseNumberAddition;
452
+ return $this;
453
+ }
454
+
455
+ /**
456
+ * Sets the address zipcode
457
+ *
458
+ * @since 1.0.0
459
+ * @param string $zipCode
460
+ * @return \Icepay_Order_Address
461
+ */
462
+ public function setZipCode($zipCode)
463
+ {
464
+ $this->zipCode = (string) $zipCode;
465
+ return $this;
466
+ }
467
+
468
+ /**
469
+ * Sets the address city
470
+ *
471
+ * @since 1.0.0
472
+ * @param string $city
473
+ * @return \Icepay_Order_Address
474
+ */
475
+ public function setCity($city)
476
+ {
477
+ $this->city = (string) $city;
478
+ return $this;
479
+ }
480
+
481
+ /**
482
+ * Sets the address country
483
+ *
484
+ * @since 1.0.0
485
+ * @param string $country
486
+ * @return \Icepay_Order_Address
487
+ */
488
+ public function setCountry($country)
489
+ {
490
+ $this->country = (string) $country;
491
+ return $this;
492
+ }
493
+
494
+ }
495
+
496
+ /**
497
+ * ICEPAY - Webservice Order Helper Class
498
+ *
499
+ * The Order Helper class contains handy fuctions to validate the input, such as a telephonenumber and zipcode check
500
+ *
501
+ * @version 1.0.0
502
+ *
503
+ * @author Wouter van Tilburg
504
+ * @author Olaf Abbenhuis
505
+ * @copyright Copyright (c) 2011-2012, ICEPAY
506
+ */
507
+ class Icepay_Order_Helper {
508
+
509
+ private static $street;
510
+ private static $houseNumber;
511
+ private static $houseNumberAddition;
512
+
513
+ /**
514
+ * Sets and explodes the streetaddress
515
+ *
516
+ * @since 1.0.0
517
+ * @param string Contains the street address
518
+ * @return Icepay_Order_Helper
519
+ */
520
+ public static function setStreetAddress($streetAddress)
521
+ {
522
+ self::explodeStreetAddress($streetAddress);
523
+
524
+ return new self;
525
+ }
526
+
527
+ /**
528
+ * Get the street from address
529
+ *
530
+ * @since 1.0.0
531
+ * @param string Contains the street address
532
+ * @return Icepay_Order_Helper
533
+ */
534
+ public static function getStreetFromAddress($streetAddress = null)
535
+ {
536
+ if ($streetAddress)
537
+ self::explodeStreetAddress($streetAddress);
538
+
539
+ return self::$street;
540
+ }
541
+
542
+ /**
543
+ * Get the housenumber from address
544
+ *
545
+ * @since 1.0.0
546
+ * @param string Contains the street address
547
+ * @return Icepay_Order_Helper
548
+ */
549
+ public static function getHouseNumberFromAddress($streetAddress = null)
550
+ {
551
+ if ($streetAddress)
552
+ self::explodeStreetAddress($streetAddress);
553
+
554
+ return self::$houseNumber;
555
+ }
556
+
557
+ /**
558
+ * Get the housenumber addition from address
559
+ *
560
+ * @since 1.0.0
561
+ * @param string Contains the street address
562
+ * @return Icepay_Order_Helper
563
+ */
564
+ public static function getHouseNumberAdditionFromAddress($streetAddress = null)
565
+ {
566
+ if ($streetAddress)
567
+ self::explodeStreetAddress($streetAddress);
568
+
569
+ return self::$houseNumberAddition;
570
+ }
571
+
572
+ /**
573
+ * Validates a zipcode based on country
574
+ *
575
+ * @since 1.0.0
576
+ * @param string $zipCode A string containing the zipcode
577
+ * @param string $country A string containing the ISO 3166-1 alpha-2 code of the country
578
+ * @example validateZipCode('1122AA', 'NL')
579
+ * @return boolean
580
+ */
581
+ public static function validateZipCode($zipCode, $country)
582
+ {
583
+ switch (strtoupper($country)) {
584
+ case 'NL':
585
+ if (preg_match('/^[1-9]{1}[0-9]{3}[A-Z]{2}$/', $zipCode))
586
+ return true;
587
+ break;
588
+ case 'BE':
589
+ if (preg_match('/^[1-9]{4}$/', $zipCode))
590
+ return true;
591
+ break;
592
+ case 'DE':
593
+ if (preg_match('/^[1-9]{5}$/', $zipCode))
594
+ return true;
595
+ break;
596
+ }
597
+
598
+ return false;
599
+ }
600
+
601
+ /**
602
+ * Validates a phonenumber
603
+ *
604
+ * @since 1.0.0
605
+ * @param string Contains the phonenumber
606
+ * @return boolean
607
+ */
608
+ public static function validatePhonenumber($phoneNumber)
609
+ {
610
+ if (strlen($phoneNumber) < 10) {
611
+ return false;
612
+ }
613
+
614
+ if (preg_match('/^(?:\((\+?\d+)?\)|\+?\d+) ?\d*(-?\d{2,3} ?){0,4}$/', $phoneNumber)) {
615
+ return true;
616
+ }
617
+
618
+ return false;
619
+ }
620
+
621
+ private static function explodeStreetAddress($streetAddress)
622
+ {
623
+
624
+ $streetAddress = utf8_decode($streetAddress);
625
+
626
+ $pattern = '#^(.+\D+){1} ([0-9]{1,})\s?([\s\/]?[0-9]{0,}?[\s\S]{0,}?)?$#i';
627
+
628
+ $aMatch = array();
629
+
630
+ if (preg_match($pattern, $streetAddress, $aMatch)) {
631
+ self::$street = $aMatch[1];
632
+ self::$houseNumber = $aMatch[2];
633
+
634
+ $houseNumberAddition = $aMatch[3];
635
+ $hNa = str_replace('/', '', $houseNumberAddition);
636
+ self::$houseNumberAddition = $hNa;
637
+ }
638
+ }
639
+
640
  }
app/code/community/Icepay/IceAdvanced/Model/Pay.php CHANGED
@@ -1,178 +1,178 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Start payment
5
- * @version 1.0.0
6
- * @author Wouter van Tilburg
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceAdvanced_Model_Pay extends Mage_Payment_Model_Method_Abstract
17
- {
18
-
19
- private $sqlModel;
20
- private $ic_order;
21
-
22
- public function __construct()
23
- {
24
- $this->sqlModel = Mage::getModel('icecore/mysql4_iceCore');
25
- $this->ic_order = Mage::getModel('iceadvanced/order');
26
-
27
- parent::__construct();
28
- }
29
-
30
- public function getCheckoutResult()
31
- {
32
- // Get Magento's checkout session
33
- $session = Mage::getSingleton('checkout/session');
34
-
35
- // Retrieve icepay order
36
- $icedata = $this->sqlModel->loadPaymentByID($session->getLastRealOrderId());
37
-
38
- // Retrieve payment data
39
- $paymentData = unserialize(urldecode($icedata["transaction_data"]));
40
-
41
- // Retrieve merchant id and secretcode
42
- $merchantID = Mage::app()->getStore($icedata["store_id"])->getConfig(Icepay_IceCore_Model_Config::MERCHANTID);
43
- $secretCode = Mage::app()->getStore($icedata["store_id"])->getConfig(Icepay_IceCore_Model_Config::SECRETCODE);
44
-
45
- // Initialize webservice
46
- $webservice = Mage::getModel('Icepay_IceAdvanced_Model_Webservice_Advanced');
47
- $webservice->init($merchantID, $secretCode);
48
-
49
- // Create the PaymentObject
50
- $paymentObject = Mage::getModel('Icepay_IceAdvanced_Model_Checkout_PaymentObject');
51
- $paymentObject->setAmount($paymentData['ic_amount'])
52
- ->setCountry($paymentData['ic_country'])
53
- ->setLanguage($paymentData['ic_language'])
54
- ->setCurrency($paymentData['ic_currency'])
55
- ->setPaymentMethod($paymentData['ic_paymentmethod'])
56
- ->setPaymentMethodIssuer($paymentData['ic_issuer'])
57
- ->setReference($paymentData['ic_reference'])
58
- ->setOrderID($paymentData['ic_orderid'])
59
- ->setDescription($paymentData['ic_description']);
60
-
61
- // Fetch the Icepay_Order class
62
- $ic_order = Mage::getModel('iceadvanced/order');
63
-
64
- if ($webservice->isExtendedCheckout($paymentData['ic_paymentmethod'])) {
65
- try {
66
- // Retrieve Magento Order
67
- $order = Mage::getModel('sales/order')->loadByIncrementId($paymentData['ic_orderid']);
68
-
69
- // Add the consumer information for Afterpay
70
- $consumer = $ic_order->createConsumer()
71
- ->setConsumerID($order->getCustomerName())
72
- ->setEmailAddress($order->getCustomerEmail())
73
- ->setPhoneNumber($order->getBillingAddress()->getTelephone());
74
-
75
- $ic_order->setConsumer($consumer);
76
-
77
- // Add the billing address information for Afterpay
78
- $billingStreetaddress = implode(' ', $order->getBillingAddress()->getStreet());
79
-
80
- $billingAddress = $ic_order->createAddress()
81
- ->setInitials($order->getBillingAddress()->getFirstname())
82
- ->setPrefix($order->getBillingAddress()->getPrefix())
83
- ->setLastName($order->getBillingAddress()->getLastname())
84
- ->setStreetName(Icepay_Order_Helper::getStreetFromAddress($billingStreetaddress))
85
- ->setHouseNumber(Icepay_Order_Helper::getHouseNumberFromAddress())
86
- ->setHouseNumberAddition(Icepay_Order_Helper::getHouseNumberAdditionFromAddress())
87
- ->setZipCode($order->getBillingAddress()->getPostcode())
88
- ->setCity($order->getBillingAddress()->getCity())
89
- ->setCountry($order->getBillingAddress()->getCountry());
90
-
91
- $ic_order->setBillingAddress($billingAddress);
92
-
93
- // Add the shipping address information for Afterpay
94
- $shippingStreetAddress = implode(' ', $order->getShippingAddress()->getStreet());
95
-
96
- $shippingAddress = $ic_order->createAddress()
97
- ->setInitials($order->getShippingAddress()->getFirstname())
98
- ->setPrefix($order->getShippingAddress()->getPrefix())
99
- ->setLastName($order->getShippingAddress()->getLastname())
100
- ->setStreetName(Icepay_Order_Helper::getStreetFromAddress($shippingStreetAddress))
101
- ->setHouseNumber(Icepay_Order_Helper::getHouseNumberFromAddress())
102
- ->setHouseNumberAddition(Icepay_Order_Helper::getHouseNumberAdditionFromAddress())
103
- ->setZipCode($order->getShippingAddress()->getPostcode())
104
- ->setCity($order->getShippingAddress()->getCity())
105
- ->setCountry($order->getShippingAddress()->getCountry());
106
-
107
- $ic_order->setShippingAddress($shippingAddress);
108
-
109
-
110
- foreach ($order->getAllItems() as $orderItem) {
111
- if (empty($orderItem) || $orderItem->hasParentItemId()) {
112
- continue;
113
- }
114
-
115
- $itemData = $orderItem->getData();
116
-
117
- //for compatibility reasons, $orderItem->getProduct() was not used
118
- $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $orderItem->getSku());
119
-
120
- $ic_product = $ic_order->createProduct()
121
- ->setProductID($orderItem->getSku())
122
- ->setProductName($product->getName())
123
- ->setDescription($product->getName())
124
- ->setQuantity((int) $orderItem->getQtyOrdered())
125
- ->setUnitPrice(round(($orderItem->getBasePrice() + bcdiv($orderItem->getBaseTaxAmount(), $orderItem->getQtyOrdered(), 2) + bcdiv($orderItem->getBaseHiddenTaxAmount(), $orderItem->getQtyOrdered(), 2)) * 100, 0))
126
- ->setVATCategory($ic_order->getCategoryForPercentage($itemData['tax_percent']));
127
-
128
- $ic_order->addproduct($ic_product);
129
- }
130
-
131
- $orderData = $order->getData();
132
-
133
- // Set total order discount if any
134
- $discount = $orderData['base_discount_amount'] * 100;
135
-
136
- if ($discount != '0')
137
- $ic_order->setOrderDiscountAmount(-$discount);
138
-
139
- // Set shipping costs
140
- if ($orderData['shipping_amount'] != 0) {
141
- $shippingCosts = ($orderData['shipping_amount'] + $orderData['shipping_tax_amount']) * 100;
142
- $shippingTax = $orderData['shipping_tax_amount'] / $orderData['shipping_amount'] * 100;
143
-
144
- $ic_order->setShippingCosts($shippingCosts, $shippingTax);
145
- } else {
146
- $ic_order->setShippingCosts(0, -1);
147
- }
148
-
149
- if (Mage::helper('icecore')->isModuleInstalled('MageWorx_MultiFees')) {
150
- $multiFeesExtension = Mage::getModel('iceadvanced/extensions_Mageworx_MultiFees');
151
- $ic_order = $multiFeesExtension->addPrice(unserialize($order->getDetailsMultifees()), $ic_order);
152
- }
153
-
154
- if (Mage::helper('icecore')->isModuleInstalled('MW_GiftWrap')) {
155
- $giftWrapExtension = Mage::getModel('iceadvanced/extensions_MW_GiftWrap');
156
- $ic_order = $giftWrapExtension->addGiftWrapPrices($session->getLastQuoteId(), $ic_order);
157
- }
158
-
159
- if (Mage::helper('icecore')->isModuleInstalled('Magestore_Customerreward')) {
160
- $customerRewardExtension = Mage::getModel('iceadvanced/extensions_MS_Customerreward');
161
- $ic_order = $customerRewardExtension->addCustomerRewardPrices($orderData, $ic_order);
162
- }
163
-
164
- // Log the XML Send
165
- Mage::helper("icecore")->log(serialize($ic_order->getXML()));
166
- } catch (Exception $e) {
167
- return $e->getMessage();
168
- }
169
- }
170
-
171
- try {
172
- return $webservice->doCheckout($paymentObject, $ic_order);
173
- } catch (Exception $e) {
174
- return $e->getMessage();
175
- }
176
- }
177
-
178
- }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Start payment
5
+ * @version 1.0.0
6
+ * @author Wouter van Tilburg
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceAdvanced_Model_Pay extends Mage_Payment_Model_Method_Abstract
17
+ {
18
+
19
+ private $sqlModel;
20
+ private $ic_order;
21
+
22
+ public function __construct()
23
+ {
24
+ $this->sqlModel = Mage::getModel('icecore/mysql4_iceCore');
25
+ $this->ic_order = Mage::getModel('iceadvanced/order');
26
+
27
+ parent::__construct();
28
+ }
29
+
30
+ public function getCheckoutResult()
31
+ {
32
+ // Get Magento's checkout session
33
+ $session = Mage::getSingleton('checkout/session');
34
+
35
+ // Retrieve icepay order
36
+ $icedata = $this->sqlModel->loadPaymentByID($session->getLastRealOrderId());
37
+
38
+ // Retrieve payment data
39
+ $paymentData = unserialize(urldecode($icedata["transaction_data"]));
40
+
41
+ // Retrieve merchant id and secretcode
42
+ $merchantID = Mage::app()->getStore($icedata["store_id"])->getConfig(Icepay_IceCore_Model_Config::MERCHANTID);
43
+ $secretCode = Mage::app()->getStore($icedata["store_id"])->getConfig(Icepay_IceCore_Model_Config::SECRETCODE);
44
+
45
+ // Initialize webservice
46
+ $webservice = Mage::getModel('Icepay_IceAdvanced_Model_Webservice_Advanced');
47
+ $webservice->init($merchantID, $secretCode);
48
+
49
+ // Create the PaymentObject
50
+ $paymentObject = Mage::getModel('Icepay_IceAdvanced_Model_Checkout_PaymentObject');
51
+ $paymentObject->setAmount($paymentData['ic_amount'])
52
+ ->setCountry($paymentData['ic_country'])
53
+ ->setLanguage($paymentData['ic_language'])
54
+ ->setCurrency($paymentData['ic_currency'])
55
+ ->setPaymentMethod($paymentData['ic_paymentmethod'])
56
+ ->setPaymentMethodIssuer($paymentData['ic_issuer'])
57
+ ->setReference($paymentData['ic_reference'])
58
+ ->setOrderID($paymentData['ic_orderid'])
59
+ ->setDescription($paymentData['ic_description']);
60
+
61
+ // Fetch the Icepay_Order class
62
+ $ic_order = Mage::getModel('iceadvanced/order');
63
+
64
+ if ($webservice->isExtendedCheckout($paymentData['ic_paymentmethod'])) {
65
+ try {
66
+ // Retrieve Magento Order
67
+ $order = Mage::getModel('sales/order')->loadByIncrementId($paymentData['ic_orderid']);
68
+
69
+ // Add the consumer information for Afterpay
70
+ $consumer = $ic_order->createConsumer()
71
+ ->setConsumerID($order->getCustomerName())
72
+ ->setEmailAddress($order->getCustomerEmail())
73
+ ->setPhoneNumber($order->getBillingAddress()->getTelephone());
74
+
75
+ $ic_order->setConsumer($consumer);
76
+
77
+ // Add the billing address information for Afterpay
78
+ $billingStreetaddress = implode(' ', $order->getBillingAddress()->getStreet());
79
+
80
+ $billingAddress = $ic_order->createAddress()
81
+ ->setInitials($order->getBillingAddress()->getFirstname())
82
+ ->setPrefix($order->getBillingAddress()->getPrefix())
83
+ ->setLastName($order->getBillingAddress()->getLastname())
84
+ ->setStreetName(Icepay_Order_Helper::getStreetFromAddress($billingStreetaddress))
85
+ ->setHouseNumber(Icepay_Order_Helper::getHouseNumberFromAddress())
86
+ ->setHouseNumberAddition(Icepay_Order_Helper::getHouseNumberAdditionFromAddress())
87
+ ->setZipCode($order->getBillingAddress()->getPostcode())
88
+ ->setCity($order->getBillingAddress()->getCity())
89
+ ->setCountry($order->getBillingAddress()->getCountry());
90
+
91
+ $ic_order->setBillingAddress($billingAddress);
92
+
93
+ // Add the shipping address information for Afterpay
94
+ $shippingStreetAddress = implode(' ', $order->getShippingAddress()->getStreet());
95
+
96
+ $shippingAddress = $ic_order->createAddress()
97
+ ->setInitials($order->getShippingAddress()->getFirstname())
98
+ ->setPrefix($order->getShippingAddress()->getPrefix())
99
+ ->setLastName($order->getShippingAddress()->getLastname())
100
+ ->setStreetName(Icepay_Order_Helper::getStreetFromAddress($shippingStreetAddress))
101
+ ->setHouseNumber(Icepay_Order_Helper::getHouseNumberFromAddress())
102
+ ->setHouseNumberAddition(Icepay_Order_Helper::getHouseNumberAdditionFromAddress())
103
+ ->setZipCode($order->getShippingAddress()->getPostcode())
104
+ ->setCity($order->getShippingAddress()->getCity())
105
+ ->setCountry($order->getShippingAddress()->getCountry());
106
+
107
+ $ic_order->setShippingAddress($shippingAddress);
108
+
109
+
110
+ foreach ($order->getAllItems() as $orderItem) {
111
+ if (empty($orderItem) || $orderItem->hasParentItemId()) {
112
+ continue;
113
+ }
114
+
115
+ $itemData = $orderItem->getData();
116
+
117
+ //for compatibility reasons, $orderItem->getProduct() was not used
118
+ $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $orderItem->getSku());
119
+
120
+ $ic_product = $ic_order->createProduct()
121
+ ->setProductID($orderItem->getSku())
122
+ ->setProductName($product->getName())
123
+ ->setDescription($product->getName())
124
+ ->setQuantity((int) $orderItem->getQtyOrdered())
125
+ ->setUnitPrice(round(($orderItem->getBasePrice() + bcdiv($orderItem->getBaseTaxAmount(), $orderItem->getQtyOrdered(), 2) + bcdiv($orderItem->getBaseHiddenTaxAmount(), $orderItem->getQtyOrdered(), 2)) * 100, 0))
126
+ ->setVATCategory($ic_order->getCategoryForPercentage($itemData['tax_percent']));
127
+
128
+ $ic_order->addproduct($ic_product);
129
+ }
130
+
131
+ $orderData = $order->getData();
132
+
133
+ // Set total order discount if any
134
+ $discount = $orderData['base_discount_amount'] * 100;
135
+
136
+ if ($discount != '0')
137
+ $ic_order->setOrderDiscountAmount(-$discount);
138
+
139
+ // Set shipping costs
140
+ if ($orderData['shipping_amount'] != 0) {
141
+ $shippingCosts = ($orderData['shipping_amount'] + $orderData['shipping_tax_amount']) * 100;
142
+ $shippingTax = $orderData['shipping_tax_amount'] / $orderData['shipping_amount'] * 100;
143
+
144
+ $ic_order->setShippingCosts($shippingCosts, $shippingTax);
145
+ } else {
146
+ $ic_order->setShippingCosts(0, -1);
147
+ }
148
+
149
+ if (Mage::helper('icecore')->isModuleInstalled('MageWorx_MultiFees')) {
150
+ $multiFeesExtension = Mage::getModel('iceadvanced/extensions_Mageworx_MultiFees');
151
+ $ic_order = $multiFeesExtension->addPrice(unserialize($order->getDetailsMultifees()), $ic_order);
152
+ }
153
+
154
+ if (Mage::helper('icecore')->isModuleInstalled('MW_GiftWrap')) {
155
+ $giftWrapExtension = Mage::getModel('iceadvanced/extensions_MW_GiftWrap');
156
+ $ic_order = $giftWrapExtension->addGiftWrapPrices($session->getLastQuoteId(), $ic_order);
157
+ }
158
+
159
+ if (Mage::helper('icecore')->isModuleInstalled('Magestore_Customerreward')) {
160
+ $customerRewardExtension = Mage::getModel('iceadvanced/extensions_MS_Customerreward');
161
+ $ic_order = $customerRewardExtension->addCustomerRewardPrices($orderData, $ic_order);
162
+ }
163
+
164
+ // Log the XML Send
165
+ Mage::helper("icecore")->log(serialize($ic_order->getXML()));
166
+ } catch (Exception $e) {
167
+ return $e->getMessage();
168
+ }
169
+ }
170
+
171
+ try {
172
+ return $webservice->doCheckout($paymentObject, $ic_order);
173
+ } catch (Exception $e) {
174
+ return $e->getMessage();
175
+ }
176
+ }
177
+
178
+ }
app/code/community/Icepay/IceAdvanced/Model/Paymentmethods.php CHANGED
@@ -1,110 +1,110 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Webservice Paymentmethods
5
- * @version 2.0.0
6
- * @author Wouter van Tilburg
7
- * @author Olaf Abbenhuis
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceAdvanced_Model_Paymentmethods {
18
-
19
- protected $storeID = null;
20
- private $messages = array();
21
-
22
- public function retrieveAdminGrid($storeID)
23
- {
24
- $this->storeID = $storeID;
25
-
26
- return $this->retrievePaymentmethods();
27
- }
28
-
29
- public function retrievePaymentmethods()
30
- {
31
- $merchantID = Mage::getStoreConfig('icecore/settings/merchant_id', $this->storeID);
32
- $secretCode = Mage::getStoreConfig('icecore/settings/merchant_secret', $this->storeID);
33
-
34
- $submitObject = new stdClass();
35
-
36
- $webservice = Mage::getModel('Icepay_IceAdvanced_Model_Webservice_Advanced');
37
- $webservice->init($merchantID, $secretCode);
38
-
39
- try {
40
- $paymentMethods = $webservice->getMyPaymentMethods();
41
- $this->addMessage('SOAP connection established', 'ok');
42
-
43
- if (isset($paymentMethods->GetMyPaymentMethodsResult->PaymentMethods->PaymentMethod)) {
44
- $pMethods = $this->clean($paymentMethods->GetMyPaymentMethodsResult->PaymentMethods->PaymentMethod);
45
-
46
- $this->addMessage(sprintf(Mage::helper('iceadvanced')->__('%s active paymentmethods found'), count($pMethods)), 'ok');
47
-
48
- // Add issuers
49
- $issuerObj = array();
50
- foreach ($pMethods as $value) {
51
- $arr = array(
52
- 'merchant' => $merchantID,
53
- 'code' => $value->PaymentMethodCode,
54
- 'issuers' => $value->Issuers->Issuer
55
- );
56
- array_push($issuerObj, array(
57
- 'pmcode' => $value->PaymentMethodCode,
58
- 'data' => urlencode(serialize($arr))
59
- ));
60
- }
61
-
62
- $submitObject->paymentmethods = Mage::helper("iceadvanced")->addIcons($pMethods);
63
-
64
- $submitObject->issuers = $issuerObj;
65
- } else {
66
- $this->addMessage(Mage::helper('iceadvanced')->__('No active paymentmethods found'));
67
- }
68
- } catch (Exception $e) {
69
- $this->addMessage('SOAP connection established', 'ok');
70
- $this->addMessage($e->getMessage());
71
- }
72
-
73
- $submitObject->msg = $this->messages;
74
-
75
- return $submitObject;
76
- }
77
-
78
- private function clean($paymentMethods)
79
- {
80
- //Convert to array (in case one payment method is active)
81
- $pMethodsArray = Mage::helper('icecore')->makeArray($paymentMethods);
82
-
83
- //Filter
84
- $pMethods = array_values($this->filterPaymentmethods($pMethodsArray));
85
-
86
- return $pMethods;
87
- }
88
-
89
- private function filterPaymentmethods($paymentMethods)
90
- {
91
- $filter = Mage::helper("iceadvanced")->filteredPaymentmethods;
92
- foreach (array_keys((array) $paymentMethods) as $key) {
93
- if (in_array($paymentMethods[$key]->PaymentMethodCode, $filter))
94
- unset($paymentMethods[$key]);
95
- };
96
- return $paymentMethods;
97
- }
98
-
99
- private function addMessage($val, $type = 'err')
100
- {
101
- $msg = new stdClass();
102
- $msg->type = $type;
103
- $msg->msg = Mage::helper('iceadvanced')->__($val);
104
-
105
- array_push($this->messages, $msg);
106
- }
107
-
108
- }
109
-
110
  ?>
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Webservice Paymentmethods
5
+ * @version 2.0.0
6
+ * @author Wouter van Tilburg
7
+ * @author Olaf Abbenhuis
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceAdvanced_Model_Paymentmethods {
18
+
19
+ protected $storeID = null;
20
+ private $messages = array();
21
+
22
+ public function retrieveAdminGrid($storeID)
23
+ {
24
+ $this->storeID = $storeID;
25
+
26
+ return $this->retrievePaymentmethods();
27
+ }
28
+
29
+ public function retrievePaymentmethods()
30
+ {
31
+ $merchantID = Mage::getStoreConfig('icecore/settings/merchant_id', $this->storeID);
32
+ $secretCode = Mage::getStoreConfig('icecore/settings/merchant_secret', $this->storeID);
33
+
34
+ $submitObject = new stdClass();
35
+
36
+ $webservice = Mage::getModel('Icepay_IceAdvanced_Model_Webservice_Advanced');
37
+ $webservice->init($merchantID, $secretCode);
38
+
39
+ try {
40
+ $paymentMethods = $webservice->getMyPaymentMethods();
41
+ $this->addMessage('SOAP connection established', 'ok');
42
+
43
+ if (isset($paymentMethods->GetMyPaymentMethodsResult->PaymentMethods->PaymentMethod)) {
44
+ $pMethods = $this->clean($paymentMethods->GetMyPaymentMethodsResult->PaymentMethods->PaymentMethod);
45
+
46
+ $this->addMessage(sprintf(Mage::helper('iceadvanced')->__('%s active paymentmethods found'), count($pMethods)), 'ok');
47
+
48
+ // Add issuers
49
+ $issuerObj = array();
50
+ foreach ($pMethods as $value) {
51
+ $arr = array(
52
+ 'merchant' => $merchantID,
53
+ 'code' => $value->PaymentMethodCode,
54
+ 'issuers' => $value->Issuers->Issuer
55
+ );
56
+ array_push($issuerObj, array(
57
+ 'pmcode' => $value->PaymentMethodCode,
58
+ 'data' => urlencode(serialize($arr))
59
+ ));
60
+ }
61
+
62
+ $submitObject->paymentmethods = Mage::helper("iceadvanced")->addIcons($pMethods);
63
+
64
+ $submitObject->issuers = $issuerObj;
65
+ } else {
66
+ $this->addMessage(Mage::helper('iceadvanced')->__('No active paymentmethods found'));
67
+ }
68
+ } catch (Exception $e) {
69
+ $this->addMessage('SOAP connection established', 'ok');
70
+ $this->addMessage($e->getMessage());
71
+ }
72
+
73
+ $submitObject->msg = $this->messages;
74
+
75
+ return $submitObject;
76
+ }
77
+
78
+ private function clean($paymentMethods)
79
+ {
80
+ //Convert to array (in case one payment method is active)
81
+ $pMethodsArray = Mage::helper('icecore')->makeArray($paymentMethods);
82
+
83
+ //Filter
84
+ $pMethods = array_values($this->filterPaymentmethods($pMethodsArray));
85
+
86
+ return $pMethods;
87
+ }
88
+
89
+ private function filterPaymentmethods($paymentMethods)
90
+ {
91
+ $filter = Mage::helper("iceadvanced")->filteredPaymentmethods;
92
+ foreach (array_keys((array) $paymentMethods) as $key) {
93
+ if (in_array($paymentMethods[$key]->PaymentMethodCode, $filter))
94
+ unset($paymentMethods[$key]);
95
+ };
96
+ return $paymentMethods;
97
+ }
98
+
99
+ private function addMessage($val, $type = 'err')
100
+ {
101
+ $msg = new stdClass();
102
+ $msg->type = $type;
103
+ $msg->msg = Mage::helper('iceadvanced')->__($val);
104
+
105
+ array_push($this->messages, $msg);
106
+ }
107
+
108
+ }
109
+
110
  ?>
app/code/community/Icepay/IceAdvanced/Model/Webservice/Advanced.php CHANGED
@@ -1,95 +1,95 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Webservice
5
- *
6
- * @version 1.0.1
7
- * @author Wouter van Tilburg <wouter@icepay.eu>
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceAdvanced_Model_Webservice_Advanced extends Icepay_IceCore_Model_Webservice_Core {
18
-
19
- private $extendedCheckoutMethods = array('AFTERPAY');
20
-
21
- /**
22
- * Retrieve and return merchant's paymentmethods
23
- *
24
- * @since 1.0.0
25
- * @return object
26
- */
27
- public function getMyPaymentMethods()
28
- {
29
- $obj = new stdClass();
30
-
31
- $obj->MerchantID = $this->getMerchantID();
32
- $obj->SecretCode = $this->getSecretCode();
33
- $obj->Timestamp = $this->getTimeStamp();
34
- $obj->Checksum = $this->generateChecksum($obj);
35
-
36
- return $this->client->GetMyPaymentMethods(array('request' => $obj));
37
- }
38
-
39
- /**
40
- * Create transaction and return result
41
- *
42
- * @param object $paymentObj
43
- *
44
- * @since 1.0.0
45
- * @return array
46
- */
47
- public function doCheckout($paymentObj, $orderObj = null)
48
- {
49
- $obj = new StdClass();
50
-
51
- $obj->MerchantID = $this->getMerchantID();
52
- $obj->Timestamp = $this->getTimeStamp();
53
- $obj->Amount = $paymentObj->getAmount();
54
- $obj->Country = $paymentObj->getCountry();
55
- $obj->Currency = $paymentObj->getCurrency();
56
- $obj->Description = $paymentObj->getDescription();
57
- $obj->EndUserIP = $this->getIP();
58
- $obj->Issuer = $paymentObj->getPaymentMethodIssuer();
59
- $obj->Language = $paymentObj->getLanguage();
60
- $obj->OrderID = $paymentObj->getOrderID();
61
- $obj->PaymentMethod = $paymentObj->getPaymentMethod();
62
- $obj->Reference = $paymentObj->getReference();
63
- $obj->URLCompleted = '';
64
- $obj->URLError = '';
65
-
66
- if ($this->isExtendedCheckout($obj->PaymentMethod))
67
- $obj->XML = $orderObj->getXML();
68
-
69
- $obj->Checksum = $this->generateChecksum($obj, $this->getSecretCode());
70
-
71
- if ($this->isExtendedCheckout($obj->PaymentMethod)) {
72
- $result = $this->client->CheckoutExtended(array('request' => $obj));
73
- } else {
74
- $result = $this->client->Checkout(array('request' => $obj));
75
- }
76
-
77
- return (array) $result;
78
- }
79
-
80
- /**
81
- * Checks if paymentmethod requires extended checkout
82
- *
83
- * @param object $paymentMethod
84
- *
85
- * @since 1.0.0
86
- * @return bool
87
- */
88
- public function isExtendedCheckout($paymentMethod)
89
- {
90
- $paymentMethod = strtoupper($paymentMethod);
91
-
92
- return (bool) in_array($paymentMethod, $this->extendedCheckoutMethods);
93
- }
94
-
95
- }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Webservice
5
+ *
6
+ * @version 1.0.1
7
+ * @author Wouter van Tilburg <wouter@icepay.eu>
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceAdvanced_Model_Webservice_Advanced extends Icepay_IceCore_Model_Webservice_Core {
18
+
19
+ private $extendedCheckoutMethods = array('AFTERPAY');
20
+
21
+ /**
22
+ * Retrieve and return merchant's paymentmethods
23
+ *
24
+ * @since 1.0.0
25
+ * @return object
26
+ */
27
+ public function getMyPaymentMethods()
28
+ {
29
+ $obj = new stdClass();
30
+
31
+ $obj->MerchantID = $this->getMerchantID();
32
+ $obj->SecretCode = $this->getSecretCode();
33
+ $obj->Timestamp = $this->getTimeStamp();
34
+ $obj->Checksum = $this->generateChecksum($obj);
35
+
36
+ return $this->client->GetMyPaymentMethods(array('request' => $obj));
37
+ }
38
+
39
+ /**
40
+ * Create transaction and return result
41
+ *
42
+ * @param object $paymentObj
43
+ *
44
+ * @since 1.0.0
45
+ * @return array
46
+ */
47
+ public function doCheckout($paymentObj, $orderObj = null)
48
+ {
49
+ $obj = new StdClass();
50
+
51
+ $obj->MerchantID = $this->getMerchantID();
52
+ $obj->Timestamp = $this->getTimeStamp();
53
+ $obj->Amount = $paymentObj->getAmount();
54
+ $obj->Country = $paymentObj->getCountry();
55
+ $obj->Currency = $paymentObj->getCurrency();
56
+ $obj->Description = $paymentObj->getDescription();
57
+ $obj->EndUserIP = $this->getIP();
58
+ $obj->Issuer = $paymentObj->getPaymentMethodIssuer();
59
+ $obj->Language = $paymentObj->getLanguage();
60
+ $obj->OrderID = $paymentObj->getOrderID();
61
+ $obj->PaymentMethod = $paymentObj->getPaymentMethod();
62
+ $obj->Reference = $paymentObj->getReference();
63
+ $obj->URLCompleted = '';
64
+ $obj->URLError = '';
65
+
66
+ if ($this->isExtendedCheckout($obj->PaymentMethod))
67
+ $obj->XML = $orderObj->getXML();
68
+
69
+ $obj->Checksum = $this->generateChecksum($obj, $this->getSecretCode());
70
+
71
+ if ($this->isExtendedCheckout($obj->PaymentMethod)) {
72
+ $result = $this->client->CheckoutExtended(array('request' => $obj));
73
+ } else {
74
+ $result = $this->client->Checkout(array('request' => $obj));
75
+ }
76
+
77
+ return (array) $result;
78
+ }
79
+
80
+ /**
81
+ * Checks if paymentmethod requires extended checkout
82
+ *
83
+ * @param object $paymentMethod
84
+ *
85
+ * @since 1.0.0
86
+ * @return bool
87
+ */
88
+ public function isExtendedCheckout($paymentMethod)
89
+ {
90
+ $paymentMethod = strtoupper($paymentMethod);
91
+
92
+ return (bool) in_array($paymentMethod, $this->extendedCheckoutMethods);
93
+ }
94
+
95
+ }
app/code/community/Icepay/IceAdvanced/Model/Webservice/Refund.php CHANGED
@@ -1,52 +1,52 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advamced - Webservice Refund Model
5
- *
6
- * @version 1.0.0
7
- * @author Wouter van Tilburg <wouter@icepay.eu>
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceAdvanced_Model_Webservice_Refund extends Icepay_IceCore_Model_Webservice_Core {
18
-
19
- protected $serviceURL = 'https://connect.icepay.com/webservice/refund.svc?wsdl';
20
-
21
- /**
22
- * Request a full or partial refund
23
- *
24
- * @param int $paymentID
25
- * @param int $refundAmount
26
- * @param string $refundCurrency
27
- *
28
- * @since 1.0.0
29
- * @return array
30
- */
31
- public function requestRefund($paymentID, $refundAmount, $refundCurrency)
32
- {
33
- $obj = new stdClass();
34
-
35
- // Must be in specific order for checksum --
36
- $obj->Secret = $this->getSecretCode();
37
- $obj->MerchantID = $this->getMerchantID();
38
- $obj->Timestamp = $this->getTimeStamp();
39
- $obj->PaymentID = $paymentID;
40
- $obj->RefundAmount = $refundAmount;
41
- $obj->RefundCurrency = $refundCurrency;
42
-
43
- // Generate Checksum
44
- $obj->Checksum = $this->generateChecksum($obj);
45
-
46
- // Ask for getPaymentRefunds and get response
47
- $result = $this->client->requestRefund($obj);
48
-
49
- return (array) $result->RequestRefundResult;
50
- }
51
- }
52
-
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advamced - Webservice Refund Model
5
+ *
6
+ * @version 1.0.0
7
+ * @author Wouter van Tilburg <wouter@icepay.eu>
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceAdvanced_Model_Webservice_Refund extends Icepay_IceCore_Model_Webservice_Core {
18
+
19
+ protected $serviceURL = 'https://connect.icepay.com/webservice/refund.svc?wsdl';
20
+
21
+ /**
22
+ * Request a full or partial refund
23
+ *
24
+ * @param int $paymentID
25
+ * @param int $refundAmount
26
+ * @param string $refundCurrency
27
+ *
28
+ * @since 1.0.0
29
+ * @return array
30
+ */
31
+ public function requestRefund($paymentID, $refundAmount, $refundCurrency)
32
+ {
33
+ $obj = new stdClass();
34
+
35
+ // Must be in specific order for checksum --
36
+ $obj->Secret = $this->getSecretCode();
37
+ $obj->MerchantID = $this->getMerchantID();
38
+ $obj->Timestamp = $this->getTimeStamp();
39
+ $obj->PaymentID = $paymentID;
40
+ $obj->RefundAmount = $refundAmount;
41
+ $obj->RefundCurrency = $refundCurrency;
42
+
43
+ // Generate Checksum
44
+ $obj->Checksum = $this->generateChecksum($obj);
45
+
46
+ // Ask for getPaymentRefunds and get response
47
+ $result = $this->client->requestRefund($obj);
48
+
49
+ return (array) $result->RequestRefundResult;
50
+ }
51
+ }
52
+
app/code/community/Icepay/IceAdvanced/controllers/{AjaxController.php → Adminhtml/Iceadvanced/AjaxController.php} RENAMED
@@ -1,75 +1,74 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - AJAX controller
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceAdvanced_AjaxController extends Mage_Adminhtml_Controller_Action
17
- {
18
-
19
- protected $webservice = null;
20
-
21
- public function iceWebservice()
22
- {
23
- if ($this->webservice == null)
24
- $this->webservice = new Icepay_IceAdvanced_Model_Paymentmethods();
25
- return $this->webservice;
26
- }
27
-
28
- /**
29
- * SUPEE-6285
30
- * @see http://magento.stackexchange.com/a/73649/28266
31
- */
32
- protected function _isAllowed()
33
- {
34
- return true;
35
- }
36
-
37
- public function indexAction()
38
- {
39
- $this->loadLayout();
40
- $this->renderLayout();
41
- }
42
-
43
- public function get_paymentmethodsAction()
44
- {
45
- $this->getResponse()->setBody(Zend_Json::encode($this->iceWebservice()->retrieveAdminGrid($this->getRequest()->get("store"))));
46
- }
47
-
48
- public function save_paymentmethodAction()
49
- {
50
- $adv_sql = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
51
-
52
- $reference = $this->getRequest()->getPost("reference");
53
- $scopeID = $this->getRequest()->getPost("store");
54
-
55
- if (!isset($reference))
56
- return;
57
-
58
- $adv_sql->setScope($scopeID);
59
-
60
- $settings = Mage::helper("iceadvanced")->getPaymentmethodExtraSettings();
61
-
62
- if ($this->getRequest()->getPost("active_issuers")) {
63
- $issuers = explode(",", $this->getRequest()->getPost("active_issuers"));
64
- if (count($issuers) >= 1)
65
- array_push($settings, "active_issuers"); //At least 1 issuer active is required
66
- }
67
-
68
- foreach ($settings as $setting) {
69
- $adv_sql->saveConfigValue($reference, $setting, $this->getRequest()->getPost($setting));
70
- }
71
-
72
- $this->getResponse()->setBody(sprintf($this->__("%s settings have been saved."), $this->getRequest()->getPost("name")));
73
- }
74
-
75
- }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - AJAX controller
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceAdvanced_Adminhtml_Iceadvanced_AjaxController extends Mage_Adminhtml_Controller_Action
17
+ {
18
+ protected $webservice = null;
19
+
20
+ public function iceWebservice()
21
+ {
22
+ if ($this->webservice == null)
23
+ $this->webservice = new Icepay_IceAdvanced_Model_Paymentmethods();
24
+ return $this->webservice;
25
+ }
26
+
27
+ /**
28
+ * SUPEE-6285
29
+ * @see http://magento.stackexchange.com/a/73649/28266
30
+ */
31
+ protected function _isAllowed()
32
+ {
33
+ return true;
34
+ }
35
+
36
+ public function indexAction()
37
+ {
38
+ $this->loadLayout();
39
+ $this->renderLayout();
40
+ }
41
+
42
+ public function get_paymentmethodsAction()
43
+ {
44
+ $this->getResponse()->setBody(Zend_Json::encode($this->iceWebservice()->retrieveAdminGrid($this->getRequest()->get("store"))));
45
+ }
46
+
47
+ public function save_paymentmethodAction()
48
+ {
49
+ $adv_sql = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
50
+
51
+ $reference = $this->getRequest()->getPost("reference");
52
+ $scopeID = $this->getRequest()->getPost("store");
53
+
54
+ if (!isset($reference))
55
+ return;
56
+
57
+ $adv_sql->setScope($scopeID);
58
+
59
+ $settings = Mage::helper("iceadvanced")->getPaymentmethodExtraSettings();
60
+
61
+ if ($this->getRequest()->getPost("active_issuers")) {
62
+ $issuers = explode(",", $this->getRequest()->getPost("active_issuers"));
63
+ if (count($issuers) >= 1)
64
+ array_push($settings, "active_issuers"); //At least 1 issuer active is required
65
+ }
66
+
67
+ foreach ($settings as $setting) {
68
+ $adv_sql->saveConfigValue($reference, $setting, $this->getRequest()->getPost($setting));
69
+ }
70
+
71
+ $this->getResponse()->setBody(sprintf($this->__("%s settings have been saved."), $this->getRequest()->getPost("name")));
72
+ }
73
+
74
+ }
 
app/code/community/Icepay/IceAdvanced/controllers/{ConfigController.php → Adminhtml/Iceadvanced/ConfigController.php} RENAMED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Adminhtml config controller
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceAdvanced_ConfigController extends Mage_Adminhtml_Controller_Action {
18
-
19
-
20
- /**
21
- * SUPEE-6285
22
- * @see http://magento.stackexchange.com/a/73649/28266
23
- */
24
- protected function _isAllowed()
25
- {
26
- return true;
27
- }
28
-
29
- public function indexAction() {
30
-
31
- $paymentmethod = $this->getRequest()->get("paymentmethod");
32
- $scopeID = $this->getRequest()->get("store");
33
-
34
- $this->getResponse()->setBody(
35
- $this->getLayout()->createBlock("iceadvanced/adminhtml_setting_paymentmethod")->setPaymentmethod($paymentmethod,$scopeID)->toHtml()
36
- );
37
-
38
- }
39
-
40
-
41
-
42
- }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Adminhtml config controller
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceAdvanced_Adminhtml_Iceadvanced_ConfigController extends Mage_Adminhtml_Controller_Action {
18
+
19
+
20
+ /**
21
+ * SUPEE-6285
22
+ * @see http://magento.stackexchange.com/a/73649/28266
23
+ */
24
+ protected function _isAllowed()
25
+ {
26
+ return true;
27
+ }
28
+
29
+ public function indexAction() {
30
+
31
+ $paymentmethod = $this->getRequest()->get("paymentmethod");
32
+ $scopeID = $this->getRequest()->get("store");
33
+
34
+ $this->getResponse()->setBody(
35
+ $this->getLayout()->createBlock("iceadvanced/adminhtml_setting_paymentmethod")->setPaymentmethod($paymentmethod,$scopeID)->toHtml()
36
+ );
37
+
38
+ }
39
+
40
+
41
+
42
+ }
app/code/community/Icepay/IceAdvanced/controllers/ProcessingController.php CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Advanced - Process payment
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceAdvanced_ProcessingController extends Mage_Core_Controller_Front_Action {
17
-
18
- public function indexAction()
19
- {
20
- $this->loadLayout();
21
- $this->renderLayout();
22
- }
23
-
24
- public function payAction()
25
- {
26
- $pay = Mage::getModel('iceadvanced/pay');
27
- $result = $pay->getCheckoutResult();
28
-
29
- if (!is_array($result)) {
30
- Mage::getSingleton('checkout/session')->setErrorMessage(sprintf($this->__("The payment provider has returned the following error message: %s"), $result));
31
- parent::_redirect('checkout/onepage/failure');
32
- } else {
33
- $checkoutResult = (isset($result['CheckoutExtendedResult'])) ? $result['CheckoutExtendedResult'] : $result['CheckoutResult'];
34
-
35
- $this->getResponse()->setBody($this->__("Redirecting"))->setRedirect($checkoutResult->PaymentScreenURL);
36
- }
37
- }
38
-
39
- }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Advanced - Process payment
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceAdvanced_ProcessingController extends Mage_Core_Controller_Front_Action {
17
+
18
+ public function indexAction()
19
+ {
20
+ $this->loadLayout();
21
+ $this->renderLayout();
22
+ }
23
+
24
+ public function payAction()
25
+ {
26
+ $pay = Mage::getModel('iceadvanced/pay');
27
+ $result = $pay->getCheckoutResult();
28
+
29
+ if (!is_array($result)) {
30
+ Mage::getSingleton('checkout/session')->setErrorMessage(sprintf($this->__("The payment provider has returned the following error message: %s"), $result));
31
+ parent::_redirect('checkout/onepage/failure');
32
+ } else {
33
+ $checkoutResult = (isset($result['CheckoutExtendedResult'])) ? $result['CheckoutExtendedResult'] : $result['CheckoutResult'];
34
+
35
+ $this->getResponse()->setBody($this->__("Redirecting"))->setRedirect($checkoutResult->PaymentScreenURL);
36
+ }
37
+ }
38
+
39
+ }
app/code/community/Icepay/IceAdvanced/etc/adminhtml.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <iceadvanced translate="title" module="iceadvanced">
12
+ <title>iceadvanced Settings</title>
13
+ </iceadvanced>
14
+ </children>
15
+ </config>
16
+ </children>
17
+ </system>
18
+ </children>
19
+ </admin>
20
+ </resources>
21
+ </acl>
22
+ </config>
app/code/community/Icepay/IceAdvanced/etc/config.xml CHANGED
@@ -1,178 +1,162 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Icepay_IceAdvanced>
5
- <version>1.2.9</version>
6
- </Icepay_IceAdvanced>
7
- </modules>
8
- <frontend>
9
- <routers>
10
- <iceadvanced>
11
- <use>standard</use>
12
- <args>
13
- <module>Icepay_IceAdvanced</module>
14
- <frontName>icepayadvanced</frontName>
15
- </args>
16
- </iceadvanced>
17
- </routers>
18
- <layout>
19
- <updates>
20
- <iceadvanced>
21
- <file>iceadvanced.xml</file>
22
- </iceadvanced>
23
- </updates>
24
- </layout>
25
- <translate>
26
- <modules>
27
- <Icepay_IceAdvanced>
28
- <files>
29
- <default>Icepay_IceAdvanced.csv</default>
30
- </files>
31
- </Icepay_IceAdvanced>
32
- </modules>
33
- </translate>
34
- <events>
35
- <sales_order_place_before>
36
- <observers>
37
- <iceadvanced>
38
- <type>singleton</type>
39
- <class>iceadvanced/observer</class>
40
- <method>sales_order_place_before</method>
41
- </iceadvanced>
42
- </observers>
43
- </sales_order_place_before>
44
- <custom_quote_process>
45
- <observers>
46
- <iceadvanced>
47
- <type>singleton</type>
48
- <class>iceadvanced/observer</class>
49
- <method>custom_quote_process</method>
50
- </iceadvanced>
51
- </observers>
52
- </custom_quote_process>
53
- </events>
54
- </frontend>
55
-
56
- <global>
57
- <models>
58
- <iceadvanced>
59
- <class>Icepay_IceAdvanced_Model</class>
60
- <resourceModel>iceadvanced_mysql4</resourceModel>
61
- </iceadvanced>
62
- <iceadvanced_mysql4>
63
- <class>Icepay_IceAdvanced_Model_Mysql4</class>
64
- <entities>
65
- <icepay_issuerdata>
66
- <table>icepay_issuerdata</table>
67
- </icepay_issuerdata>
68
- <icepay_pmdata>
69
- <table>icepay_pmdata</table>
70
- </icepay_pmdata>
71
- </entities>
72
- </iceadvanced_mysql4>
73
- </models>
74
- <resources>
75
- <icepayadvanced_setup>
76
- <setup>
77
- <module>Icepay_IceAdvanced</module>
78
- </setup>
79
- <connection>
80
- <use>core_setup</use>
81
- </connection>
82
- </icepayadvanced_setup>
83
- <iceadvanced_write>
84
- <connection>
85
- <use>core_write</use>
86
- </connection>
87
- </iceadvanced_write>
88
- <iceadvanced_read>
89
- <connection>
90
- <use>core_read</use>
91
- </connection>
92
- </iceadvanced_read>
93
- </resources>
94
- <blocks>
95
- <iceadvanced>
96
- <class>Icepay_IceAdvanced_Block</class>
97
- </iceadvanced>
98
- </blocks>
99
- <helpers>
100
- <iceadvanced>
101
- <class>Icepay_IceAdvanced_Helper</class>
102
- </iceadvanced>
103
- </helpers>
104
- <events>
105
- <model_save_before>
106
- <observers>
107
- <iceadvanced>
108
- <type>singleton</type>
109
- <class>iceadvanced/observer</class>
110
- <method>model_save_before</method>
111
- </iceadvanced>
112
- </observers>
113
- </model_save_before>
114
- <model_save_after>
115
- <observers>
116
- <iceadvanced>
117
- <type>singleton</type>
118
- <class>iceadvanced/observer</class>
119
- <method>model_save_after</method>
120
- </iceadvanced>
121
- </observers>
122
- </model_save_after>
123
- <sales_order_payment_place_end>
124
- <observers>
125
- <iceadvanced>
126
- <type>singleton</type>
127
- <class>iceadvanced/observer</class>
128
- <method>sales_order_payment_place_end</method>
129
- </iceadvanced>
130
- </observers>
131
- </sales_order_payment_place_end>
132
- </events>
133
- </global>
134
-
135
- <adminhtml>
136
- <translate>
137
- <modules>
138
- <Icepay_IceAdvanced>
139
- <files>
140
- <default>Icepay_IceAdvanced.csv</default>
141
- </files>
142
- </Icepay_IceAdvanced>
143
- </modules>
144
- </translate>
145
-
146
- <acl>
147
- <resources>
148
- <admin>
149
- <children>
150
- <system>
151
- <children>
152
- <config>
153
- <children>
154
- <iceadvanced translate="title" module="iceadvanced">
155
- <title>iceadvanced Settings</title>
156
- </iceadvanced>
157
- </children>
158
- </config>
159
- </children>
160
- </system>
161
- </children>
162
- </admin>
163
- </resources>
164
- </acl>
165
- </adminhtml>
166
-
167
- <admin>
168
- <routers>
169
- <iceadvanced>
170
- <use>admin</use>
171
- <args>
172
- <module>Icepay_IceAdvanced</module>
173
- <frontName>icepayadvanced</frontName>
174
- </args>
175
- </iceadvanced>
176
- </routers>
177
- </admin>
178
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Icepay_IceAdvanced>
5
+ <version>1.2.11</version>
6
+ </Icepay_IceAdvanced>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <iceadvanced>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Icepay_IceAdvanced</module>
14
+ <frontName>icepayadvanced</frontName>
15
+ </args>
16
+ </iceadvanced>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <iceadvanced>
21
+ <file>iceadvanced.xml</file>
22
+ </iceadvanced>
23
+ </updates>
24
+ </layout>
25
+ <translate>
26
+ <modules>
27
+ <Icepay_IceAdvanced>
28
+ <files>
29
+ <default>Icepay_IceAdvanced.csv</default>
30
+ </files>
31
+ </Icepay_IceAdvanced>
32
+ </modules>
33
+ </translate>
34
+ <events>
35
+ <sales_order_place_before>
36
+ <observers>
37
+ <iceadvanced>
38
+ <type>singleton</type>
39
+ <class>iceadvanced/observer</class>
40
+ <method>sales_order_place_before</method>
41
+ </iceadvanced>
42
+ </observers>
43
+ </sales_order_place_before>
44
+ <custom_quote_process>
45
+ <observers>
46
+ <iceadvanced>
47
+ <type>singleton</type>
48
+ <class>iceadvanced/observer</class>
49
+ <method>custom_quote_process</method>
50
+ </iceadvanced>
51
+ </observers>
52
+ </custom_quote_process>
53
+ </events>
54
+ </frontend>
55
+
56
+ <global>
57
+ <models>
58
+ <iceadvanced>
59
+ <class>Icepay_IceAdvanced_Model</class>
60
+ <resourceModel>iceadvanced_mysql4</resourceModel>
61
+ </iceadvanced>
62
+ <iceadvanced_mysql4>
63
+ <class>Icepay_IceAdvanced_Model_Mysql4</class>
64
+ <entities>
65
+ <icepay_issuerdata>
66
+ <table>icepay_issuerdata</table>
67
+ </icepay_issuerdata>
68
+ <icepay_pmdata>
69
+ <table>icepay_pmdata</table>
70
+ </icepay_pmdata>
71
+ </entities>
72
+ </iceadvanced_mysql4>
73
+ </models>
74
+ <resources>
75
+ <icepayadvanced_setup>
76
+ <setup>
77
+ <module>Icepay_IceAdvanced</module>
78
+ </setup>
79
+ <connection>
80
+ <use>core_setup</use>
81
+ </connection>
82
+ </icepayadvanced_setup>
83
+ <iceadvanced_write>
84
+ <connection>
85
+ <use>core_write</use>
86
+ </connection>
87
+ </iceadvanced_write>
88
+ <iceadvanced_read>
89
+ <connection>
90
+ <use>core_read</use>
91
+ </connection>
92
+ </iceadvanced_read>
93
+ </resources>
94
+ <blocks>
95
+ <iceadvanced>
96
+ <class>Icepay_IceAdvanced_Block</class>
97
+ </iceadvanced>
98
+ </blocks>
99
+ <helpers>
100
+ <iceadvanced>
101
+ <class>Icepay_IceAdvanced_Helper</class>
102
+ </iceadvanced>
103
+ </helpers>
104
+ <events>
105
+ <model_save_before>
106
+ <observers>
107
+ <iceadvanced>
108
+ <type>singleton</type>
109
+ <class>iceadvanced/observer</class>
110
+ <method>model_save_before</method>
111
+ </iceadvanced>
112
+ </observers>
113
+ </model_save_before>
114
+ <model_save_after>
115
+ <observers>
116
+ <iceadvanced>
117
+ <type>singleton</type>
118
+ <class>iceadvanced/observer</class>
119
+ <method>model_save_after</method>
120
+ </iceadvanced>
121
+ </observers>
122
+ </model_save_after>
123
+ <sales_order_payment_place_end>
124
+ <observers>
125
+ <iceadvanced>
126
+ <type>singleton</type>
127
+ <class>iceadvanced/observer</class>
128
+ <method>sales_order_payment_place_end</method>
129
+ </iceadvanced>
130
+ </observers>
131
+ </sales_order_payment_place_end>
132
+ </events>
133
+
134
+ <secure_url>
135
+ <icepayadvanced_processing_pay>/icepayadvanced/processing/pay</icepayadvanced_processing_pay>
136
+ </secure_url>
137
+ </global>
138
+
139
+ <adminhtml>
140
+ <translate>
141
+ <modules>
142
+ <Icepay_IceAdvanced>
143
+ <files>
144
+ <default>Icepay_IceAdvanced.csv</default>
145
+ </files>
146
+ </Icepay_IceAdvanced>
147
+ </modules>
148
+ </translate>
149
+ </adminhtml>
150
+
151
+ <admin>
152
+ <routers>
153
+ <adminhtml>
154
+ <args>
155
+ <modules>
156
+ <icepay_iceadvanced after="Mage_Adminhtml">Icepay_IceAdvanced_Adminhtml</icepay_iceadvanced>
157
+ </modules>
158
+ </args>
159
+ </adminhtml>
160
+ </routers>
161
+ </admin>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  </config>
app/code/community/Icepay/IceAdvanced/etc/system.xml CHANGED
@@ -1,48 +1,48 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <sections>
4
- <icecore translate="label" module="icecore">
5
- <label>ICEPAY</label>
6
- <tab>sales</tab>
7
- <frontend_type>text</frontend_type>
8
- <class>icepay-section</class>
9
- <header_css>icepay-header</header_css>
10
- <sort_order>350</sort_order>
11
- <show_in_default>1</show_in_default>
12
- <show_in_website>0</show_in_website>
13
- <show_in_store>1</show_in_store>
14
- <groups>
15
- <advanced_settings translate="label comment">
16
- <label>Paymentmethods</label>
17
- <comment>Configure ICEPAY paymentmethods [STORE VIEW]</comment>
18
- <expanded>0</expanded>
19
- <frontend_type>text</frontend_type>
20
- <sort_order>50</sort_order>
21
- <show_in_default>1</show_in_default>
22
- <show_in_website>0</show_in_website>
23
- <show_in_store>1</show_in_store>
24
- <fields>
25
- <paymentmethods>
26
- <label>Paymentmethods</label>
27
- <frontend_model>iceadvanced/adminhtml_grid_paymentmethods</frontend_model>
28
- <sort_order>20</sort_order>
29
- <show_in_default>1</show_in_default>
30
- <show_in_website>0</show_in_website>
31
- <show_in_store>1</show_in_store>
32
- <config_path>payment/icepay_testicepay/paymentmethods</config_path>
33
- </paymentmethods>
34
- <info>
35
- <label>Configuration Information</label>
36
- <frontend_type>label</frontend_type>
37
- <frontend_model>iceadvanced/adminhtml_checkSettings</frontend_model>
38
- <sort_order>30</sort_order>
39
- <show_in_default>1</show_in_default>
40
- <show_in_website>0</show_in_website>
41
- <show_in_store>1</show_in_store>
42
- </info>
43
- </fields>
44
- </advanced_settings>
45
- </groups>
46
- </icecore>
47
- </sections>
48
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <icecore translate="label" module="icecore">
5
+ <label>ICEPAY</label>
6
+ <tab>sales</tab>
7
+ <frontend_type>text</frontend_type>
8
+ <class>icepay-section</class>
9
+ <header_css>icepay-header</header_css>
10
+ <sort_order>350</sort_order>
11
+ <show_in_default>1</show_in_default>
12
+ <show_in_website>0</show_in_website>
13
+ <show_in_store>1</show_in_store>
14
+ <groups>
15
+ <advanced_settings translate="label comment">
16
+ <label>Paymentmethods</label>
17
+ <comment>Configure ICEPAY paymentmethods [STORE VIEW]</comment>
18
+ <expanded>0</expanded>
19
+ <frontend_type>text</frontend_type>
20
+ <sort_order>50</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>0</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <fields>
25
+ <paymentmethods>
26
+ <label>Paymentmethods</label>
27
+ <frontend_model>iceadvanced/adminhtml_grid_paymentmethods</frontend_model>
28
+ <sort_order>20</sort_order>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>0</show_in_website>
31
+ <show_in_store>1</show_in_store>
32
+ <config_path>payment/icepay_testicepay/paymentmethods</config_path>
33
+ </paymentmethods>
34
+ <info>
35
+ <label>Configuration Information</label>
36
+ <frontend_type>label</frontend_type>
37
+ <frontend_model>iceadvanced/adminhtml_checkSettings</frontend_model>
38
+ <sort_order>30</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>0</show_in_website>
41
+ <show_in_store>1</show_in_store>
42
+ </info>
43
+ </fields>
44
+ </advanced_settings>
45
+ </groups>
46
+ </icecore>
47
+ </sections>
48
  </config>
app/code/community/Icepay/IceAdvanced/sql/icepayadvanced_setup/mysql4-install-1.0.0.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
-
3
- $namespace = Mage::helper('iceadvanced')->section;
4
-
5
- $installer = $this;
6
- $installer->startSetup();
7
-
8
- $conn = $installer->getConnection();
9
- $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace.'/module/title', 'value' => Mage::helper($namespace)->title), array('value'));
10
- $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace.'/module/namespace', 'value' => $namespace), array('value'));
11
-
12
- $installer->run("
13
- CREATE TABLE IF NOT EXISTS `icepay_pmdata` (
14
- `pm_id` int(32) NOT NULL AUTO_INCREMENT,
15
- `pm_code` varchar(120) NOT NULL,
16
- PRIMARY KEY (`pm_id`),
17
- UNIQUE KEY `pm_name` (`pm_code`),
18
- KEY `pm_code` (`pm_code`)
19
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
20
-
21
- CREATE TABLE IF NOT EXISTS `icepay_issuerdata` (
22
- `config_id` int(32) NOT NULL AUTO_INCREMENT,
23
- `pm_code` varchar(32) NOT NULL,
24
- `store_scope_id` int(32) NOT NULL,
25
- `merchant_id` int(32) NOT NULL DEFAULT '0',
26
- `magento_code` varchar(32) NOT NULL,
27
- `issuer_code` varchar(120) NOT NULL,
28
- `issuer_name` varchar(120) NOT NULL,
29
- `issuer_country` text NOT NULL COMMENT 'serialized array',
30
- `issuer_currency` text NOT NULL COMMENT 'serialized array',
31
- `issuer_language` text NOT NULL COMMENT 'serialized array',
32
- `issuer_minimum` varchar(255) NOT NULL COMMENT 'array',
33
- `issuer_maximum` varchar(255) NOT NULL COMMENT 'array',
34
- PRIMARY KEY (`config_id`),
35
- KEY `code` (`pm_code`),
36
- KEY `magento_code` (`magento_code`),
37
- KEY `issuer_code` (`issuer_code`),
38
- KEY `merchant_id` (`merchant_id`)
39
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
40
-
41
- ");
42
-
43
-
44
-
45
  $installer->endSetup();
1
+ <?php
2
+
3
+ $namespace = Mage::helper('iceadvanced')->section;
4
+
5
+ $installer = $this;
6
+ $installer->startSetup();
7
+
8
+ $conn = $installer->getConnection();
9
+ $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace.'/module/title', 'value' => Mage::helper($namespace)->title), array('value'));
10
+ $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace.'/module/namespace', 'value' => $namespace), array('value'));
11
+
12
+ $installer->run("
13
+ CREATE TABLE IF NOT EXISTS `icepay_pmdata` (
14
+ `pm_id` int(32) NOT NULL AUTO_INCREMENT,
15
+ `pm_code` varchar(120) NOT NULL,
16
+ PRIMARY KEY (`pm_id`),
17
+ UNIQUE KEY `pm_name` (`pm_code`),
18
+ KEY `pm_code` (`pm_code`)
19
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
20
+
21
+ CREATE TABLE IF NOT EXISTS `icepay_issuerdata` (
22
+ `config_id` int(32) NOT NULL AUTO_INCREMENT,
23
+ `pm_code` varchar(32) NOT NULL,
24
+ `store_scope_id` int(32) NOT NULL,
25
+ `merchant_id` int(32) NOT NULL DEFAULT '0',
26
+ `magento_code` varchar(32) NOT NULL,
27
+ `issuer_code` varchar(120) NOT NULL,
28
+ `issuer_name` varchar(120) NOT NULL,
29
+ `issuer_country` text NOT NULL COMMENT 'serialized array',
30
+ `issuer_currency` text NOT NULL COMMENT 'serialized array',
31
+ `issuer_language` text NOT NULL COMMENT 'serialized array',
32
+ `issuer_minimum` varchar(255) NOT NULL COMMENT 'array',
33
+ `issuer_maximum` varchar(255) NOT NULL COMMENT 'array',
34
+ PRIMARY KEY (`config_id`),
35
+ KEY `code` (`pm_code`),
36
+ KEY `magento_code` (`magento_code`),
37
+ KEY `issuer_code` (`issuer_code`),
38
+ KEY `merchant_id` (`merchant_id`)
39
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
40
+
41
+ ");
42
+
43
+
44
+
45
  $installer->endSetup();
app/code/community/Icepay/IceAdvanced/sql/icepayadvanced_setup/mysql4-upgrade-1.0.0-1.0.1.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
-
3
- $installer = $this;
4
- $installer->startSetup();
5
-
6
- $installer->run("
7
- ALTER TABLE `icepay_pmdata` RENAME TO `{$installer->getTable('icepay_pmdata')}`;
8
- ALTER TABLE `icepay_issuerdata` RENAME TO `{$installer->getTable('icepay_issuerdata')}`;
9
- ");
10
-
11
- $installer->endSetup();
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+
6
+ $installer->run("
7
+ ALTER TABLE `icepay_pmdata` RENAME TO `{$installer->getTable('icepay_pmdata')}`;
8
+ ALTER TABLE `icepay_issuerdata` RENAME TO `{$installer->getTable('icepay_issuerdata')}`;
9
+ ");
10
+
11
+ $installer->endSetup();
app/code/community/Icepay/IceCore/Block/Adminhtml/CheckSettings.php CHANGED
@@ -1,55 +1,55 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Block checking settings
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceCore_Block_Adminhtml_CheckSettings
18
- extends Mage_Adminhtml_Block_System_Config_Form_Field
19
- {
20
-
21
-
22
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
23
- {
24
- $html = "";
25
- $lines = array();
26
-
27
- /* Check Merchant ID */
28
- $check = Mage::helper("icecore")->validateMerchantID($this->getValueForStore(Icepay_IceCore_Model_Config::MERCHANTID));
29
- array_push($lines, array(
30
- 'line' => $check["msg"],
31
- 'result' => ($check["val"]?"ok":"err")));
32
-
33
-
34
- /* Check SecretCode */
35
- $check = Mage::helper("icecore")->validateSecretCode($this->getValueForStore(Icepay_IceCore_Model_Config::SECRETCODE));
36
- array_push($lines, array(
37
- 'line' => $check["msg"],
38
- 'result' => ($check["val"]?"ok":"err")));
39
-
40
- foreach ($lines as $key => $value) {
41
- $html.= '<p class="'.$value['result'].'">'.$value['line'].'</p>';
42
- }
43
-
44
- return '<div class="icepay_debug">'.$html.'</div>';
45
- }
46
-
47
-
48
- protected function getValueForStore($val) {
49
- return Mage::helper('icecore')->getConfigForStore(Mage::helper('icecore')->adminGetStoreScopeID(), $val);
50
- }
51
-
52
-
53
-
54
-
55
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Block checking settings
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceCore_Block_Adminhtml_CheckSettings
18
+ extends Mage_Adminhtml_Block_System_Config_Form_Field
19
+ {
20
+
21
+
22
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
23
+ {
24
+ $html = "";
25
+ $lines = array();
26
+
27
+ /* Check Merchant ID */
28
+ $check = Mage::helper("icecore")->validateMerchantID($this->getValueForStore(Icepay_IceCore_Model_Config::MERCHANTID));
29
+ array_push($lines, array(
30
+ 'line' => $check["msg"],
31
+ 'result' => ($check["val"]?"ok":"err")));
32
+
33
+
34
+ /* Check SecretCode */
35
+ $check = Mage::helper("icecore")->validateSecretCode($this->getValueForStore(Icepay_IceCore_Model_Config::SECRETCODE));
36
+ array_push($lines, array(
37
+ 'line' => $check["msg"],
38
+ 'result' => ($check["val"]?"ok":"err")));
39
+
40
+ foreach ($lines as $key => $value) {
41
+ $html.= '<p class="'.$value['result'].'">'.$value['line'].'</p>';
42
+ }
43
+
44
+ return '<div class="icepay_debug">'.$html.'</div>';
45
+ }
46
+
47
+
48
+ protected function getValueForStore($val) {
49
+ return Mage::helper('icecore')->getConfigForStore(Mage::helper('icecore')->adminGetStoreScopeID(), $val);
50
+ }
51
+
52
+
53
+
54
+
55
  }
app/code/community/Icepay/IceCore/Block/Adminhtml/GenerateURL.php CHANGED
@@ -1,38 +1,38 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Block generating store URLs
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceCore_Block_Adminhtml_GenerateURL extends Mage_Adminhtml_Block_System_Config_Form_Field {
17
-
18
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
19
- {
20
- $this->setElement($element);
21
- return $this->enCase(Mage::helper("icecore")->getStoreFrontURL($this->setAction($this->getElement()->getName())));
22
- }
23
-
24
- protected function setAction($elementName)
25
- {
26
- switch ($elementName) {
27
- case "groups[settings][fields][merchant_url_ok][value]": return "result";
28
- case "groups[settings][fields][merchant_url_err][value]": return "result";
29
- case "groups[settings][fields][merchant_url_notify][value]": return "notify";
30
- }
31
- }
32
-
33
- protected function enCase($str)
34
- {
35
- return '<input type="text" name="" class="icepay_url_form" value="' . $str . '"/>';
36
- }
37
-
38
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Block generating store URLs
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceCore_Block_Adminhtml_GenerateURL extends Mage_Adminhtml_Block_System_Config_Form_Field {
17
+
18
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
19
+ {
20
+ $this->setElement($element);
21
+ return $this->enCase(Mage::helper("icecore")->getStoreFrontURL($this->setAction($this->getElement()->getName())));
22
+ }
23
+
24
+ protected function setAction($elementName)
25
+ {
26
+ switch ($elementName) {
27
+ case "groups[settings][fields][merchant_url_ok][value]": return "result";
28
+ case "groups[settings][fields][merchant_url_err][value]": return "result";
29
+ case "groups[settings][fields][merchant_url_notify][value]": return "notify";
30
+ }
31
+ }
32
+
33
+ protected function enCase($str)
34
+ {
35
+ return '<input type="text" name="" class="icepay_url_form" value="' . $str . '"/>';
36
+ }
37
+
38
  }
app/code/community/Icepay/IceCore/Block/Adminhtml/Grid/Modules.php CHANGED
@@ -1,50 +1,50 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Block modules grid
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceCore_Block_Adminhtml_Grid_Modules extends Mage_Adminhtml_Block_Widget implements Varien_Data_Form_Element_Renderer_Interface {
17
-
18
- protected $_element;
19
-
20
- public function __construct()
21
- {
22
- $this->setTemplate('icepaycore/grid_modules.phtml');
23
- }
24
-
25
- public function render(Varien_Data_Form_Element_Abstract $element)
26
- {
27
- $this->_element = $element;
28
- return $this->toHtml();
29
- }
30
-
31
- public function getElement()
32
- {
33
- return $this->_element;
34
- }
35
-
36
- public function getModules()
37
- {
38
-
39
- $core_sql = Mage::getSingleton('icecore/mysql4_iceCore');
40
- return $core_sql->getModulesConfiguration();
41
- }
42
-
43
-
44
-
45
- protected function _prepareLayout()
46
- {
47
-
48
- }
49
-
50
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Block modules grid
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceCore_Block_Adminhtml_Grid_Modules extends Mage_Adminhtml_Block_Widget implements Varien_Data_Form_Element_Renderer_Interface {
17
+
18
+ protected $_element;
19
+
20
+ public function __construct()
21
+ {
22
+ $this->setTemplate('icepaycore/grid_modules.phtml');
23
+ }
24
+
25
+ public function render(Varien_Data_Form_Element_Abstract $element)
26
+ {
27
+ $this->_element = $element;
28
+ return $this->toHtml();
29
+ }
30
+
31
+ public function getElement()
32
+ {
33
+ return $this->_element;
34
+ }
35
+
36
+ public function getModules()
37
+ {
38
+
39
+ $core_sql = Mage::getSingleton('icecore/mysql4_iceCore');
40
+ return $core_sql->getModulesConfiguration();
41
+ }
42
+
43
+
44
+
45
+ protected function _prepareLayout()
46
+ {
47
+
48
+ }
49
+
50
  }
app/code/community/Icepay/IceCore/Block/Adminhtml/Init.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Block loading CSS
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceCore_Block_Adminhtml_Init extends Mage_Adminhtml_Block_System_Config_Form_Field {
17
-
18
- protected function _prepareLayout()
19
- {
20
- /* General pages CSS */
21
- $this->getLayout()
22
- ->getBlock('head')
23
- ->addCss('icepay/general.css');
24
-
25
- /* ADMIN page CSS */
26
- if (Mage::helper('icecore')->isAdminPage()) {
27
- $this->getLayout()
28
- ->getBlock('head')
29
- ->addCss('icepay/admin.css');
30
- }
31
-
32
- parent::_prepareLayout();
33
- }
34
-
35
- /* Don't use a template */
36
-
37
- public function setTemplate($template)
38
- {
39
- return "";
40
- }
41
-
42
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Block loading CSS
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceCore_Block_Adminhtml_Init extends Mage_Adminhtml_Block_System_Config_Form_Field {
17
+
18
+ protected function _prepareLayout()
19
+ {
20
+ /* General pages CSS */
21
+ $this->getLayout()
22
+ ->getBlock('head')
23
+ ->addCss('icepay/general.css');
24
+
25
+ /* ADMIN page CSS */
26
+ if (Mage::helper('icecore')->isAdminPage()) {
27
+ $this->getLayout()
28
+ ->getBlock('head')
29
+ ->addCss('icepay/admin.css');
30
+ }
31
+
32
+ parent::_prepareLayout();
33
+ }
34
+
35
+ /* Don't use a template */
36
+
37
+ public function setTemplate($template)
38
+ {
39
+ return "";
40
+ }
41
+
42
  }
app/code/community/Icepay/IceCore/Block/Front/Statement.php CHANGED
@@ -1,26 +1,26 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Block displaying the ICEPAY statement
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceCore_Block_Front_Statement extends Mage_Core_Block_Template {
18
-
19
- protected $_template = 'icepaycore/front/statement.phtml';
20
- public $_info;
21
-
22
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
23
- return Mage::helper("icecore")->getStatementHTML(false);
24
- }
25
-
26
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Block displaying the ICEPAY statement
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceCore_Block_Front_Statement extends Mage_Core_Block_Template {
18
+
19
+ protected $_template = 'icepaycore/front/statement.phtml';
20
+ public $_info;
21
+
22
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
23
+ return Mage::helper("icecore")->getStatementHTML(false);
24
+ }
25
+
26
  }
app/code/community/Icepay/IceCore/Block/Front/Template.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Block displaying a template
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceCore_Block_Front_Template extends Mage_Core_Block_Template {
18
-
19
- //Controller does the template loading
20
-
21
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Block displaying a template
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceCore_Block_Front_Template extends Mage_Core_Block_Template {
18
+
19
+ //Controller does the template loading
20
+
21
  }
app/code/community/Icepay/IceCore/Helper/Data.php CHANGED
@@ -1,253 +1,253 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Core Helper
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceCore_Helper_Data extends Mage_Core_Helper_Abstract {
17
- /* Install values */
18
-
19
- public $title = "Core";
20
- public $version = "1.2.9";
21
- public $id = "003";
22
- public $fingerprint = "003";
23
- public $compatibility_oldest_version = "1.5.0.0";
24
- public $compatibility_latest_version = "1.9.2.1";
25
- public $section = "icecore";
26
- public $serial_required = "0";
27
- public $imageDir = "adminhtml/default/default/icepay/images/";
28
- public $imageExtension = "png";
29
- public $defaultLocale = "en_EN";
30
-
31
- public function isAdminPage()
32
- {
33
- return Mage::app()->getStore()->isAdmin();
34
- }
35
-
36
- public function hasSOAP()
37
- {
38
- return class_exists('SoapClient');
39
- }
40
-
41
- public function isCompatible($fromVersion, $toVersion)
42
- {
43
- $mVersion = Mage::getVersion();
44
-
45
- return ((version_compare($mVersion, $toVersion, '<=')) && version_compare($mVersion, $fromVersion, '>='));
46
- }
47
-
48
- public function makeArray($obj)
49
- {
50
- if (is_array($obj))
51
- return $obj;
52
-
53
- $arr = array();
54
- array_push($arr, $obj);
55
- return $arr;
56
- }
57
-
58
- public function isModuleInstalled($name)
59
- {
60
- $modules = Mage::getConfig()->getNode('modules')->children();
61
- $modulesArray = (array) $modules;
62
-
63
- return isset($modulesArray[$name]);
64
- }
65
-
66
- public function adminGetFrontScope()
67
- {
68
- /* default/websites/stores */
69
- return Mage::app()->getFrontController()->getRequest()->getParam('store');
70
- }
71
-
72
- /* note that this only works in default/stores scope
73
- * If a 0 is returned, it'll be default (admin) store scope ID
74
- */
75
-
76
- public function adminGetStoreScopeID()
77
- {
78
- if (Mage::app()->getStore($this->getStoreFromRequest())->isAdmin())
79
- return Mage::app()->getStore()->getId();
80
-
81
- return Mage::app()->getStore($this->getStoreFromRequest())->getId();
82
- }
83
-
84
- public function getStoreFromRequest()
85
- {
86
- return Mage::app()->getFrontController()->getRequest()->getParam('store');
87
- }
88
-
89
- public function adminGetStore()
90
- {
91
- return Mage::app()->getStore($this->adminGetStoreScopeID());
92
- }
93
-
94
- public function getStoreFrontURL($action = "result")
95
- {
96
- if (Mage::app()->getStore()->getStoreInUrl())
97
- return Mage::app()->getStore($this->adminGetStoreScopeID())->getUrl("icepay/processing/" . $action, array('_secure' => true));
98
- return Mage::app()->getStore()->getUrl("icepay/processing/" . $action, array('_secure' => true));
99
- }
100
-
101
- public function getStoreScopeID()
102
- {
103
- return (Mage::app()->getStore()->getId() == NULL || Mage::app()->getStore()->isAdmin()) ? $this->adminGetStoreScopeID() : Mage::app()->getStore()->getId();
104
- }
105
-
106
- public function getConfig($str)
107
- {
108
- return Mage::app()->getStore($this->getStoreScopeID())->getConfig($str);
109
- }
110
-
111
- public function getConfigForStore($storeID, $config)
112
- {
113
- return Mage::app()->getStore($storeID)->getConfig($config);
114
- }
115
-
116
- public function getMerchantIDForStore($storeID)
117
- {
118
- return Mage::app()->getStore($storeID)->getConfig(Icepay_IceCore_Model_Config::MERCHANTID);
119
- }
120
-
121
- public function getSecretcodeForStore($storeID)
122
- {
123
- return Mage::app()->getStore($storeID)->getConfig(Icepay_IceCore_Model_Config::SECRETCODE);
124
- }
125
-
126
- public function cleanArray($arr)
127
- {
128
- foreach ($arr as $key => $val)
129
- $arr[$key] = trim($val);
130
- return array_unique($arr);
131
- }
132
-
133
- public function setImageDir($str)
134
- {
135
- $this->imageDir = $str;
136
- }
137
-
138
- public function getLangISO2($default = false)
139
- {
140
- $locale = explode("_", ($default) ? $this->defaultLocale : Mage::app()->getLocale()->getLocale());
141
- if (is_array($locale) && !empty($locale)) {
142
- return strtoupper($locale[0]);
143
- }
144
- return "EN";
145
- }
146
-
147
- public function log($str)
148
- {
149
- Mage::log($str, null, 'icepay.log');
150
- }
151
-
152
- /* Checks */
153
-
154
- public function validateMerchantID($val)
155
- {
156
- $return = array('val' => false, 'msg' => $this->__("Merchant ID is properly configured"));
157
-
158
- if (!$val) {
159
- $return['msg'] = $this->__("Merchant ID not set for this storeview");
160
- return $return;
161
- }
162
-
163
- if (strlen($val) != 5) {
164
- $return['msg'] = $this->__("Merchant ID does not contain 5 digits");
165
- return $return;
166
- }
167
-
168
- if (!is_numeric($val)) {
169
- $return['msg'] = $this->__("Merchant ID is not numeric");
170
- return $return;
171
- }
172
-
173
- $return['val'] = true;
174
- return $return;
175
- }
176
-
177
- public function toIcon($code, $title = "")
178
- {
179
- $code = strtolower($code);
180
- if (!$img = $this->getImage("{$code}.{$this->imageExtension}"))
181
- return false;
182
- return "<img src=\"{$img}\" id=\"ICEPAY_{$code}\" title=\"{$title}\" >";
183
- }
184
-
185
- public function cleanString($string)
186
- {
187
- $string = trim($string);
188
- return $string;
189
- }
190
-
191
- public function getImage($img)
192
- {
193
- $skinDir = Mage::getModel('core/config')->getOptions()->getSkinDir();
194
-
195
- // Get image in lang folder
196
- if (file_exists($skinDir . '/' . $this->imageDir . strtolower($this->getLangISO2()) . "/" . $img))
197
- return $this->getImageURL() . strtolower($this->getLangISO2()) . "/" . $img;
198
-
199
- // Get image in standard lang folder
200
- if (file_exists($skinDir . '/' . $this->imageDir . strtolower($this->getLangISO2(true)) . "/" . $img))
201
- return $this->getImageURL() . strtolower($this->getLangISO2(true)) . "/" . $img;
202
-
203
- // Get standard image
204
- if (file_exists($skinDir . '/' . $this->imageDir . $img))
205
- return $this->getImageURL() . $img;
206
-
207
- //Hmm still no image, lets return the nologo image
208
- if (file_exists($skinDir . '/' . $this->imageDir . 'nologo.png'))
209
- return $this->getImageURL() . 'nologo.png';
210
-
211
- return false;
212
- }
213
-
214
- public function getImageURL()
215
- {
216
- return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . $this->imageDir;
217
- }
218
-
219
- public function validateSecretCode($val)
220
- {
221
- $return = array('val' => false, 'msg' => $this->__("SecretCode is properly configured"));
222
-
223
- if (!$val) {
224
- $return['msg'] = $this->__("SecretCode not set for this storeview");
225
- return $return;
226
- }
227
-
228
- if (strlen($val) != 40) {
229
- $return['msg'] = $this->__("SecretCode does not contain 40 characters");
230
- return $return;
231
- }
232
-
233
- $return['val'] = true;
234
-
235
- return $return;
236
- }
237
-
238
- public function getTransactionDescription($default)
239
- {
240
- return ($statement = $this->getConfig(Icepay_IceCore_Model_Config::TRANSDESCR)) ? $statement : $default;
241
- }
242
-
243
- public function formatTotal($number)
244
- {
245
- return round($number * 100);
246
- }
247
-
248
- public function generateChecksum($arr)
249
- {
250
- return sha1(implode("|", $arr));
251
- }
252
-
253
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Core Helper
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceCore_Helper_Data extends Mage_Core_Helper_Abstract {
17
+ /* Install values */
18
+
19
+ public $title = "Core";
20
+ public $version = "1.2.11";
21
+ public $id = "003";
22
+ public $fingerprint = "003";
23
+ public $compatibility_oldest_version = "1.5.0.0";
24
+ public $compatibility_latest_version = "1.9.2.2";
25
+ public $section = "icecore";
26
+ public $serial_required = "0";
27
+ public $imageDir = "adminhtml/default/default/icepay/images/";
28
+ public $imageExtension = "png";
29
+ public $defaultLocale = "en_EN";
30
+
31
+ public function isAdminPage()
32
+ {
33
+ return Mage::app()->getStore()->isAdmin();
34
+ }
35
+
36
+ public function hasSOAP()
37
+ {
38
+ return class_exists('SoapClient');
39
+ }
40
+
41
+ public function isCompatible($fromVersion, $toVersion)
42
+ {
43
+ $mVersion = Mage::getVersion();
44
+
45
+ return ((version_compare($mVersion, $toVersion, '<=')) && version_compare($mVersion, $fromVersion, '>='));
46
+ }
47
+
48
+ public function makeArray($obj)
49
+ {
50
+ if (is_array($obj))
51
+ return $obj;
52
+
53
+ $arr = array();
54
+ array_push($arr, $obj);
55
+ return $arr;
56
+ }
57
+
58
+ public function isModuleInstalled($name)
59
+ {
60
+ $modules = Mage::getConfig()->getNode('modules')->children();
61
+ $modulesArray = (array) $modules;
62
+
63
+ return isset($modulesArray[$name]);
64
+ }
65
+
66
+ public function adminGetFrontScope()
67
+ {
68
+ /* default/websites/stores */
69
+ return Mage::app()->getFrontController()->getRequest()->getParam('store');
70
+ }
71
+
72
+ /* note that this only works in default/stores scope
73
+ * If a 0 is returned, it'll be default (admin) store scope ID
74
+ */
75
+
76
+ public function adminGetStoreScopeID()
77
+ {
78
+ if (Mage::app()->getStore($this->getStoreFromRequest())->isAdmin())
79
+ return Mage::app()->getStore()->getId();
80
+
81
+ return Mage::app()->getStore($this->getStoreFromRequest())->getId();
82
+ }
83
+
84
+ public function getStoreFromRequest()
85
+ {
86
+ return Mage::app()->getFrontController()->getRequest()->getParam('store');
87
+ }
88
+
89
+ public function adminGetStore()
90
+ {
91
+ return Mage::app()->getStore($this->adminGetStoreScopeID());
92
+ }
93
+
94
+ public function getStoreFrontURL($action = "result")
95
+ {
96
+ if (Mage::app()->getStore()->getStoreInUrl())
97
+ return Mage::app()->getStore($this->adminGetStoreScopeID())->getUrl("icepay/processing/" . $action, array('_secure' => true));
98
+ return Mage::app()->getStore()->getUrl("icepay/processing/" . $action, array('_secure' => true));
99
+ }
100
+
101
+ public function getStoreScopeID()
102
+ {
103
+ return (Mage::app()->getStore()->getId() == NULL || Mage::app()->getStore()->isAdmin()) ? $this->adminGetStoreScopeID() : Mage::app()->getStore()->getId();
104
+ }
105
+
106
+ public function getConfig($str)
107
+ {
108
+ return Mage::app()->getStore($this->getStoreScopeID())->getConfig($str);
109
+ }
110
+
111
+ public function getConfigForStore($storeID, $config)
112
+ {
113
+ return Mage::app()->getStore($storeID)->getConfig($config);
114
+ }
115
+
116
+ public function getMerchantIDForStore($storeID)
117
+ {
118
+ return Mage::app()->getStore($storeID)->getConfig(Icepay_IceCore_Model_Config::MERCHANTID);
119
+ }
120
+
121
+ public function getSecretcodeForStore($storeID)
122
+ {
123
+ return Mage::app()->getStore($storeID)->getConfig(Icepay_IceCore_Model_Config::SECRETCODE);
124
+ }
125
+
126
+ public function cleanArray($arr)
127
+ {
128
+ foreach ($arr as $key => $val)
129
+ $arr[$key] = trim($val);
130
+ return array_unique($arr);
131
+ }
132
+
133
+ public function setImageDir($str)
134
+ {
135
+ $this->imageDir = $str;
136
+ }
137
+
138
+ public function getLangISO2($default = false)
139
+ {
140
+ $locale = explode("_", ($default) ? $this->defaultLocale : Mage::app()->getLocale()->getLocale());
141
+ if (is_array($locale) && !empty($locale)) {
142
+ return strtoupper($locale[0]);
143
+ }
144
+ return "EN";
145
+ }
146
+
147
+ public function log($str)
148
+ {
149
+ Mage::log($str, null, 'icepay.log');
150
+ }
151
+
152
+ /* Checks */
153
+
154
+ public function validateMerchantID($val)
155
+ {
156
+ $return = array('val' => false, 'msg' => $this->__("Merchant ID is properly configured"));
157
+
158
+ if (!$val) {
159
+ $return['msg'] = $this->__("Merchant ID not set for this storeview");
160
+ return $return;
161
+ }
162
+
163
+ if (strlen($val) != 5) {
164
+ $return['msg'] = $this->__("Merchant ID does not contain 5 digits");
165
+ return $return;
166
+ }
167
+
168
+ if (!is_numeric($val)) {
169
+ $return['msg'] = $this->__("Merchant ID is not numeric");
170
+ return $return;
171
+ }
172
+
173
+ $return['val'] = true;
174
+ return $return;
175
+ }
176
+
177
+ public function toIcon($code, $title = "")
178
+ {
179
+ $code = strtolower($code);
180
+ if (!$img = $this->getImage("{$code}.{$this->imageExtension}"))
181
+ return false;
182
+ return "<img src=\"{$img}\" id=\"ICEPAY_{$code}\" title=\"{$title}\" >";
183
+ }
184
+
185
+ public function cleanString($string)
186
+ {
187
+ $string = trim($string);
188
+ return $string;
189
+ }
190
+
191
+ public function getImage($img)
192
+ {
193
+ $skinDir = Mage::getModel('core/config')->getOptions()->getSkinDir();
194
+
195
+ // Get image in lang folder
196
+ if (file_exists($skinDir . '/' . $this->imageDir . strtolower($this->getLangISO2()) . "/" . $img))
197
+ return $this->getImageURL() . strtolower($this->getLangISO2()) . "/" . $img;
198
+
199
+ // Get image in standard lang folder
200
+ if (file_exists($skinDir . '/' . $this->imageDir . strtolower($this->getLangISO2(true)) . "/" . $img))
201
+ return $this->getImageURL() . strtolower($this->getLangISO2(true)) . "/" . $img;
202
+
203
+ // Get standard image
204
+ if (file_exists($skinDir . '/' . $this->imageDir . $img))
205
+ return $this->getImageURL() . $img;
206
+
207
+ //Hmm still no image, lets return the nologo image
208
+ if (file_exists($skinDir . '/' . $this->imageDir . 'nologo.png'))
209
+ return $this->getImageURL() . 'nologo.png';
210
+
211
+ return false;
212
+ }
213
+
214
+ public function getImageURL()
215
+ {
216
+ return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . $this->imageDir;
217
+ }
218
+
219
+ public function validateSecretCode($val)
220
+ {
221
+ $return = array('val' => false, 'msg' => $this->__("SecretCode is properly configured"));
222
+
223
+ if (!$val) {
224
+ $return['msg'] = $this->__("SecretCode not set for this storeview");
225
+ return $return;
226
+ }
227
+
228
+ if (strlen($val) != 40) {
229
+ $return['msg'] = $this->__("SecretCode does not contain 40 characters");
230
+ return $return;
231
+ }
232
+
233
+ $return['val'] = true;
234
+
235
+ return $return;
236
+ }
237
+
238
+ public function getTransactionDescription($default)
239
+ {
240
+ return ($statement = $this->getConfig(Icepay_IceCore_Model_Config::TRANSDESCR)) ? $statement : $default;
241
+ }
242
+
243
+ public function formatTotal($number)
244
+ {
245
+ return round($number * 100);
246
+ }
247
+
248
+ public function generateChecksum($arr)
249
+ {
250
+ return sha1(implode("|", $arr));
251
+ }
252
+
253
  }
app/code/community/Icepay/IceCore/Model/Config.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Configuration constants
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceCore_Model_Config
18
- {
19
- /* Config constants */
20
-
21
- const MERCHANTID = "icecore/settings/merchant_id";
22
- const SECRETCODE = "icecore/settings/merchant_secret";
23
- const TRANSDESCR = "icecore/core_options/transaction_descr";
24
- const AUTOINVOICE = "icecore/core_options/order_autoinvoice";
25
- const AUTOREFUND = "icecore/core_options/order_autorefund";
26
-
27
- const STATUS_NEW = "NEW";
28
- const STATUS_OPEN = "OPEN";
29
- const STATUS_ERROR = "ERR";
30
- const STATUS_SUCCESS = "OK";
31
- const STATUS_REFUND = "REFUND";
32
- const STATUS_CHARGEBACK = "CBACK";
33
- const STATUS_AUTH = "AUTHORIZED";
34
- const STATUS_VERSION_CHECK = "VCHECK";
35
-
36
- const STATUS_MAGENTO_NEW = "icecore_new";
37
- const STATUS_MAGENTO_OPEN = "icecore_open";
38
- const STATUS_MAGENTO_ERROR = "icecore_err";
39
- const STATUS_MAGENTO_SUCCESS = "icecore_ok";
40
- const STATUS_MAGENTO_REFUND = "icecore_refund";
41
- const STATUS_MAGENTO_CHARGEBACK = "icecore_cback";
42
- const STATUS_MAGENTO_AUTHORIZED = "icecore_open";
43
-
44
-
45
- }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Configuration constants
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceCore_Model_Config
18
+ {
19
+ /* Config constants */
20
+
21
+ const MERCHANTID = "icecore/settings/merchant_id";
22
+ const SECRETCODE = "icecore/settings/merchant_secret";
23
+ const TRANSDESCR = "icecore/core_options/transaction_descr";
24
+ const AUTOINVOICE = "icecore/core_options/order_autoinvoice";
25
+ const AUTOREFUND = "icecore/core_options/order_autorefund";
26
+
27
+ const STATUS_NEW = "NEW";
28
+ const STATUS_OPEN = "OPEN";
29
+ const STATUS_ERROR = "ERR";
30
+ const STATUS_SUCCESS = "OK";
31
+ const STATUS_REFUND = "REFUND";
32
+ const STATUS_CHARGEBACK = "CBACK";
33
+ const STATUS_AUTH = "AUTHORIZED";
34
+ const STATUS_VERSION_CHECK = "VCHECK";
35
+
36
+ const STATUS_MAGENTO_NEW = "icecore_new";
37
+ const STATUS_MAGENTO_OPEN = "icecore_open";
38
+ const STATUS_MAGENTO_ERROR = "icecore_err";
39
+ const STATUS_MAGENTO_SUCCESS = "icecore_ok";
40
+ const STATUS_MAGENTO_REFUND = "icecore_refund";
41
+ const STATUS_MAGENTO_CHARGEBACK = "icecore_cback";
42
+ const STATUS_MAGENTO_AUTHORIZED = "icecore_open";
43
+
44
+
45
+ }
app/code/community/Icepay/IceCore/Model/Icepay/Postback.php CHANGED
@@ -1,364 +1,364 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Postback processing
5
- * @version 1.0.1
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceCore_Model_Icepay_Postback {
17
-
18
- protected $sqlModel;
19
- protected $orderModel;
20
- protected $order;
21
- protected $storeID;
22
- private $_post;
23
-
24
- public function __construct()
25
- {
26
- $this->sqlModel = Mage::getModel('icecore/mysql4_iceCore');
27
- $this->orderModel = Mage::getModel('sales/order');
28
- }
29
-
30
- public function handle($_vars)
31
- {
32
- if (!$_vars) {
33
- Mage::helper("icecore")->log("No Postback vars");
34
- die("ICEPAY postback page installed correctly.");
35
- }
36
- $this->_post = $_vars;
37
-
38
- if ($_vars['Status'] == Icepay_IceCore_Model_Config::STATUS_VERSION_CHECK) {
39
- $this->outputVersion($this->validateVersion());
40
- }
41
-
42
- Mage::helper("icecore")->log(serialize($_vars));
43
-
44
- $this->order = $this->orderModel->loadByIncrementId($_vars['OrderID']);
45
-
46
- $icepayTransaction = $this->sqlModel->loadPaymentByID($this->order->getRealOrderId());
47
-
48
- $this->storeID = $icepayTransaction["store_id"];
49
-
50
- $transActionID = $this->saveTransaction($_vars);
51
-
52
- $doSpecialActions = false;
53
-
54
- if ($_vars['Status'] == Icepay_IceCore_Model_Config::STATUS_AUTH) {
55
- if (Mage::helper('icecore')->isModuleInstalled('Icepay_AutoCapture')) {
56
- if (Mage::Helper('icepay_autocapture')->isAutoCaptureActive($this->storeID)) {
57
- $_vars['Status'] = Icepay_IceCore_Model_Config::STATUS_SUCCESS;
58
- }
59
- }
60
- }
61
-
62
- if ($this->canUpdateBasedOnIcepayTable($icepayTransaction['status'], $_vars['Status'])) {
63
- /* creating the invoice causes major overhead! Status should to be updated and saved first */
64
- if ($_vars['Status'] == Icepay_IceCore_Model_Config::STATUS_SUCCESS)
65
- $doSpecialActions = true;
66
-
67
- // Update ICEPAY transaction info
68
- $newData = $icepayTransaction;
69
- $newData['update_time'] = now();
70
- $newData['status'] = $_vars['Status'];
71
- $newData['transaction_id'] = $_vars['PaymentID'];
72
- $this->sqlModel->changeStatus($newData);
73
-
74
- // Update order status
75
- if ($_vars['Status'] == Icepay_IceCore_Model_Config::STATUS_ERROR) {
76
- $this->order->cancel();
77
- } else {
78
- $this->order->setState(
79
- $this->getMagentoState($_vars['Status']), $this->getMagentoStatus($_vars['Status']), Mage::helper('icecore')->__('Status of order changed'), true
80
- );
81
- };
82
- };
83
-
84
- $this->order->save();
85
-
86
- $this->sendMail($icepayTransaction['status'], $_vars['Status']);
87
-
88
- if ($doSpecialActions) {
89
- $extraMsg = $this->specialActions($_vars['Status'], $transActionID);
90
- $this->order->setState(
91
- $this->getMagentoState($_vars['Status']), $this->getMagentoStatus($_vars['Status']), $extraMsg, false
92
- );
93
- $this->order->save();
94
- }
95
- }
96
-
97
- protected function outputVersion($extended = false)
98
- {
99
- $dump = array(
100
- "module" => $this->getVersions(),
101
- "notice" => "Checksum validation passed!"
102
- );
103
- if ($extended) {
104
-
105
- $dump["additional"] = array(
106
- "magento" => Mage::getVersion(),
107
- "soap" => Mage::helper('icecore')->hasSOAP() ? "installed" : "not installed",
108
- "storescope" => Mage::helper('icecore')->getStoreScopeID(),
109
- );
110
- } else {
111
- $dump["notice"] = "Checksum failed! Merchant ID and Secret code probably incorrect.";
112
- }
113
- var_dump($dump);
114
- exit();
115
- }
116
-
117
- protected function validateVersion()
118
- {
119
- if ($this->generateChecksumForVersion() != $this->_post["Checksum"])
120
- return false;
121
- return true;
122
- }
123
-
124
- protected function getVersions()
125
- {
126
- $_v = "";
127
- if (class_exists(Mage::getConfig()->getHelperClassName('icecore')))
128
- $_v.= sprintf("%s %s. ", Mage::helper('icecore')->title, Mage::helper('icecore')->version);
129
- if (class_exists(Mage::getConfig()->getHelperClassName('icebasic')))
130
- $_v.= sprintf("%s %s. ", Mage::helper('icebasic')->title, Mage::helper('icebasic')->version);
131
- if (class_exists(Mage::getConfig()->getHelperClassName('iceadvanced')))
132
- $_v.= sprintf("%s %s. ", Mage::helper('iceadvanced')->title, Mage::helper('iceadvanced')->version);
133
- return $_v;
134
- }
135
-
136
- protected function generateChecksumForVersion()
137
- {
138
- return sha1(
139
- sprintf("%s|%s|%s|%s", Mage::helper('icecore')->getConfig(Icepay_IceCore_Model_Config::SECRETCODE), Mage::helper('icecore')->getConfig(Icepay_IceCore_Model_Config::MERCHANTID), $this->_post["Status"], substr(strval(time()), 0, 8)
140
- )
141
- );
142
- }
143
-
144
- protected function sendMail($currentStatus, $newStatus)
145
- {
146
- switch ($currentStatus) {
147
- case Icepay_IceCore_Model_Config::STATUS_NEW:
148
- if ($newStatus == Icepay_IceCore_Model_Config::STATUS_ERROR) {
149
- $this->order->sendOrderUpdateEmail();
150
- } else {
151
- $this->order->sendNewOrderEmail();
152
- };
153
- break;
154
- default:
155
- $this->order->sendOrderUpdateEmail();
156
- }
157
- }
158
-
159
- protected function saveTransaction($_vars)
160
- {
161
- $payment = $this->order->getPayment();
162
-
163
- $transaction = $payment->getTransaction($_vars['PaymentID']);
164
-
165
- $i = 0;
166
- do {
167
- $id = $_vars['PaymentID'] . (($i > 0) ? "-{$i}" : "");
168
- $transaction = $payment->getTransaction($id);
169
- $i++;
170
- } while ($transaction);
171
- $i--;
172
-
173
- $id = $_vars['PaymentID'] . (($i > 0) ? "-{$i}" : "");
174
-
175
- $payment->setTransactionAdditionalInfo(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $_vars);
176
-
177
-
178
- $payment->setTransactionId($id)
179
- ->setIsTransactionClosed($this->isClosedStatus($_vars['Status']));
180
-
181
- if ($this->isRefund($_vars['Status'])) {
182
- $payment->setParentTransactionId($this->getParentPaymentID($_vars['StatusCode']));
183
- //Creditmemo currently not supported
184
- };
185
-
186
- $payment->addTransaction(
187
- $this->getTransactionStatus($_vars['Status']), null, false);
188
-
189
- $payment->save();
190
-
191
- return $id;
192
- }
193
-
194
- protected function createInvoice($id)
195
- {
196
- $invoice = $this->order->prepareInvoice()
197
- ->setTransactionId($id)
198
- ->addComment(Mage::helper('icecore')->__('Auto-generated by ICEPAY'))
199
- ->register()
200
- ->pay();
201
-
202
- $transactionSave = Mage::getModel('core/resource_transaction')
203
- ->addObject($invoice)
204
- ->addObject($invoice->getOrder());
205
-
206
- $transactionSave->save();
207
-
208
- $invoice->sendEmail();
209
-
210
- return $invoice;
211
- }
212
-
213
- protected function specialActions($newStatus, $transActionID)
214
- {
215
- $msg = "";
216
- switch ($newStatus) {
217
- case Icepay_IceCore_Model_Config::STATUS_SUCCESS:
218
- if (!$this->order->hasInvoices() && Mage::app()->getStore($this->storeID)->getConfig(Icepay_IceCore_Model_Config::AUTOINVOICE) == 1) {
219
- $invoice = $this->createInvoice($transActionID);
220
- $msg = Mage::helper("icecore")->__('Invoice Auto-Created: %s', '<strong>' . $invoice->getIncrementId() . '</strong>');
221
- };
222
- break;
223
- }
224
- return $msg;
225
- }
226
-
227
- protected function canUpdate($currentStatus, $newStatus)
228
- {
229
- switch ($newStatus) {
230
- case Icepay_IceCore_Model_Config::STATUS_SUCCESS: return ($currentStatus == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $currentStatus == Mage_Sales_Model_Order::STATE_NEW);
231
- case Icepay_IceCore_Model_Config::STATUS_OPEN: return ($currentStatus == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $currentStatus == Mage_Sales_Model_Order::STATE_NEW);
232
- case Icepay_IceCore_Model_Config::STATUS_ERROR: return ($currentStatus == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $currentStatus == Mage_Sales_Model_Order::STATE_NEW);
233
- case Icepay_IceCore_Model_Config::STATUS_AUTH: return ($currentStatus == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $currentStatus == Mage_Sales_Model_Order::STATE_NEW);
234
- case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return ($currentStatus == Mage_Sales_Model_Order::STATE_PROCESSING || $currentStatus == Mage_Sales_Model_Order::STATE_COMPLETE);
235
- case Icepay_IceCore_Model_Config::STATUS_REFUND: return ($currentStatus == Mage_Sales_Model_Order::STATE_PROCESSING || $currentStatus == Mage_Sales_Model_Order::STATE_COMPLETE);
236
- default:
237
- return false;
238
- };
239
- }
240
-
241
- protected function canUpdateBasedOnIcepayTable($currentStatus, $newStatus)
242
- {
243
- switch ($currentStatus) {
244
- case Icepay_IceCore_Model_Config::STATUS_NEW:
245
- case Icepay_IceCore_Model_Config::STATUS_OPEN:
246
- return (
247
- $newStatus == Icepay_IceCore_Model_Config::STATUS_SUCCESS ||
248
- $newStatus == Icepay_IceCore_Model_Config::STATUS_ERROR ||
249
- $newStatus == Icepay_IceCore_Model_Config::STATUS_AUTH ||
250
- $newStatus == Icepay_IceCore_Model_Config::STATUS_OPEN
251
- );
252
- break;
253
- case Icepay_IceCore_Model_Config::STATUS_AUTH:
254
- return (
255
- $newStatus == Icepay_IceCore_Model_Config::STATUS_SUCCESS ||
256
- $newStatus == Icepay_IceCore_Model_Config::STATUS_ERROR
257
- );
258
- break;
259
- case Icepay_IceCore_Model_Config::STATUS_ERROR:
260
- return (
261
- $newStatus == Icepay_IceCore_Model_Config::STATUS_SUCCESS
262
- );
263
- break;
264
- case Icepay_IceCore_Model_Config::STATUS_SUCCESS:
265
- return (
266
- $newStatus == Icepay_IceCore_Model_Config::STATUS_CHARGEBACK ||
267
- $newStatus == Icepay_IceCore_Model_Config::STATUS_REFUND
268
- );
269
- break;
270
- default:
271
- return false;
272
- break;
273
- }
274
- }
275
-
276
- protected function getMagentoStatus($icepayStatus)
277
- {
278
- switch ($icepayStatus) {
279
- case Icepay_IceCore_Model_Config::STATUS_SUCCESS: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_SUCCESS;
280
- case Icepay_IceCore_Model_Config::STATUS_OPEN: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_OPEN;
281
- case Icepay_IceCore_Model_Config::STATUS_ERROR: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_ERROR;
282
- case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_CHARGEBACK;
283
- case Icepay_IceCore_Model_Config::STATUS_REFUND: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_REFUND;
284
- case Icepay_IceCore_Model_Config::STATUS_AUTH: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_AUTHORIZED;
285
- default:
286
- return false;
287
- };
288
- }
289
-
290
- protected function getMagentoState($icepayStatus)
291
- {
292
- switch ($icepayStatus) {
293
- case Icepay_IceCore_Model_Config::STATUS_SUCCESS:
294
- return Mage_Sales_Model_Order::STATE_PROCESSING;
295
- break;
296
- case Icepay_IceCore_Model_Config::STATUS_OPEN:
297
- case Icepay_IceCore_Model_config::STATUS_AUTH:
298
- return Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
299
- break;
300
- case Icepay_IceCore_Model_Config::STATUS_ERROR:
301
- return Mage_Sales_Model_Order::STATE_CANCELED;
302
- break;
303
- case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK:
304
- case Icepay_IceCore_Model_Config::STATUS_REFUND:
305
- return Mage_Sales_Model_Order::STATE_HOLDED;
306
- //return Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
307
- break;
308
- default:
309
- return false;
310
- };
311
- }
312
-
313
- protected function getTransactionStatus($icepayStatus)
314
- {
315
- switch ($icepayStatus) {
316
- case Icepay_IceCore_Model_Config::STATUS_SUCCESS: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_PAYMENT;
317
- case Icepay_IceCore_Model_Config::STATUS_OPEN: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID;
318
- case Icepay_IceCore_Model_config::STATUS_AUTH: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID;
319
- case Icepay_IceCore_Model_Config::STATUS_ERROR: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID;
320
- case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND;
321
- case Icepay_IceCore_Model_Config::STATUS_REFUND: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND;
322
- default: return false;
323
- };
324
- }
325
-
326
- protected function isClosedStatus($icepayStatus)
327
- {
328
- switch ($icepayStatus) {
329
- case Icepay_IceCore_Model_Config::STATUS_SUCCESS: return true;
330
- case Icepay_IceCore_Model_Config::STATUS_OPEN: return false;
331
- case Icepay_IceCore_Model_config::STATUS_AUTH: return false;
332
- case Icepay_IceCore_Model_Config::STATUS_ERROR: return true;
333
- case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return true;
334
- case Icepay_IceCore_Model_Config::STATUS_REFUND: return true;
335
- default: return false;
336
- };
337
- }
338
-
339
- protected function isRefund($icepayStatus)
340
- {
341
- switch ($icepayStatus) {
342
- case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return true;
343
- case Icepay_IceCore_Model_Config::STATUS_REFUND: return true;
344
- default:
345
- return false;
346
- };
347
- }
348
-
349
- protected function getParentPaymentID($statusString)
350
- {
351
- $arr = explode("PaymentID:", $statusString);
352
- return intval($arr[1]);
353
- }
354
-
355
- protected function getTransactionString($_vars)
356
- {
357
- $str = "";
358
- foreach ($_vars as $key => $value) {
359
- $str .= "{$key}: {$value}<BR>";
360
- }
361
- return $str;
362
- }
363
-
364
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Postback processing
5
+ * @version 1.0.1
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceCore_Model_Icepay_Postback {
17
+
18
+ protected $sqlModel;
19
+ protected $orderModel;
20
+ protected $order;
21
+ protected $storeID;
22
+ private $_post;
23
+
24
+ public function __construct()
25
+ {
26
+ $this->sqlModel = Mage::getModel('icecore/mysql4_iceCore');
27
+ $this->orderModel = Mage::getModel('sales/order');
28
+ }
29
+
30
+ public function handle($_vars)
31
+ {
32
+ if (!$_vars) {
33
+ Mage::helper("icecore")->log("No Postback vars");
34
+ die("ICEPAY postback page installed correctly.");
35
+ }
36
+ $this->_post = $_vars;
37
+
38
+ if ($_vars['Status'] == Icepay_IceCore_Model_Config::STATUS_VERSION_CHECK) {
39
+ $this->outputVersion($this->validateVersion());
40
+ }
41
+
42
+ Mage::helper("icecore")->log(serialize($_vars));
43
+
44
+ $this->order = $this->orderModel->loadByIncrementId($_vars['OrderID']);
45
+
46
+ $icepayTransaction = $this->sqlModel->loadPaymentByID($this->order->getRealOrderId());
47
+
48
+ $this->storeID = $icepayTransaction["store_id"];
49
+
50
+ $transActionID = $this->saveTransaction($_vars);
51
+
52
+ $doSpecialActions = false;
53
+
54
+ if ($_vars['Status'] == Icepay_IceCore_Model_Config::STATUS_AUTH) {
55
+ if (Mage::helper('icecore')->isModuleInstalled('Icepay_AutoCapture')) {
56
+ if (Mage::Helper('icepay_autocapture')->isAutoCaptureActive($this->storeID)) {
57
+ $_vars['Status'] = Icepay_IceCore_Model_Config::STATUS_SUCCESS;
58
+ }
59
+ }
60
+ }
61
+
62
+ if ($this->canUpdateBasedOnIcepayTable($icepayTransaction['status'], $_vars['Status'])) {
63
+ /* creating the invoice causes major overhead! Status should to be updated and saved first */
64
+ if ($_vars['Status'] == Icepay_IceCore_Model_Config::STATUS_SUCCESS)
65
+ $doSpecialActions = true;
66
+
67
+ // Update ICEPAY transaction info
68
+ $newData = $icepayTransaction;
69
+ $newData['update_time'] = now();
70
+ $newData['status'] = $_vars['Status'];
71
+ $newData['transaction_id'] = $_vars['PaymentID'];
72
+ $this->sqlModel->changeStatus($newData);
73
+
74
+ // Update order status
75
+ if ($_vars['Status'] == Icepay_IceCore_Model_Config::STATUS_ERROR) {
76
+ $this->order->cancel();
77
+ } else {
78
+ $this->order->setState(
79
+ $this->getMagentoState($_vars['Status']), $this->getMagentoStatus($_vars['Status']), Mage::helper('icecore')->__('Status of order changed'), true
80
+ );
81
+ };
82
+ };
83
+
84
+ $this->order->save();
85
+
86
+ $this->sendMail($icepayTransaction['status'], $_vars['Status']);
87
+
88
+ if ($doSpecialActions) {
89
+ $extraMsg = $this->specialActions($_vars['Status'], $transActionID);
90
+ $this->order->setState(
91
+ $this->getMagentoState($_vars['Status']), $this->getMagentoStatus($_vars['Status']), $extraMsg, false
92
+ );
93
+ $this->order->save();
94
+ }
95
+ }
96
+
97
+ protected function outputVersion($extended = false)
98
+ {
99
+ $dump = array(
100
+ "module" => $this->getVersions(),
101
+ "notice" => "Checksum validation passed!"
102
+ );
103
+ if ($extended) {
104
+
105
+ $dump["additional"] = array(
106
+ "magento" => Mage::getVersion(),
107
+ "soap" => Mage::helper('icecore')->hasSOAP() ? "installed" : "not installed",
108
+ "storescope" => Mage::helper('icecore')->getStoreScopeID(),
109
+ );
110
+ } else {
111
+ $dump["notice"] = "Checksum failed! Merchant ID and Secret code probably incorrect.";
112
+ }
113
+ var_dump($dump);
114
+ exit();
115
+ }
116
+
117
+ protected function validateVersion()
118
+ {
119
+ if ($this->generateChecksumForVersion() != $this->_post["Checksum"])
120
+ return false;
121
+ return true;
122
+ }
123
+
124
+ protected function getVersions()
125
+ {
126
+ $_v = "";
127
+ if (class_exists(Mage::getConfig()->getHelperClassName('icecore')))
128
+ $_v.= sprintf("%s %s. ", Mage::helper('icecore')->title, Mage::helper('icecore')->version);
129
+ if (class_exists(Mage::getConfig()->getHelperClassName('icebasic')))
130
+ $_v.= sprintf("%s %s. ", Mage::helper('icebasic')->title, Mage::helper('icebasic')->version);
131
+ if (class_exists(Mage::getConfig()->getHelperClassName('iceadvanced')))
132
+ $_v.= sprintf("%s %s. ", Mage::helper('iceadvanced')->title, Mage::helper('iceadvanced')->version);
133
+ return $_v;
134
+ }
135
+
136
+ protected function generateChecksumForVersion()
137
+ {
138
+ return sha1(
139
+ sprintf("%s|%s|%s|%s", Mage::helper('icecore')->getConfig(Icepay_IceCore_Model_Config::SECRETCODE), Mage::helper('icecore')->getConfig(Icepay_IceCore_Model_Config::MERCHANTID), $this->_post["Status"], substr(strval(time()), 0, 8)
140
+ )
141
+ );
142
+ }
143
+
144
+ protected function sendMail($currentStatus, $newStatus)
145
+ {
146
+ switch ($currentStatus) {
147
+ case Icepay_IceCore_Model_Config::STATUS_NEW:
148
+ if ($newStatus == Icepay_IceCore_Model_Config::STATUS_ERROR) {
149
+ $this->order->sendOrderUpdateEmail();
150
+ } else {
151
+ $this->order->sendNewOrderEmail();
152
+ };
153
+ break;
154
+ default:
155
+ $this->order->sendOrderUpdateEmail();
156
+ }
157
+ }
158
+
159
+ protected function saveTransaction($_vars)
160
+ {
161
+ $payment = $this->order->getPayment();
162
+
163
+ $transaction = $payment->getTransaction($_vars['PaymentID']);
164
+
165
+ $i = 0;
166
+ do {
167
+ $id = $_vars['PaymentID'] . (($i > 0) ? "-{$i}" : "");
168
+ $transaction = $payment->getTransaction($id);
169
+ $i++;
170
+ } while ($transaction);
171
+ $i--;
172
+
173
+ $id = $_vars['PaymentID'] . (($i > 0) ? "-{$i}" : "");
174
+
175
+ $payment->setTransactionAdditionalInfo(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $_vars);
176
+
177
+
178
+ $payment->setTransactionId($id)
179
+ ->setIsTransactionClosed($this->isClosedStatus($_vars['Status']));
180
+
181
+ if ($this->isRefund($_vars['Status'])) {
182
+ $payment->setParentTransactionId($this->getParentPaymentID($_vars['StatusCode']));
183
+ //Creditmemo currently not supported
184
+ };
185
+
186
+ $payment->addTransaction(
187
+ $this->getTransactionStatus($_vars['Status']), null, false);
188
+
189
+ $payment->save();
190
+
191
+ return $id;
192
+ }
193
+
194
+ protected function createInvoice($id)
195
+ {
196
+ $invoice = $this->order->prepareInvoice()
197
+ ->setTransactionId($id)
198
+ ->addComment(Mage::helper('icecore')->__('Auto-generated by ICEPAY'))
199
+ ->register()
200
+ ->pay();
201
+
202
+ $transactionSave = Mage::getModel('core/resource_transaction')
203
+ ->addObject($invoice)
204
+ ->addObject($invoice->getOrder());
205
+
206
+ $transactionSave->save();
207
+
208
+ $invoice->sendEmail();
209
+
210
+ return $invoice;
211
+ }
212
+
213
+ protected function specialActions($newStatus, $transActionID)
214
+ {
215
+ $msg = "";
216
+ switch ($newStatus) {
217
+ case Icepay_IceCore_Model_Config::STATUS_SUCCESS:
218
+ if (!$this->order->hasInvoices() && Mage::app()->getStore($this->storeID)->getConfig(Icepay_IceCore_Model_Config::AUTOINVOICE) == 1) {
219
+ $invoice = $this->createInvoice($transActionID);
220
+ $msg = Mage::helper("icecore")->__('Invoice Auto-Created: %s', '<strong>' . $invoice->getIncrementId() . '</strong>');
221
+ };
222
+ break;
223
+ }
224
+ return $msg;
225
+ }
226
+
227
+ protected function canUpdate($currentStatus, $newStatus)
228
+ {
229
+ switch ($newStatus) {
230
+ case Icepay_IceCore_Model_Config::STATUS_SUCCESS: return ($currentStatus == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $currentStatus == Mage_Sales_Model_Order::STATE_NEW);
231
+ case Icepay_IceCore_Model_Config::STATUS_OPEN: return ($currentStatus == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $currentStatus == Mage_Sales_Model_Order::STATE_NEW);
232
+ case Icepay_IceCore_Model_Config::STATUS_ERROR: return ($currentStatus == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $currentStatus == Mage_Sales_Model_Order::STATE_NEW);
233
+ case Icepay_IceCore_Model_Config::STATUS_AUTH: return ($currentStatus == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT || $currentStatus == Mage_Sales_Model_Order::STATE_NEW);
234
+ case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return ($currentStatus == Mage_Sales_Model_Order::STATE_PROCESSING || $currentStatus == Mage_Sales_Model_Order::STATE_COMPLETE);
235
+ case Icepay_IceCore_Model_Config::STATUS_REFUND: return ($currentStatus == Mage_Sales_Model_Order::STATE_PROCESSING || $currentStatus == Mage_Sales_Model_Order::STATE_COMPLETE);
236
+ default:
237
+ return false;
238
+ };
239
+ }
240
+
241
+ protected function canUpdateBasedOnIcepayTable($currentStatus, $newStatus)
242
+ {
243
+ switch ($currentStatus) {
244
+ case Icepay_IceCore_Model_Config::STATUS_NEW:
245
+ case Icepay_IceCore_Model_Config::STATUS_OPEN:
246
+ return (
247
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_SUCCESS ||
248
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_ERROR ||
249
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_AUTH ||
250
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_OPEN
251
+ );
252
+ break;
253
+ case Icepay_IceCore_Model_Config::STATUS_AUTH:
254
+ return (
255
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_SUCCESS ||
256
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_ERROR
257
+ );
258
+ break;
259
+ case Icepay_IceCore_Model_Config::STATUS_ERROR:
260
+ return (
261
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_SUCCESS
262
+ );
263
+ break;
264
+ case Icepay_IceCore_Model_Config::STATUS_SUCCESS:
265
+ return (
266
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_CHARGEBACK ||
267
+ $newStatus == Icepay_IceCore_Model_Config::STATUS_REFUND
268
+ );
269
+ break;
270
+ default:
271
+ return false;
272
+ break;
273
+ }
274
+ }
275
+
276
+ protected function getMagentoStatus($icepayStatus)
277
+ {
278
+ switch ($icepayStatus) {
279
+ case Icepay_IceCore_Model_Config::STATUS_SUCCESS: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_SUCCESS;
280
+ case Icepay_IceCore_Model_Config::STATUS_OPEN: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_OPEN;
281
+ case Icepay_IceCore_Model_Config::STATUS_ERROR: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_ERROR;
282
+ case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_CHARGEBACK;
283
+ case Icepay_IceCore_Model_Config::STATUS_REFUND: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_REFUND;
284
+ case Icepay_IceCore_Model_Config::STATUS_AUTH: return Icepay_IceCore_Model_Config::STATUS_MAGENTO_AUTHORIZED;
285
+ default:
286
+ return false;
287
+ };
288
+ }
289
+
290
+ protected function getMagentoState($icepayStatus)
291
+ {
292
+ switch ($icepayStatus) {
293
+ case Icepay_IceCore_Model_Config::STATUS_SUCCESS:
294
+ return Mage_Sales_Model_Order::STATE_PROCESSING;
295
+ break;
296
+ case Icepay_IceCore_Model_Config::STATUS_OPEN:
297
+ case Icepay_IceCore_Model_config::STATUS_AUTH:
298
+ return Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
299
+ break;
300
+ case Icepay_IceCore_Model_Config::STATUS_ERROR:
301
+ return Mage_Sales_Model_Order::STATE_CANCELED;
302
+ break;
303
+ case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK:
304
+ case Icepay_IceCore_Model_Config::STATUS_REFUND:
305
+ return Mage_Sales_Model_Order::STATE_HOLDED;
306
+ //return Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
307
+ break;
308
+ default:
309
+ return false;
310
+ };
311
+ }
312
+
313
+ protected function getTransactionStatus($icepayStatus)
314
+ {
315
+ switch ($icepayStatus) {
316
+ case Icepay_IceCore_Model_Config::STATUS_SUCCESS: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_PAYMENT;
317
+ case Icepay_IceCore_Model_Config::STATUS_OPEN: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID;
318
+ case Icepay_IceCore_Model_config::STATUS_AUTH: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID;
319
+ case Icepay_IceCore_Model_Config::STATUS_ERROR: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID;
320
+ case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND;
321
+ case Icepay_IceCore_Model_Config::STATUS_REFUND: return Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND;
322
+ default: return false;
323
+ };
324
+ }
325
+
326
+ protected function isClosedStatus($icepayStatus)
327
+ {
328
+ switch ($icepayStatus) {
329
+ case Icepay_IceCore_Model_Config::STATUS_SUCCESS: return true;
330
+ case Icepay_IceCore_Model_Config::STATUS_OPEN: return false;
331
+ case Icepay_IceCore_Model_config::STATUS_AUTH: return false;
332
+ case Icepay_IceCore_Model_Config::STATUS_ERROR: return true;
333
+ case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return true;
334
+ case Icepay_IceCore_Model_Config::STATUS_REFUND: return true;
335
+ default: return false;
336
+ };
337
+ }
338
+
339
+ protected function isRefund($icepayStatus)
340
+ {
341
+ switch ($icepayStatus) {
342
+ case Icepay_IceCore_Model_Config::STATUS_CHARGEBACK: return true;
343
+ case Icepay_IceCore_Model_Config::STATUS_REFUND: return true;
344
+ default:
345
+ return false;
346
+ };
347
+ }
348
+
349
+ protected function getParentPaymentID($statusString)
350
+ {
351
+ $arr = explode("PaymentID:", $statusString);
352
+ return intval($arr[1]);
353
+ }
354
+
355
+ protected function getTransactionString($_vars)
356
+ {
357
+ $str = "";
358
+ foreach ($_vars as $key => $value) {
359
+ $str .= "{$key}: {$value}<BR>";
360
+ }
361
+ return $str;
362
+ }
363
+
364
  }
app/code/community/Icepay/IceCore/Model/Icepay/Result.php CHANGED
@@ -1,61 +1,61 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Return page processing
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceCore_Model_Icepay_Result {
17
-
18
- protected $sqlModel;
19
-
20
- public function __construct()
21
- {
22
- $this->sqlModel = Mage::getModel('icecore/mysql4_iceCore');
23
- }
24
-
25
- public function handle(array $_vars)
26
- {
27
-
28
- if (count($_vars) == 0)
29
- die("ICEPAY result page installed correctly.");
30
- if (!$_vars['OrderID'])
31
- die("No orderID found");
32
-
33
- $order = Mage::getModel('sales/order');
34
- $order->loadByIncrementId(($_vars['OrderID'] == "DUMMY") ? $_vars['Reference'] : $_vars['OrderID'])
35
- ->addStatusHistoryComment(sprintf(Mage::helper("icecore")->__("Customer returned with status: %s"), $_vars['StatusCode']))
36
- ->save();
37
-
38
- switch (strtoupper($_vars['Status'])) {
39
- case "ERR":
40
- $quoteID = Mage::getSingleton('checkout/session')->getQuoteId();
41
- Mage::getSingleton('core/session')->setData('ic_quoteid', $quoteID);
42
- Mage::getSingleton('core/session')->setData('ic_quotedate', date("Y-m-d H:i:s"));
43
-
44
- $msg = sprintf(Mage::helper("icecore")->__("The payment provider has returned the following error message: %s"), Mage::helper("icecore")->__($_vars['Status'] . ": " . $_vars['StatusCode']));
45
- $url = 'checkout/cart';
46
- Mage::getSingleton('checkout/session')->addError($msg);
47
- break;
48
- case "OK":
49
- case "OPEN":
50
- default:
51
- Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
52
- $url = 'checkout/onepage/success';
53
- };
54
-
55
- /* Redirect based on store */
56
- Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl($url));
57
- $url = Mage::app()->getStore($order->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true) . $url;
58
- Mage::app()->getFrontController()->getResponse()->setRedirect($url);
59
- }
60
-
61
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Return page processing
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceCore_Model_Icepay_Result {
17
+
18
+ protected $sqlModel;
19
+
20
+ public function __construct()
21
+ {
22
+ $this->sqlModel = Mage::getModel('icecore/mysql4_iceCore');
23
+ }
24
+
25
+ public function handle(array $_vars)
26
+ {
27
+
28
+ if (count($_vars) == 0)
29
+ die("ICEPAY result page installed correctly.");
30
+ if (!$_vars['OrderID'])
31
+ die("No orderID found");
32
+
33
+ $order = Mage::getModel('sales/order');
34
+ $order->loadByIncrementId(($_vars['OrderID'] == "DUMMY") ? $_vars['Reference'] : $_vars['OrderID'])
35
+ ->addStatusHistoryComment(sprintf(Mage::helper("icecore")->__("Customer returned with status: %s"), $_vars['StatusCode']))
36
+ ->save();
37
+
38
+ switch (strtoupper($_vars['Status'])) {
39
+ case "ERR":
40
+ $quoteID = Mage::getSingleton('checkout/session')->getQuoteId();
41
+ Mage::getSingleton('core/session')->setData('ic_quoteid', $quoteID);
42
+ Mage::getSingleton('core/session')->setData('ic_quotedate', date("Y-m-d H:i:s"));
43
+
44
+ $msg = sprintf(Mage::helper("icecore")->__("The payment provider has returned the following error message: %s"), Mage::helper("icecore")->__($_vars['Status'] . ": " . $_vars['StatusCode']));
45
+ $url = 'checkout/cart';
46
+ Mage::getSingleton('checkout/session')->addError($msg);
47
+ break;
48
+ case "OK":
49
+ case "OPEN":
50
+ default:
51
+ Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
52
+ $url = 'checkout/onepage/success';
53
+ };
54
+
55
+ /* Redirect based on store */
56
+ Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl($url));
57
+ $url = Mage::app()->getStore($order->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true) . $url;
58
+ Mage::app()->getFrontController()->getResponse()->setRedirect($url);
59
+ }
60
+
61
  }
app/code/community/Icepay/IceCore/Model/Mysql4/IceCore.php CHANGED
@@ -1,189 +1,189 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - SQL methods
5
- * @version 1.0.1
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
- class Icepay_IceCore_Model_Mysql4_IceCore extends Mage_Core_Model_Mysql4_Abstract {
17
-
18
- protected $modules = null;
19
-
20
- public function _construct()
21
- {
22
- // Note that the basicgateway_id refers to the key field in the database table.
23
- $this->_init('icecore/icecore', 'icecore_id');
24
- }
25
-
26
- public function getModules()
27
- {
28
- $modules = array();
29
-
30
- $mod_namespace = $this->getModuleData("title");
31
-
32
- foreach ($mod_namespace as $module) {
33
- try {
34
- $class = sprintf("Icepay_Ice%s_Helper_Data", $module["value"]);
35
- if (class_exists($class)) {
36
- $helper = new $class();
37
- array_push($modules, array(
38
- 'id' => $helper->id,
39
- 'name' => $helper->title,
40
- 'compatible' => sprintf("Magento %s - %s", $helper->compatibility_oldest_version, $helper->compatibility_latest_version),
41
- 'compatibleFrom' => $helper->compatibility_oldest_version,
42
- 'compatibleTo' => $helper->compatibility_latest_version,
43
- 'active' => $this->getModuleConfiguration("active", $helper->section),
44
- 'serial' => $this->getModuleConfiguration("serial", $helper->section),
45
- 'serialreq' => $helper->serial_required,
46
- 'version' => $helper->version,
47
- 'fingerprint' => $helper->fingerprint,
48
- 'namespace' => $helper->section
49
- ));
50
- }
51
- } catch (Exception $e) {
52
- Mage::helper("icecore")->log($e->getMessage());
53
- };
54
- }
55
- return $modules;
56
- }
57
-
58
- public function isActive($namespace)
59
- {
60
- return ($this->getModuleConfiguration("active", $namespace) == "1");
61
- }
62
-
63
- public function getModulesConfiguration()
64
- {
65
- $moduleData = $this->getModules();
66
-
67
- for ($i = 0; $i < count($moduleData); $i++) {
68
- $moduleData[$i]["active"] = $this->getModuleConfiguration("active", $moduleData[$i]["namespace"]);
69
- $moduleData[$i]["serial"] = $this->getModuleConfiguration("serial", $moduleData[$i]["namespace"]);
70
- };
71
-
72
- return $moduleData;
73
- }
74
-
75
- public function getModuleData($unique = "title")
76
- {
77
- $conn = $this->_getReadAdapter();
78
- $select = $conn
79
- ->select()
80
- ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path', 'value'))
81
- ->where(new Zend_Db_Expr("path LIKE 'iceadvanced/module/" . $unique . "'"))
82
- ->order('path');
83
- $data = $conn->fetchAll($select);
84
-
85
- return $data;
86
- }
87
-
88
- public function getModuleConfiguration($config = "active", $namespace = "icecore")
89
- {
90
- $conn = $this->_getReadAdapter();
91
- $select = $conn
92
- ->select()
93
- ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path', 'value'))
94
- ->where(new Zend_Db_Expr("path = 'icecore/" . $namespace . "/" . $config . "'"));
95
- $data = $conn->fetchRow($select);
96
- return $data["value"];
97
- }
98
-
99
- protected function getAuthID()
100
- {
101
- if ($this->modules == null)
102
- $this->modules = $this->getModules();
103
- $str = "";
104
- foreach ($this->modules as $module) {
105
- if ($module["serialreq"] == "1" && $module["active"] == "1")
106
- $str.= $module["id"];
107
- }
108
-
109
- return $str;
110
- }
111
-
112
- public function getAuthKey($storeID = 0)
113
- {
114
- if ($this->modules == null)
115
- $this->modules = $this->getModules();
116
- $arr = array();
117
- foreach ($this->modules as $module) {
118
- if ($module["serialreq"] == "1" && $module["active"] == "1") {
119
- array_push($arr, sprintf("[%s,%s,%s]", trim($module["id"]), trim($module["fingerprint"]), trim($module["serial"])));
120
- }
121
- }
122
- $str = sprintf("%s,[%s]", Mage::helper('icecore')->getMerchantIDForStore($storeID), implode(",", $arr));
123
- return sha1($str);
124
- }
125
-
126
- /* @sales_order_payment_place_end event */
127
-
128
- public function savePayment(Varien_Event_Observer $observer)
129
- {
130
- $payment = $observer->getPayment();
131
- $order = $payment->getOrder();
132
- $pmName = $payment->getMethodInstance()->getCode();
133
-
134
- $param = Mage::app()->getFrontController()->getRequest()->getParam('payment');
135
-
136
- $paymentMethod = (isset($param[$pmName . '_paymentmethod'])) ? $param[$pmName . '_paymentmethod'] : $param['method'];
137
- $issuer = isset($param[$pmName . '_issuer']) ? $param[$pmName . '_issuer'] : '0';
138
-
139
- $country = (isset($param[$pmName . '_country'])) ? $param[$pmName . '_country'] : $order->getBillingAddress()->getCountryId();
140
- if ($country == "00")
141
- $country = $order->getBillingAddress()->getCountryId();
142
-
143
- $ice_payment = array(
144
- 'ic_merchantid' => Mage::helper('icecore')->getMerchantIDForStore($order->getStore()->getId()),
145
- 'ic_currency' => $order->getOrderCurrencyCode(),
146
- 'ic_amount' => Mage::helper('icecore')->formatTotal($order->getGrandTotal()),
147
- 'ic_description' => Mage::helper('icecore')->getTransactionDescription($order->getRealOrderId()),
148
- 'ic_country' => $country,
149
- 'ic_language' => Mage::helper("icecore")->getLangISO2(),
150
- 'ic_reference' => $order->getRealOrderId(),
151
- 'ic_paymentmethod' => $paymentMethod,
152
- 'ic_issuer' => $issuer,
153
- 'ic_orderid' => $order->getRealOrderId(),
154
- 'ic_moduleid' => $this->getAuthID(),
155
- 'ic_authkey' => $this->getAuthKey($order->getStore()->getId())
156
- );
157
-
158
- $data = array(
159
- 'order_id' => $order->getRealOrderId(),
160
- 'model' => $pmName,
161
- 'transaction_data' => urlencode(serialize($ice_payment)),
162
- 'store_id' => $order->getStore()->getId(),
163
- 'status' => Icepay_IceCore_Model_Config::STATUS_NEW,
164
- 'update_time' => now(),
165
- 'creation_time' => now()
166
- );
167
-
168
- $this->_getWriteAdapter()->insert($this->getTable('icepay_transactions'), $data);
169
- }
170
-
171
- public function loadPaymentByID($id)
172
- {
173
- $conn = $this->_getReadAdapter();
174
- $select = $conn
175
- ->select()
176
- ->from($this->getTable('icepay_transactions'), array('transaction_data', 'transaction_id', 'status', 'store_id', 'model', 'order_id'))
177
- ->where(new Zend_Db_Expr("order_id = '" . $id . "'"));
178
- $data = $conn->fetchRow($select);
179
- return $data;
180
- }
181
-
182
- public function changeStatus(array $data)
183
- {
184
- $where = $this->_getReadAdapter()->quoteInto('order_id = ?', $data["order_id"]);
185
- $this->_getWriteAdapter()->update(
186
- $this->getTable('icepay_transactions'), $data, $where);
187
- }
188
-
189
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - SQL methods
5
+ * @version 1.0.1
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+ class Icepay_IceCore_Model_Mysql4_IceCore extends Mage_Core_Model_Mysql4_Abstract {
17
+
18
+ protected $modules = null;
19
+
20
+ public function _construct()
21
+ {
22
+ // Note that the basicgateway_id refers to the key field in the database table.
23
+ $this->_init('icecore/icecore', 'icecore_id');
24
+ }
25
+
26
+ public function getModules()
27
+ {
28
+ $modules = array();
29
+
30
+ $mod_namespace = $this->getModuleData("title");
31
+
32
+ foreach ($mod_namespace as $module) {
33
+ try {
34
+ $class = sprintf("Icepay_Ice%s_Helper_Data", $module["value"]);
35
+ if (class_exists($class)) {
36
+ $helper = new $class();
37
+ array_push($modules, array(
38
+ 'id' => $helper->id,
39
+ 'name' => $helper->title,
40
+ 'compatible' => sprintf("Magento %s - %s", $helper->compatibility_oldest_version, $helper->compatibility_latest_version),
41
+ 'compatibleFrom' => $helper->compatibility_oldest_version,
42
+ 'compatibleTo' => $helper->compatibility_latest_version,
43
+ 'active' => $this->getModuleConfiguration("active", $helper->section),
44
+ 'serial' => $this->getModuleConfiguration("serial", $helper->section),
45
+ 'serialreq' => $helper->serial_required,
46
+ 'version' => $helper->version,
47
+ 'fingerprint' => $helper->fingerprint,
48
+ 'namespace' => $helper->section
49
+ ));
50
+ }
51
+ } catch (Exception $e) {
52
+ Mage::helper("icecore")->log($e->getMessage());
53
+ };
54
+ }
55
+ return $modules;
56
+ }
57
+
58
+ public function isActive($namespace)
59
+ {
60
+ return ($this->getModuleConfiguration("active", $namespace) == "1");
61
+ }
62
+
63
+ public function getModulesConfiguration()
64
+ {
65
+ $moduleData = $this->getModules();
66
+
67
+ for ($i = 0; $i < count($moduleData); $i++) {
68
+ $moduleData[$i]["active"] = $this->getModuleConfiguration("active", $moduleData[$i]["namespace"]);
69
+ $moduleData[$i]["serial"] = $this->getModuleConfiguration("serial", $moduleData[$i]["namespace"]);
70
+ };
71
+
72
+ return $moduleData;
73
+ }
74
+
75
+ public function getModuleData($unique = "title")
76
+ {
77
+ $conn = $this->_getReadAdapter();
78
+ $select = $conn
79
+ ->select()
80
+ ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path', 'value'))
81
+ ->where(new Zend_Db_Expr("path LIKE 'iceadvanced/module/" . $unique . "'"))
82
+ ->order('path');
83
+ $data = $conn->fetchAll($select);
84
+
85
+ return $data;
86
+ }
87
+
88
+ public function getModuleConfiguration($config = "active", $namespace = "icecore")
89
+ {
90
+ $conn = $this->_getReadAdapter();
91
+ $select = $conn
92
+ ->select()
93
+ ->from($this->getTable('core/config_data'), array('scope', 'scope_id', 'path', 'value'))
94
+ ->where(new Zend_Db_Expr("path = 'icecore/" . $namespace . "/" . $config . "'"));
95
+ $data = $conn->fetchRow($select);
96
+ return $data["value"];
97
+ }
98
+
99
+ protected function getAuthID()
100
+ {
101
+ if ($this->modules == null)
102
+ $this->modules = $this->getModules();
103
+ $str = "";
104
+ foreach ($this->modules as $module) {
105
+ if ($module["serialreq"] == "1" && $module["active"] == "1")
106
+ $str.= $module["id"];
107
+ }
108
+
109
+ return $str;
110
+ }
111
+
112
+ public function getAuthKey($storeID = 0)
113
+ {
114
+ if ($this->modules == null)
115
+ $this->modules = $this->getModules();
116
+ $arr = array();
117
+ foreach ($this->modules as $module) {
118
+ if ($module["serialreq"] == "1" && $module["active"] == "1") {
119
+ array_push($arr, sprintf("[%s,%s,%s]", trim($module["id"]), trim($module["fingerprint"]), trim($module["serial"])));
120
+ }
121
+ }
122
+ $str = sprintf("%s,[%s]", Mage::helper('icecore')->getMerchantIDForStore($storeID), implode(",", $arr));
123
+ return sha1($str);
124
+ }
125
+
126
+ /* @sales_order_payment_place_end event */
127
+
128
+ public function savePayment(Varien_Event_Observer $observer)
129
+ {
130
+ $payment = $observer->getPayment();
131
+ $order = $payment->getOrder();
132
+ $pmName = $payment->getMethodInstance()->getCode();
133
+
134
+ $param = Mage::app()->getFrontController()->getRequest()->getParam('payment');
135
+
136
+ $paymentMethod = (isset($param[$pmName . '_paymentmethod'])) ? $param[$pmName . '_paymentmethod'] : $param['method'];
137
+ $issuer = isset($param[$pmName . '_issuer']) ? $param[$pmName . '_issuer'] : '0';
138
+
139
+ $country = (isset($param[$pmName . '_country'])) ? $param[$pmName . '_country'] : $order->getBillingAddress()->getCountryId();
140
+ if ($country == "00")
141
+ $country = $order->getBillingAddress()->getCountryId();
142
+
143
+ $ice_payment = array(
144
+ 'ic_merchantid' => Mage::helper('icecore')->getMerchantIDForStore($order->getStore()->getId()),
145
+ 'ic_currency' => $order->getOrderCurrencyCode(),
146
+ 'ic_amount' => Mage::helper('icecore')->formatTotal($order->getGrandTotal()),
147
+ 'ic_description' => Mage::helper('icecore')->getTransactionDescription($order->getRealOrderId()),
148
+ 'ic_country' => $country,
149
+ 'ic_language' => Mage::helper("icecore")->getLangISO2(),
150
+ 'ic_reference' => $order->getRealOrderId(),
151
+ 'ic_paymentmethod' => $paymentMethod,
152
+ 'ic_issuer' => $issuer,
153
+ 'ic_orderid' => $order->getRealOrderId(),
154
+ 'ic_moduleid' => $this->getAuthID(),
155
+ 'ic_authkey' => $this->getAuthKey($order->getStore()->getId())
156
+ );
157
+
158
+ $data = array(
159
+ 'order_id' => $order->getRealOrderId(),
160
+ 'model' => $pmName,
161
+ 'transaction_data' => urlencode(serialize($ice_payment)),
162
+ 'store_id' => $order->getStore()->getId(),
163
+ 'status' => Icepay_IceCore_Model_Config::STATUS_NEW,
164
+ 'update_time' => now(),
165
+ 'creation_time' => now()
166
+ );
167
+
168
+ $this->_getWriteAdapter()->insert($this->getTable('icepay_transactions'), $data);
169
+ }
170
+
171
+ public function loadPaymentByID($id)
172
+ {
173
+ $conn = $this->_getReadAdapter();
174
+ $select = $conn
175
+ ->select()
176
+ ->from($this->getTable('icepay_transactions'), array('transaction_data', 'transaction_id', 'status', 'store_id', 'model', 'order_id'))
177
+ ->where(new Zend_Db_Expr("order_id = '" . $id . "'"));
178
+ $data = $conn->fetchRow($select);
179
+ return $data;
180
+ }
181
+
182
+ public function changeStatus(array $data)
183
+ {
184
+ $where = $this->_getReadAdapter()->quoteInto('order_id = ?', $data["order_id"]);
185
+ $this->_getWriteAdapter()->update(
186
+ $this->getTable('icepay_transactions'), $data, $where);
187
+ }
188
+
189
  }
app/code/community/Icepay/IceCore/Model/Webservice/Core.php CHANGED
@@ -1,112 +1,112 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY - Webservice Core Model
5
- *
6
- * @version 1.0.1
7
- * @author Wouter van Tilburg <wouter@icepay.eu>
8
- * @copyright ICEPAY <www.icepay.com>
9
- *
10
- * Disclaimer:
11
- * The merchant is entitled to change de ICEPAY plug-in code,
12
- * any changes will be at merchant's own risk.
13
- * Requesting ICEPAY support for a modified plug-in will be
14
- * charged in accordance with the standard ICEPAY tariffs.
15
- *
16
- */
17
- class Icepay_IceCore_Model_Webservice_Core {
18
-
19
- protected $merchantID;
20
- protected $secretCode;
21
- protected $client;
22
- protected $serviceURL = 'https://connect.icepay.com/webservice/icepay.svc?wsdl';
23
-
24
- /**
25
- * Create the SOAP client
26
- *
27
- * @param int $merchantID
28
- * @param string $secretCode
29
- *
30
- * @since 1.0.0
31
- */
32
- public function init($merchantID, $secretCode)
33
- {
34
- $this->merchantID = (int) $merchantID;
35
- $this->secretCode = (string) $secretCode;
36
-
37
- $this->client = new SoapClient($this->serviceURL, array(
38
- 'encoding' => 'UTF-8',
39
- 'cache_wsdl' => 'WSDL_CACHE_NONE'
40
- ));
41
- }
42
-
43
- /**
44
- * Return Merchant ID
45
- *
46
- * @since 1.0.1
47
- * @return string
48
- */
49
- public function getMerchantID()
50
- {
51
- return $this->merchantID;
52
- }
53
-
54
- /**
55
- * Return SecretCode
56
- *
57
- * @since 1.0.1
58
- * @return string
59
- */
60
- public function getSecretCode()
61
- {
62
- return $this->secretCode;
63
- }
64
-
65
- /**
66
- * Return the user IP address
67
- *
68
- * @since 1.0.0
69
- * @return string
70
- */
71
- protected function getIP()
72
- {
73
- return (string) $_SERVER['REMOTE_ADDR'];
74
- }
75
-
76
- /**
77
- * Return the current timestamp
78
- *
79
- * @since 1.0.0
80
- * @return type
81
- */
82
- protected function getTimestamp()
83
- {
84
- return (string) gmdate("Y-m-d\TH:i:s\Z");
85
- }
86
-
87
- /**
88
- * Generate and return the checksum
89
- *
90
- * @param object $obj
91
- * @param string $secretCode
92
- *
93
- * @since 1.0.0
94
- * @return string
95
- */
96
- protected function generateChecksum($obj = null, $secretCode = null)
97
- {
98
- $arr = array();
99
-
100
- if ($secretCode)
101
- array_push($arr, $secretCode);
102
-
103
- foreach ($obj as $val) {
104
- if (is_bool($val))
105
- $val = ($val) ? 'true' : 'false';
106
- array_push($arr, $val);
107
- }
108
-
109
- return (string) sha1(implode("|", $arr));
110
- }
111
-
112
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY - Webservice Core Model
5
+ *
6
+ * @version 1.0.1
7
+ * @author Wouter van Tilburg <wouter@icepay.eu>
8
+ * @copyright ICEPAY <www.icepay.com>
9
+ *
10
+ * Disclaimer:
11
+ * The merchant is entitled to change de ICEPAY plug-in code,
12
+ * any changes will be at merchant's own risk.
13
+ * Requesting ICEPAY support for a modified plug-in will be
14
+ * charged in accordance with the standard ICEPAY tariffs.
15
+ *
16
+ */
17
+ class Icepay_IceCore_Model_Webservice_Core {
18
+
19
+ protected $merchantID;
20
+ protected $secretCode;
21
+ protected $client;
22
+ protected $serviceURL = 'https://connect.icepay.com/webservice/icepay.svc?wsdl';
23
+
24
+ /**
25
+ * Create the SOAP client
26
+ *
27
+ * @param int $merchantID
28
+ * @param string $secretCode
29
+ *
30
+ * @since 1.0.0
31
+ */
32
+ public function init($merchantID, $secretCode)
33
+ {
34
+ $this->merchantID = (int) $merchantID;
35
+ $this->secretCode = (string) $secretCode;
36
+
37
+ $this->client = new SoapClient($this->serviceURL, array(
38
+ 'encoding' => 'UTF-8',
39
+ 'cache_wsdl' => 'WSDL_CACHE_NONE'
40
+ ));
41
+ }
42
+
43
+ /**
44
+ * Return Merchant ID
45
+ *
46
+ * @since 1.0.1
47
+ * @return string
48
+ */
49
+ public function getMerchantID()
50
+ {
51
+ return $this->merchantID;
52
+ }
53
+
54
+ /**
55
+ * Return SecretCode
56
+ *
57
+ * @since 1.0.1
58
+ * @return string
59
+ */
60
+ public function getSecretCode()
61
+ {
62
+ return $this->secretCode;
63
+ }
64
+
65
+ /**
66
+ * Return the user IP address
67
+ *
68
+ * @since 1.0.0
69
+ * @return string
70
+ */
71
+ protected function getIP()
72
+ {
73
+ return (string) $_SERVER['REMOTE_ADDR'];
74
+ }
75
+
76
+ /**
77
+ * Return the current timestamp
78
+ *
79
+ * @since 1.0.0
80
+ * @return type
81
+ */
82
+ protected function getTimestamp()
83
+ {
84
+ return (string) gmdate("Y-m-d\TH:i:s\Z");
85
+ }
86
+
87
+ /**
88
+ * Generate and return the checksum
89
+ *
90
+ * @param object $obj
91
+ * @param string $secretCode
92
+ *
93
+ * @since 1.0.0
94
+ * @return string
95
+ */
96
+ protected function generateChecksum($obj = null, $secretCode = null)
97
+ {
98
+ $arr = array();
99
+
100
+ if ($secretCode)
101
+ array_push($arr, $secretCode);
102
+
103
+ foreach ($obj as $val) {
104
+ if (is_bool($val))
105
+ $val = ($val) ? 'true' : 'false';
106
+ array_push($arr, $val);
107
+ }
108
+
109
+ return (string) sha1(implode("|", $arr));
110
+ }
111
+
112
  }
app/code/community/Icepay/IceCore/controllers/AboutController.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Controller About
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceCore_AboutController extends Mage_Core_Controller_Front_Action
18
- {
19
-
20
- public function indexAction()
21
- {
22
- $this->loadLayout()->renderLayout();
23
- }
24
-
25
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Controller About
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceCore_AboutController extends Mage_Core_Controller_Front_Action
18
+ {
19
+
20
+ public function indexAction()
21
+ {
22
+ $this->loadLayout()->renderLayout();
23
+ }
24
+
25
  }
app/code/community/Icepay/IceCore/controllers/CheckController.php CHANGED
@@ -1,33 +1,33 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Controller Check, misc. check scripts
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceCore_CheckController extends Mage_Core_Controller_Front_Action
18
- {
19
- public function indexAction()
20
- {
21
- $this->_redirect('icepay/about');
22
- }
23
-
24
- //Example: icepay/check/template/module/icepayadvanced
25
- public function templateAction(){
26
- $module = strtolower($this->getRequest()->module);
27
- if (substr($module, 0, 6) != "icepay") die("module must start with icepay");
28
- $this->getResponse()->setBody(
29
- $this->getLayout()->createBlock("icecore/front_template")->setTemplate(sprintf("%s/front/check.phtml",$module))->toHtml()
30
- );
31
- }
32
-
33
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Controller Check, misc. check scripts
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceCore_CheckController extends Mage_Core_Controller_Front_Action
18
+ {
19
+ public function indexAction()
20
+ {
21
+ $this->_redirect('icepay/about');
22
+ }
23
+
24
+ //Example: icepay/check/template/module/icepayadvanced
25
+ public function templateAction(){
26
+ $module = strtolower($this->getRequest()->module);
27
+ if (substr($module, 0, 6) != "icepay") die("module must start with icepay");
28
+ $this->getResponse()->setBody(
29
+ $this->getLayout()->createBlock("icecore/front_template")->setTemplate(sprintf("%s/front/check.phtml",$module))->toHtml()
30
+ );
31
+ }
32
+
33
  }
app/code/community/Icepay/IceCore/controllers/IndexController.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Controller Index
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceCore_IndexController extends Mage_Core_Controller_Front_Action
18
- {
19
- public function indexAction()
20
- {
21
- $this->_redirect('icepay/about');
22
- }
23
-
24
-
25
  }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Controller Index
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceCore_IndexController extends Mage_Core_Controller_Front_Action
18
+ {
19
+ public function indexAction()
20
+ {
21
+ $this->_redirect('icepay/about');
22
+ }
23
+
24
+
25
  }
app/code/community/Icepay/IceCore/controllers/ProcessingController.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- /**
4
- * ICEPAY Core - Return process controller
5
- * @version 1.0.0
6
- * @author Olaf Abbenhuis
7
- * @copyright ICEPAY <www.icepay.com>
8
- *
9
- * Disclaimer:
10
- * The merchant is entitled to change de ICEPAY plug-in code,
11
- * any changes will be at merchant's own risk.
12
- * Requesting ICEPAY support for a modified plug-in will be
13
- * charged in accordance with the standard ICEPAY tariffs.
14
- *
15
- */
16
-
17
- class Icepay_IceCore_ProcessingController extends Mage_Core_Controller_Front_Action {
18
-
19
- public function indexAction() {
20
- $this->_redirect('icepay/about');
21
- }
22
-
23
- public function notifyAction() {
24
- Mage::getModel('icecore/icepay_postback')->handle($this->getRequest()->getPost());
25
- }
26
-
27
- public function resultAction() {
28
- Mage::getModel('icecore/icepay_result')->handle($this->getRequest()->getQuery());
29
- }
30
-
31
- }
1
+ <?php
2
+
3
+ /**
4
+ * ICEPAY Core - Return process controller
5
+ * @version 1.0.0
6
+ * @author Olaf Abbenhuis
7
+ * @copyright ICEPAY <www.icepay.com>
8
+ *
9
+ * Disclaimer:
10
+ * The merchant is entitled to change de ICEPAY plug-in code,
11
+ * any changes will be at merchant's own risk.
12
+ * Requesting ICEPAY support for a modified plug-in will be
13
+ * charged in accordance with the standard ICEPAY tariffs.
14
+ *
15
+ */
16
+
17
+ class Icepay_IceCore_ProcessingController extends Mage_Core_Controller_Front_Action {
18
+
19
+ public function indexAction() {
20
+ $this->_redirect('icepay/about');
21
+ }
22
+
23
+ public function notifyAction() {
24
+ Mage::getModel('icecore/icepay_postback')->handle($this->getRequest()->getPost());
25
+ }
26
+
27
+ public function resultAction() {
28
+ Mage::getModel('icecore/icepay_result')->handle($this->getRequest()->getQuery());
29
+ }
30
+
31
+ }
app/code/community/Icepay/IceCore/etc/config.xml CHANGED
@@ -1,181 +1,181 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Icepay_IceCore>
5
- <version>1.2.9</version>
6
- </Icepay_IceCore>
7
- </modules>
8
- <frontend>
9
- <routers>
10
- <icepay>
11
- <use>standard</use>
12
- <args>
13
- <module>Icepay_IceCore</module>
14
- <frontName>icepay</frontName>
15
- </args>
16
- </icepay>
17
- </routers>
18
- <layout>
19
- <updates>
20
- <icecore>
21
- <file>icecore.xml</file>
22
- </icecore>
23
- </updates>
24
- </layout>
25
- <translate>
26
- <modules>
27
- <Icepay_IceCore>
28
- <files>
29
- <default>Icepay_IceCore.csv</default>
30
- </files>
31
- </Icepay_IceCore>
32
- </modules>
33
- </translate>
34
- </frontend>
35
- <adminhtml>
36
- <translate>
37
- <modules>
38
- <Icepay_IceCore>
39
- <files>
40
- <default>Icepay_IceCore.csv</default>
41
- </files>
42
- </Icepay_IceCore>
43
- </modules>
44
- </translate>
45
- <acl>
46
- <resources>
47
- <admin>
48
- <children>
49
- <system>
50
- <children>
51
- <config>
52
- <children>
53
- <icecore translate="title" module="icecore">
54
- <title>icecore Settings</title>
55
- </icecore>
56
- </children>
57
- </config>
58
- </children>
59
- </system>
60
- </children>
61
- </admin>
62
- </resources>
63
- </acl>
64
- <layout>
65
- <updates>
66
- <icecore>
67
- <file>icecore.xml</file>
68
- </icecore>
69
- </updates>
70
- </layout>
71
- </adminhtml>
72
- <global>
73
- <models>
74
- <icecore>
75
- <class>Icepay_IceCore_Model</class>
76
- <resourceModel>icecore_mysql4</resourceModel>
77
- </icecore>
78
- <icecore_mysql4>
79
- <class>Icepay_IceCore_Model_Mysql4</class>
80
- <entities>
81
- <icepay_transactions>
82
- <table>icepay_transactions</table>
83
- </icepay_transactions>
84
- </entities>
85
- </icecore_mysql4>
86
- </models>
87
- <resources>
88
- <icepaycore_setup>
89
- <setup>
90
- <module>Icepay_IceCore</module>
91
- </setup>
92
- <connection>
93
- <use>core_setup</use>
94
- </connection>
95
- </icepaycore_setup>
96
- <icecore_write>
97
- <connection>
98
- <use>core_write</use>
99
- </connection>
100
- </icecore_write>
101
- <icecore_read>
102
- <connection>
103
- <use>core_read</use>
104
- </connection>
105
- </icecore_read>
106
- </resources>
107
- <blocks>
108
- <icecore>
109
- <class>Icepay_IceCore_Block</class>
110
- </icecore>
111
- </blocks>
112
- <helpers>
113
- <icecore>
114
- <class>Icepay_IceCore_Helper</class>
115
- </icecore>
116
- </helpers>
117
- <payment>
118
- <groups>
119
- <icepay>ICEPAY</icepay>
120
- </groups>
121
- </payment>
122
- <sales>
123
- <order>
124
- <statuses>
125
- <icecore_new translate="label">
126
- <label>New</label>
127
- <visible_on_front/>
128
- </icecore_new>
129
- <icecore_open translate="label">
130
- <label>Awaiting payment</label>
131
- <visible_on_front/>
132
- </icecore_open>
133
- <icecore_ok translate="label">
134
- <label>Payment received</label>
135
- </icecore_ok>
136
- <icecore_err translate="label">
137
- <label>Payment error</label>
138
- </icecore_err>
139
- <icecore_refund translate="label">
140
- <label>Payment refund request</label>
141
- </icecore_refund>
142
- <icecore_cback translate="label">
143
- <label>Payment chargeback request</label>
144
- </icecore_cback>
145
- </statuses>
146
- <states>
147
- <pending_payment>
148
- <statuses>
149
- <icecore_new/>
150
- <icecore_open/>
151
- </statuses>
152
- <visible_on_front/>
153
- </pending_payment>
154
- <processing_payment>
155
- <statuses>
156
- <icecore_ok/>
157
- </statuses>
158
- <visible_on_front/>
159
- </processing_payment>
160
- <cancel_payment>
161
- <statuses>
162
- <icecore_err/>
163
- </statuses>
164
- <visible_on_front/>
165
- </cancel_payment>
166
- </states>
167
-
168
- </order>
169
- </sales>
170
- </global>
171
- <default>
172
- <icecore>
173
- <advancedconfig>
174
- <language>en_US</language>
175
- </advancedconfig>
176
- <core_options>
177
- <order_autoinvoice>1</order_autoinvoice>
178
- </core_options>
179
- </icecore>
180
- </default>
181
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Icepay_IceCore>
5
+ <version>1.2.11</version>
6
+ </Icepay_IceCore>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <icepay>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Icepay_IceCore</module>
14
+ <frontName>icepay</frontName>
15
+ </args>
16
+ </icepay>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <icecore>
21
+ <file>icecore.xml</file>
22
+ </icecore>
23
+ </updates>
24
+ </layout>
25
+ <translate>
26
+ <modules>
27
+ <Icepay_IceCore>
28
+ <files>
29
+ <default>Icepay_IceCore.csv</default>
30
+ </files>
31
+ </Icepay_IceCore>
32
+ </modules>
33
+ </translate>
34
+ </frontend>
35
+ <adminhtml>
36
+ <translate>
37
+ <modules>
38
+ <Icepay_IceCore>
39
+ <files>
40
+ <default>Icepay_IceCore.csv</default>
41
+ </files>
42
+ </Icepay_IceCore>
43
+ </modules>
44
+ </translate>
45
+ <acl>
46
+ <resources>
47
+ <admin>
48
+ <children>
49
+ <system>
50
+ <children>
51
+ <config>
52
+ <children>
53
+ <icecore translate="title" module="icecore">
54
+ <title>icecore Settings</title>
55
+ </icecore>
56
+ </children>
57
+ </config>
58
+ </children>
59
+ </system>
60
+ </children>
61
+ </admin>
62
+ </resources>
63
+ </acl>
64
+ <layout>
65
+ <updates>
66
+ <icecore>
67
+ <file>icecore.xml</file>
68
+ </icecore>
69
+ </updates>
70
+ </layout>
71
+ </adminhtml>
72
+ <global>
73
+ <models>
74
+ <icecore>
75
+ <class>Icepay_IceCore_Model</class>
76
+ <resourceModel>icecore_mysql4</resourceModel>
77
+ </icecore>
78
+ <icecore_mysql4>
79
+ <class>Icepay_IceCore_Model_Mysql4</class>
80
+ <entities>
81
+ <icepay_transactions>
82
+ <table>icepay_transactions</table>
83
+ </icepay_transactions>
84
+ </entities>
85
+ </icecore_mysql4>
86
+ </models>
87
+ <resources>
88
+ <icepaycore_setup>
89
+ <setup>
90
+ <module>Icepay_IceCore</module>
91
+ </setup>
92
+ <connection>
93
+ <use>core_setup</use>
94
+ </connection>
95
+ </icepaycore_setup>
96
+ <icecore_write>
97
+ <connection>
98
+ <use>core_write</use>
99
+ </connection>
100
+ </icecore_write>
101
+ <icecore_read>
102
+ <connection>
103
+ <use>core_read</use>
104
+ </connection>
105
+ </icecore_read>
106
+ </resources>
107
+ <blocks>
108
+ <icecore>
109
+ <class>Icepay_IceCore_Block</class>
110
+ </icecore>
111
+ </blocks>
112
+ <helpers>
113
+ <icecore>
114
+ <class>Icepay_IceCore_Helper</class>
115
+ </icecore>
116
+ </helpers>
117
+ <payment>
118
+ <groups>
119
+ <icepay>ICEPAY</icepay>
120
+ </groups>
121
+ </payment>
122
+ <sales>
123
+ <order>
124
+ <statuses>
125
+ <icecore_new translate="label">
126
+ <label>New</label>
127
+ <visible_on_front/>
128
+ </icecore_new>
129
+ <icecore_open translate="label">
130
+ <label>Awaiting payment</label>
131
+ <visible_on_front/>
132
+ </icecore_open>
133
+ <icecore_ok translate="label">
134
+ <label>Payment received</label>
135
+ </icecore_ok>
136
+ <icecore_err translate="label">
137
+ <label>Payment error</label>
138
+ </icecore_err>
139
+ <icecore_refund translate="label">
140
+ <label>Payment refund request</label>
141
+ </icecore_refund>
142
+ <icecore_cback translate="label">
143
+ <label>Payment chargeback request</label>
144
+ </icecore_cback>
145
+ </statuses>
146
+ <states>
147
+ <pending_payment>
148
+ <statuses>
149
+ <icecore_new/>
150
+ <icecore_open/>
151
+ </statuses>
152
+ <visible_on_front/>
153
+ </pending_payment>
154
+ <processing_payment>
155
+ <statuses>
156
+ <icecore_ok/>
157
+ </statuses>
158
+ <visible_on_front/>
159
+ </processing_payment>
160
+ <cancel_payment>
161
+ <statuses>
162
+ <icecore_err/>
163
+ </statuses>
164
+ <visible_on_front/>
165
+ </cancel_payment>
166
+ </states>
167
+
168
+ </order>
169
+ </sales>
170
+ </global>
171
+ <default>
172
+ <icecore>
173
+ <advancedconfig>
174
+ <language>en_US</language>
175
+ </advancedconfig>
176
+ <core_options>
177
+ <order_autoinvoice>1</order_autoinvoice>
178
+ </core_options>
179
+ </icecore>
180
+ </default>
181
  </config>
app/code/community/Icepay/IceCore/etc/system.xml CHANGED
@@ -1,181 +1,181 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <tabs>
4
- <icepay translate="label" module="icecore">
5
- <label>Icepay Extensions</label>
6
- <sort_order>99999</sort_order>
7
- </icepay>
8
- </tabs>
9
- <sections>
10
- <icecore translate="label comment" module="icecore">
11
- <label>Advanced</label>
12
- <tab>icepay</tab>
13
- <frontend_type>text</frontend_type>
14
- <sort_order>360</sort_order>
15
- <show_in_default>1</show_in_default>
16
- <show_in_website>1</show_in_website>
17
- <show_in_store>1</show_in_store>
18
- <groups>
19
- <settings translate="label comment">
20
- <label>Set-up configuration</label>
21
- <comment>This configuration section is for implementing ICEPAY, please do not change these settings after saving.</comment>
22
- <expanded>1</expanded>
23
- <frontend_type>text</frontend_type>
24
- <sort_order>0</sort_order>
25
- <show_in_default>1</show_in_default>
26
- <show_in_website>0</show_in_website>
27
- <show_in_store>1</show_in_store>
28
- <fields>
29
- <step_1>
30
- <label>Step 1.</label>
31
- <frontend_type>Label</frontend_type>
32
- <sort_order>5</sort_order>
33
- <show_in_default>1</show_in_default>
34
- <show_in_website>0</show_in_website>
35
- <show_in_store>1</show_in_store>
36
- </step_1>
37
- <merchant_url_ok translate="label comment">
38
- <label>URL for Success</label>
39
- <frontend_type>text</frontend_type>
40
- <frontend_model>icecore/adminhtml_generateURL</frontend_model>
41
- <tooltip>Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.</tooltip>
42
- <show_in_default>1</show_in_default>
43
- <show_in_website>0</show_in_website>
44
- <show_in_store>1</show_in_store>
45
- <sort_order>6</sort_order>
46
- </merchant_url_ok>
47
- <merchant_url_err translate="label comment">
48
- <label>URL for Error</label>
49
- <frontend_type>text</frontend_type>
50
- <frontend_model>icecore/adminhtml_generateURL</frontend_model>
51
- <tooltip>Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.</tooltip>
52
- <show_in_default>1</show_in_default>
53
- <show_in_website>0</show_in_website>
54
- <show_in_store>1</show_in_store>
55
- <sort_order>7</sort_order>
56
- </merchant_url_err>
57
- <merchant_url_notify translate="label comment">
58
- <label>URL for Postback/Notify</label>
59
- <frontend_type>text</frontend_type>
60
- <frontend_model>icecore/adminhtml_generateURL</frontend_model>
61
- <tooltip>Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.</tooltip>
62
- <show_in_default>1</show_in_default>
63
- <show_in_website>0</show_in_website>
64
- <show_in_store>1</show_in_store>
65
- <sort_order>8</sort_order>
66
- </merchant_url_notify>
67
- <step_2>
68
- <label>Step 2.</label>
69
- <frontend_type>label</frontend_type>
70
- <sort_order>20</sort_order>
71
- <show_in_default>1</show_in_default>
72
- <show_in_website>0</show_in_website>
73
- <show_in_store>1</show_in_store>
74
- </step_2>
75
- <merchant_id>
76
- <label>Merchant ID</label>
77
- <frontend_type>text</frontend_type>
78
- <sort_order>22</sort_order>
79
- <validate>validate-number validate-length minimum-length-5 maximum-length-5</validate>
80
- <tooltip>Copy the Merchant ID from your ICEPAY account.</tooltip>
81
- <show_in_default>1</show_in_default>
82
- <show_in_website>0</show_in_website>
83
- <show_in_store>1</show_in_store>
84
- </merchant_id>
85
- <merchant_secret translate="label comment">
86
- <label>Secret Code</label>
87
- <frontend_type>text</frontend_type>
88
- <sort_order>24</sort_order>
89
- <validate>validate-alphanum validate-length minimum-length-40 maximum-length-40</validate>
90
- <tooltip>Copy the Secret Code from your ICEPAY account.</tooltip>
91
- <show_in_default>1</show_in_default>
92
- <show_in_website>0</show_in_website>
93
- <show_in_store>1</show_in_store>
94
- </merchant_secret>
95
- <step_3>
96
- <label>Configuration Information</label>
97
- <frontend_type>label</frontend_type>
98
- <frontend_model>icecore/adminhtml_checkSettings</frontend_model>
99
- <sort_order>30</sort_order>
100
- <show_in_default>1</show_in_default>
101
- <show_in_website>0</show_in_website>
102
- <show_in_store>1</show_in_store>
103
- </step_3>
104
- <manual>
105
- <label></label>
106
- <comment>Please read the advanced manual</comment>
107
- <frontend_type>label</frontend_type>
108
- <sort_order>40</sort_order>
109
- <show_in_default>1</show_in_default>
110
- <show_in_website>0</show_in_website>
111
- <show_in_store>1</show_in_store>
112
- </manual>
113
- </fields>
114
- </settings>
115
-
116
- <modules translate="label">
117
- <label>Installed modules</label>
118
- <comment>This is an overview of installed ICEPAY modules</comment>
119
- <expanded>1</expanded>
120
- <sort_order>100</sort_order>
121
- <show_in_default>1</show_in_default>
122
- <show_in_website>0</show_in_website>
123
- <show_in_store>0</show_in_store>
124
- <frontend_type>text</frontend_type>
125
- <fields>
126
- <version>
127
- <label>Modules</label>
128
- <frontend_model>icecore/adminhtml_grid_modules</frontend_model>
129
- <sort_order>1</sort_order>
130
- <show_in_default>1</show_in_default>
131
- <show_in_website>0</show_in_website>
132
- <show_in_store>0</show_in_store>
133
- </version>
134
- </fields>
135
- </modules>
136
-
137
- <core_options translate="label">
138
- <label>Options</label>
139
- <expanded>1</expanded>
140
- <frontend_type>text</frontend_type>
141
- <sort_order>60</sort_order>
142
- <show_in_default>1</show_in_default>
143
- <show_in_website>0</show_in_website>
144
- <show_in_store>1</show_in_store>
145
- <fields>
146
- <order_autorefund translate="label">
147
- <label>Auto refund</label>
148
- <comment>Have Magento refund the ICEPAY transaction online when creating a credit memo.</comment>
149
- <frontend_type>select</frontend_type>
150
- <source_model>adminhtml/system_config_source_yesno</source_model>
151
- <sort_order>10</sort_order>
152
- <show_in_default>1</show_in_default>
153
- <show_in_website>0</show_in_website>
154
- <show_in_store>1</show_in_store>
155
- </order_autorefund>
156
- <order_autoinvoice translate="label">
157
- <label>Auto invoice</label>
158
- <comment>Have Magento create the invoice automatically when payment has been completed.</comment>
159
- <frontend_type>select</frontend_type>
160
- <source_model>adminhtml/system_config_source_yesno</source_model>
161
- <sort_order>20</sort_order>
162
- <show_in_default>1</show_in_default>
163
- <show_in_website>0</show_in_website>
164
- <show_in_store>1</show_in_store>
165
- </order_autoinvoice>
166
- <transaction_descr translate="label">
167
- <label>Description on transaction statement of customer</label>
168
- <comment>Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.)</comment>
169
- <frontend_type>text</frontend_type>
170
- <validate>validate-length maximum-length-99</validate>
171
- <sort_order>30</sort_order>
172
- <show_in_default>1</show_in_default>
173
- <show_in_website>0</show_in_website>
174
- <show_in_store>1</show_in_store>
175
- </transaction_descr>
176
- </fields>
177
- </core_options>
178
- </groups>
179
- </icecore>
180
- </sections>
181
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <icepay translate="label" module="icecore">
5
+ <label>Icepay Extensions</label>
6
+ <sort_order>99999</sort_order>
7
+ </icepay>
8
+ </tabs>
9
+ <sections>
10
+ <icecore translate="label comment" module="icecore">
11
+ <label>Advanced</label>
12
+ <tab>icepay</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>360</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <settings translate="label comment">
20
+ <label>Set-up configuration</label>
21
+ <comment>This configuration section is for implementing ICEPAY, please do not change these settings after saving.</comment>
22
+ <expanded>1</expanded>
23
+ <frontend_type>text</frontend_type>
24
+ <sort_order>0</sort_order>
25
+ <show_in_default>1</show_in_default>
26
+ <show_in_website>0</show_in_website>
27
+ <show_in_store>1</show_in_store>
28
+ <fields>
29
+ <step_1>
30
+ <label>Step 1.</label>
31
+ <frontend_type>Label</frontend_type>
32
+ <sort_order>5</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>0</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ </step_1>
37
+ <merchant_url_ok translate="label comment">
38
+ <label>URL for Success</label>
39
+ <frontend_type>text</frontend_type>
40
+ <frontend_model>icecore/adminhtml_generateURL</frontend_model>
41
+ <tooltip>Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.</tooltip>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>0</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ <sort_order>6</sort_order>
46
+ </merchant_url_ok>
47
+ <merchant_url_err translate="label comment">
48
+ <label>URL for Error</label>
49
+ <frontend_type>text</frontend_type>
50
+ <frontend_model>icecore/adminhtml_generateURL</frontend_model>
51
+ <tooltip>Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.</tooltip>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>0</show_in_website>
54
+ <show_in_store>1</show_in_store>
55
+ <sort_order>7</sort_order>
56
+ </merchant_url_err>
57
+ <merchant_url_notify translate="label comment">
58
+ <label>URL for Postback/Notify</label>
59
+ <frontend_type>text</frontend_type>
60
+ <frontend_model>icecore/adminhtml_generateURL</frontend_model>
61
+ <tooltip>Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.</tooltip>
62
+ <show_in_default>1</show_in_default>
63
+ <show_in_website>0</show_in_website>
64
+ <show_in_store>1</show_in_store>
65
+ <sort_order>8</sort_order>
66
+ </merchant_url_notify>
67
+ <step_2>
68
+ <label>Step 2.</label>
69
+ <frontend_type>label</frontend_type>
70
+ <sort_order>20</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>0</show_in_website>
73
+ <show_in_store>1</show_in_store>
74
+ </step_2>
75
+ <merchant_id>
76
+ <label>Merchant ID</label>
77
+ <frontend_type>text</frontend_type>
78
+ <sort_order>22</sort_order>
79
+ <validate>validate-number validate-length minimum-length-5 maximum-length-5</validate>
80
+ <tooltip>Copy the Merchant ID from your ICEPAY account.</tooltip>
81
+ <show_in_default>1</show_in_default>
82
+ <show_in_website>0</show_in_website>
83
+ <show_in_store>1</show_in_store>
84
+ </merchant_id>
85
+ <merchant_secret translate="label comment">
86
+ <label>Secret Code</label>
87
+ <frontend_type>text</frontend_type>
88
+ <sort_order>24</sort_order>
89
+ <validate>validate-alphanum validate-length minimum-length-40 maximum-length-40</validate>
90
+ <tooltip>Copy the Secret Code from your ICEPAY account.</tooltip>
91
+ <show_in_default>1</show_in_default>
92
+ <show_in_website>0</show_in_website>
93
+ <show_in_store>1</show_in_store>
94
+ </merchant_secret>
95
+ <step_3>
96
+ <label>Configuration Information</label>
97
+ <frontend_type>label</frontend_type>
98
+ <frontend_model>icecore/adminhtml_checkSettings</frontend_model>
99
+ <sort_order>30</sort_order>
100
+ <show_in_default>1</show_in_default>
101
+ <show_in_website>0</show_in_website>
102
+ <show_in_store>1</show_in_store>
103
+ </step_3>
104
+ <manual>
105
+ <label></label>
106
+ <comment>Please read the advanced manual</comment>
107
+ <frontend_type>label</frontend_type>
108
+ <sort_order>40</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>0</show_in_website>
111
+ <show_in_store>1</show_in_store>
112
+ </manual>
113
+ </fields>
114
+ </settings>
115
+
116
+ <modules translate="label">
117
+ <label>Installed modules</label>
118
+ <comment>This is an overview of installed ICEPAY modules</comment>
119
+ <expanded>1</expanded>
120
+ <sort_order>100</sort_order>
121
+ <show_in_default>1</show_in_default>
122
+ <show_in_website>0</show_in_website>
123
+ <show_in_store>0</show_in_store>
124
+ <frontend_type>text</frontend_type>
125
+ <fields>
126
+ <version>
127
+ <label>Modules</label>
128
+ <frontend_model>icecore/adminhtml_grid_modules</frontend_model>
129
+ <sort_order>1</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>0</show_in_website>
132
+ <show_in_store>0</show_in_store>
133
+ </version>
134
+ </fields>
135
+ </modules>
136
+
137
+ <core_options translate="label">
138
+ <label>Options</label>
139
+ <expanded>1</expanded>
140
+ <frontend_type>text</frontend_type>
141
+ <sort_order>60</sort_order>
142
+ <show_in_default>1</show_in_default>
143
+ <show_in_website>0</show_in_website>
144
+ <show_in_store>1</show_in_store>
145
+ <fields>
146
+ <order_autorefund translate="label">
147
+ <label>Auto refund</label>
148
+ <comment>Have Magento refund the ICEPAY transaction online when creating a credit memo.</comment>
149
+ <frontend_type>select</frontend_type>
150
+ <source_model>adminhtml/system_config_source_yesno</source_model>
151
+ <sort_order>10</sort_order>
152
+ <show_in_default>1</show_in_default>
153
+ <show_in_website>0</show_in_website>
154
+ <show_in_store>1</show_in_store>
155
+ </order_autorefund>
156
+ <order_autoinvoice translate="label">
157
+ <label>Auto invoice</label>
158
+ <comment>Have Magento create the invoice automatically when payment has been completed.</comment>
159
+ <frontend_type>select</frontend_type>
160
+ <source_model>adminhtml/system_config_source_yesno</source_model>
161
+ <sort_order>20</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>0</show_in_website>
164
+ <show_in_store>1</show_in_store>
165
+ </order_autoinvoice>
166
+ <transaction_descr translate="label">
167
+ <label>Description on transaction statement of customer</label>
168
+ <comment>Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.)</comment>
169
+ <frontend_type>text</frontend_type>
170
+ <validate>validate-length maximum-length-99</validate>
171
+ <sort_order>30</sort_order>
172
+ <show_in_default>1</show_in_default>
173
+ <show_in_website>0</show_in_website>
174
+ <show_in_store>1</show_in_store>
175
+ </transaction_descr>
176
+ </fields>
177
+ </core_options>
178
+ </groups>
179
+ </icecore>
180
+ </sections>
181
  </config>
app/code/community/Icepay/IceCore/sql/icepaycore_setup/mysql4-install-1.0.0.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
-
3
- $namespace = Mage::helper('icecore')->section;
4
-
5
- $installer = $this;
6
- $installer->startSetup();
7
-
8
- $conn = $installer->getConnection();
9
- $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace . '/module/title', 'value' => Mage::helper($namespace)->title), array('value'));
10
- $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace . '/module/namespace', 'value' => $namespace), array('value'));
11
- $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace . '/' . $namespace . '/active', 'value' => '1'), array('value'));
12
-
13
-
14
- $installer->run("
15
-
16
- CREATE TABLE IF NOT EXISTS `icepay_transactions` (
17
- `local_id` smallint(6) NOT NULL AUTO_INCREMENT,
18
- `order_id` varchar(36) NOT NULL DEFAULT '0',
19
- `model` varchar(32) NOT NULL,
20
- `transaction_id` int(36) NOT NULL DEFAULT '0',
21
- `status` varchar(255) NOT NULL DEFAULT '',
22
- `transaction_data` text,
23
- `creation_time` datetime DEFAULT NULL,
24
- `update_time` datetime DEFAULT NULL,
25
- `store_id` tinyint(4) NOT NULL DEFAULT '0',
26
- PRIMARY KEY (`local_id`,`order_id`)
27
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ICEPAY transactions';
28
- ");
29
-
30
- $installer->run("
31
- INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES
32
- ('icecore_cback', 'Payment chargeback request'),
33
- ('icecore_ok', 'Payment received'),
34
- ('icecore_err', 'Payment error'),
35
- ('icecore_open', 'Awaiting payment'),
36
- ('icecore_new', 'New'),
37
- ('icecore_refund', 'Payment refund request');
38
-
39
- INSERT INTO `{$installer->getTable('sales_order_status_state')}` (`status`, `state`, `is_default`) VALUES
40
- ('icecore_ok', 'processing', 0),
41
- ('icecore_err', 'canceled', 0),
42
- ('icecore_open', 'pending_payment', 0),
43
- ('icecore_new', 'new', 0);
44
-
45
- ");
46
-
47
-
48
- $installer->endSetup();
1
+ <?php
2
+
3
+ $namespace = Mage::helper('icecore')->section;
4
+
5
+ $installer = $this;
6
+ $installer->startSetup();
7
+
8
+ $conn = $installer->getConnection();
9
+ $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace . '/module/title', 'value' => Mage::helper($namespace)->title), array('value'));
10
+ $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace . '/module/namespace', 'value' => $namespace), array('value'));
11
+ $conn->insertOnDuplicate($this->getTable('core/config_data'), array('path' => $namespace . '/' . $namespace . '/active', 'value' => '1'), array('value'));
12
+
13
+
14
+ $installer->run("
15
+
16
+ CREATE TABLE IF NOT EXISTS `icepay_transactions` (
17
+ `local_id` smallint(6) NOT NULL AUTO_INCREMENT,
18
+ `order_id` varchar(36) NOT NULL DEFAULT '0',
19
+ `model` varchar(32) NOT NULL,
20
+ `transaction_id` int(36) NOT NULL DEFAULT '0',
21
+ `status` varchar(255) NOT NULL DEFAULT '',
22
+ `transaction_data` text,
23
+ `creation_time` datetime DEFAULT NULL,
24
+ `update_time` datetime DEFAULT NULL,
25
+ `store_id` tinyint(4) NOT NULL DEFAULT '0',
26
+ PRIMARY KEY (`local_id`,`order_id`)
27
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ICEPAY transactions';
28
+ ");
29
+
30
+ $installer->run("
31
+ INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES
32
+ ('icecore_cback', 'Payment chargeback request'),
33
+ ('icecore_ok', 'Payment received'),
34
+ ('icecore_err', 'Payment error'),
35
+ ('icecore_open', 'Awaiting payment'),
36
+ ('icecore_new', 'New'),
37
+ ('icecore_refund', 'Payment refund request');
38
+
39
+ INSERT INTO `{$installer->getTable('sales_order_status_state')}` (`status`, `state`, `is_default`) VALUES
40
+ ('icecore_ok', 'processing', 0),
41
+ ('icecore_err', 'canceled', 0),
42
+ ('icecore_open', 'pending_payment', 0),
43
+ ('icecore_new', 'new', 0);
44
+
45
+ ");
46
+
47
+
48
+ $installer->endSetup();
app/code/community/Icepay/IceCore/sql/icepaycore_setup/mysql4-upgrade-1.0.0-1.0.1.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- $installer = $this;
4
- $installer->startSetup();
5
-
6
- $installer->run("
7
- ALTER TABLE `icepay_transactions` RENAME TO `{$installer->getTable('icepay_transactions')}`;
8
- ");
9
-
10
- $installer->endSetup();
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+
6
+ $installer->run("
7
+ ALTER TABLE `icepay_transactions` RENAME TO `{$installer->getTable('icepay_transactions')}`;
8
+ ");
9
+
10
+ $installer->endSetup();
app/code/community/Icepay/IceCore/sql/icepaycore_setup/mysql4-upgrade-1.0.1-1.2.10.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+
6
+ $installer->run("CREATE INDEX icepay_trans_order_id ON {$this->getTable('icepay_transactions')} (order_id);");
7
+
8
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/icecore.xml CHANGED
@@ -1,15 +1,15 @@
1
- <?xml version="1.0"?>
2
-
3
-
4
- <layout>
5
- <adminhtml_system_config_edit>
6
- <reference name="content">
7
- <block type="icecore/adminhtml_init" name="icecore_init" template="icecore/init.phtml"></block>
8
- </reference>
9
- </adminhtml_system_config_edit>
10
- <basicgateway_adminhtml_icecore_index>
11
- <reference name="content">
12
- <block type="icecore/adminhtml_icecore" name="icecore" />
13
- </reference>
14
- </basicgateway_adminhtml_icecore_index>
15
  </layout>
1
+ <?xml version="1.0"?>
2
+
3
+
4
+ <layout>
5
+ <adminhtml_system_config_edit>
6
+ <reference name="content">
7
+ <block type="icecore/adminhtml_init" name="icecore_init" template="icecore/init.phtml"></block>
8
+ </reference>
9
+ </adminhtml_system_config_edit>
10
+ <basicgateway_adminhtml_icecore_index>
11
+ <reference name="content">
12
+ <block type="icecore/adminhtml_icecore" name="icecore" />
13
+ </reference>
14
+ </basicgateway_adminhtml_icecore_index>
15
  </layout>
app/design/adminhtml/default/default/template/icepayadvanced/form/default.phtml CHANGED
@@ -1,52 +1,52 @@
1
- <?php
2
-
3
- $_code = $this->getMethodCode();
4
-
5
- ?>
6
-
7
- <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none">
8
-
9
- <input type="hidden" name="payment[<?php echo $_code ?>_paymentmethod]" value="<?php echo $this->getPMCode() ?>">
10
-
11
- <?php if($this->getPMCode()): ?>
12
- <li>
13
- <label for="<?php echo $_code ?>_image"><?php
14
- Mage::helper("icecore")->imageDir = "frontend/base/default/images/icepay/";
15
- Mage::helper("icecore")->imageExtension = "png";
16
- echo Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($this->getPMCode()));
17
- ?></label>
18
- </li>
19
- <?php endif; ?>
20
-
21
- <?php if($this->getTitle()): ?>
22
- <li>
23
- <label for="<?php echo $_code ?>_title"><?php echo $this->getTitle() ?></label>
24
- </li>
25
- <?php endif; ?>
26
-
27
- <?php if($this->getDescription()): ?>
28
- <li>
29
- <label for="<?php echo $_code ?>_info"><?php echo $this->getDescription() ?></label>
30
- </li>
31
- <?php endif; ?>
32
-
33
- <?php if($this->_issuer): ?>
34
- <?php if(count($this->_issuer) > 1): ?>
35
- <li>
36
- <label for="<?php echo $_code ?>_icepay_issuer" class="required"><em>*</em><?php echo $this->__('Please select an issuer') ?></label>
37
- <div class="input-box">
38
- <select id="<?php echo $_code ?>_icepay_issuer" name="payment[<?php echo $_code ?>_issuer]" class="required-entry validate-alpha">
39
- <option value="" selected><?php echo $this->__('--Please Select--')?></option>
40
- <?php
41
- foreach($this->_issuer as $issuer){
42
- echo('<option value="'.$issuer['value'].'">'.$this->__($issuer['label']).'</option>');
43
- };
44
- ?>
45
- </select>
46
- </div>
47
- </li>
48
- <?php else: ?>
49
- <input type="hidden" name="payment[<?php echo $_code ?>_issuer]" value="<?php echo $this->_issuer[0]['value'] ?>">
50
- <?php endif; ?>
51
- <?php endif; ?>
52
- </ul>
1
+ <?php
2
+
3
+ $_code = $this->getMethodCode();
4
+
5
+ ?>
6
+
7
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none">
8
+
9
+ <input type="hidden" name="payment[<?php echo $_code ?>_paymentmethod]" value="<?php echo $this->getPMCode() ?>">
10
+
11
+ <?php if($this->getPMCode()): ?>
12
+ <li>
13
+ <label for="<?php echo $_code ?>_image"><?php
14
+ Mage::helper("icecore")->imageDir = "frontend/base/default/images/icepay/";
15
+ Mage::helper("icecore")->imageExtension = "png";
16
+ echo Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($this->getPMCode()));
17
+ ?></label>
18
+ </li>
19
+ <?php endif; ?>
20
+
21
+ <?php if($this->getTitle()): ?>
22
+ <li>
23
+ <label for="<?php echo $_code ?>_title"><?php echo $this->getTitle() ?></label>
24
+ </li>
25
+ <?php endif; ?>
26
+
27
+ <?php if($this->getDescription()): ?>
28
+ <li>
29
+ <label for="<?php echo $_code ?>_info"><?php echo $this->getDescription() ?></label>
30
+ </li>
31
+ <?php endif; ?>
32
+
33
+ <?php if($this->_issuer): ?>
34
+ <?php if(count($this->_issuer) > 1): ?>
35
+ <li>
36
+ <label for="<?php echo $_code ?>_icepay_issuer" class="required"><em>*</em><?php echo $this->__('Please select an issuer') ?></label>
37
+ <div class="input-box">
38
+ <select id="<?php echo $_code ?>_icepay_issuer" name="payment[<?php echo $_code ?>_issuer]" class="required-entry validate-alpha">
39
+ <option value="" selected><?php echo $this->__('--Please Select--')?></option>
40
+ <?php
41
+ foreach($this->_issuer as $issuer){
42
+ echo('<option value="'.$issuer['value'].'">'.$this->__($issuer['label']).'</option>');
43
+ };
44
+ ?>
45
+ </select>
46
+ </div>
47
+ </li>
48
+ <?php else: ?>
49
+ <input type="hidden" name="payment[<?php echo $_code ?>_issuer]" value="<?php echo $this->_issuer[0]['value'] ?>">
50
+ <?php endif; ?>
51
+ <?php endif; ?>
52
+ </ul>
app/design/adminhtml/default/default/template/icepayadvanced/grid_paymentmethods.phtml CHANGED
@@ -1,305 +1,305 @@
1
- <?php $_htmlId = $this->getElement()->getHtmlId() ?>
2
- <?php $_htmlClass = $this->getElement()->getClass() ?>
3
- <?php $_htmlName = $this->getElement()->getName() ?>
4
-
5
- <tr>
6
-
7
- <td colspan="11" class="grid tier">
8
- <input id="ice_webservice" type="hidden" name="groups[iceadvanced][fields][webservice_data][value]" value="0"/>
9
- <table cellspacing="0" class="data border" id="modules_table" style="width:600px">
10
- <col width="100" />
11
- <col width="120" />
12
- <col width="70" />
13
- <col width="190" />
14
- <col width="120" />
15
- <thead>
16
- <tr class="headings">
17
- <th><?php echo Mage::helper('iceadvanced')->__('Paymentmethod') ?></th>
18
- <th><?php echo Mage::helper('iceadvanced')->__('Title') ?></th>
19
- <th><?php echo Mage::helper('iceadvanced')->__('# Issuers') ?></th>
20
- <th><?php echo Mage::helper('iceadvanced')->__('Settings') ?></th>
21
- <th><?php echo Mage::helper('iceadvanced')->__('Active') ?></th>
22
- </tr>
23
- </thead>
24
- <tbody id="<?php echo $_htmlId ?>_container"></tbody>
25
- <tfoot>
26
- <tr>
27
- <td colspan="5" class="a-right"><?php echo $this->getAddButtonHtml() ?></td>
28
- </tr>
29
- </tfoot>
30
- </table>
31
-
32
-
33
-
34
- <script type="text/javascript" src="<?php echo $this->getJS('tiny_mce/tiny_mce.js'); ?>"></script>
35
- <script type="text/javascript">
36
- //<![CDATA[
37
-
38
- var ICEPAYPaymentMethodRowTemplate = '<tr id="icepay_{{index}}">'
39
- + '<td>{{pm_img}}</td>'
40
- + '<td><input class=" required-entry validate-length minimum-length-5 maximum-length-32 input-text" type="text" name="groups[{{module_namespace}}][fields][{{pm_key}}title][value]" value="{{pm_title}}" id="icepay_module_row_{{index}}_serial" style="width:93px;"/></td>'
41
- + '<td>{{pm_issuers}}</td>'
42
- + '<td><button type="button" class="scalable " onclick="icepayEditor.open(\'<?php echo $this->_ajaxLoadPaymentMethodURL ?>\', \'icepay_module_row_{{index}}_serial\')" style=""><span><?php echo $this->__('Configure') ?></span></button></td>'
43
- + '<td><select class="<?php echo $_htmlClass ?>" name="groups[{{module_namespace}}][fields][{{pm_key}}active][value]" id="icepay_pm_row_{{index}}_enabled" {{module_active_switch}}>'
44
- + '<option value="1"><?php echo Mage::helper("icecore")->__("Enabled") ?></option>'
45
- + '<option value="0"><?php echo Mage::helper("icecore")->__("Disabled") ?></option>'
46
- + '</select></td>'
47
- + '</tr>';
48
-
49
- var ICEPAYRetrievedPaymentMethodRowTemplate = '<tr id="icepay_{{index}}">'
50
- + '<input type="hidden" name="groups[{{module_namespace}}][fields][{{pm_key}}_][value]" id="icepay_pm_row_{{index}}_issuerdata" value="{{pm_issuerdata}}"/>'
51
- + '<input type="hidden" name="groups[{{module_namespace}}][fields][{{pm_key}}issuer][value]" id="icepay_pm_row_{{index}}_issuerdata" value="{{pm_issuerdata}}"/>'
52
- + '<td>{{pm_img}}</td>'
53
- + '<td><input class=" required-entry validate-length minimum-length-5 maximum-length-32 input-text" type="text" name="groups[{{module_namespace}}][fields][{{pm_key}}title][value]" value="{{pm_title}}" id="icepay_module_row_{{index}}_serial" style="width:93px;"/></td>'
54
- + '<td>{{pm_issuers}}</td>'
55
- + '<td><?php echo $this->__("Save Config to configure") ?></td>'
56
- + '<td><select class="<?php echo $_htmlClass ?>" name="groups[{{module_namespace}}][fields][{{pm_key}}active][value]" id="icepay_pm_row_{{index}}_enabled" {{module_active_switch}}>'
57
- + '<option value="1"><?php echo Mage::helper("icecore")->__("Enabled") ?></option>'
58
- + '<option value="0"><?php echo Mage::helper("icecore")->__("Disabled") ?></option>'
59
- + '</select></td>'
60
- //+ '<input type="hidden" name="groups[{{module_namespace}}][fields][{{pm_key}}code][value]" value="{{pm_code}}"/>'
61
- + '</tr>';
62
-
63
- var ICEPAYSettingsTemplate = '<p id="{{msg_id}}" class="{{type}}">{{msg}}</p>';
64
-
65
-
66
- var ICEPAY = {
67
- template: new Template(ICEPAYPaymentMethodRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
68
- ajaxTemplate: new Template(ICEPAYRetrievedPaymentMethodRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
69
- msgTemplate: new Template(ICEPAYSettingsTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
70
- itemsCount: 0,
71
- msgCount: 0,
72
- addItem: function() {
73
- var data = {
74
- pm_code: '',
75
- pm_title: '',
76
- pm_active: '',
77
- pm_key: '',
78
- pm_info: '',
79
- pm_img: '',
80
- pm_issuers: '',
81
- pm_issuerdata: '',
82
- pm_issuerimage: '',
83
- module_namespace: '',
84
- module_template: '',
85
- index: this.itemsCount++
86
- };
87
-
88
- data.pm_code = arguments[0];
89
- data.pm_title = arguments[1];
90
- data.pm_img = arguments[2];
91
- data.pm_issuers = arguments[3];
92
- data.pm_active = arguments[4];
93
- data.pm_info = arguments[5];
94
- data.pm_issuerdata = arguments[6];
95
- data.module_template = (arguments[7]) ? 1 : 0;
96
-
97
- data.pm_key = 'pm_' + arguments[0].toLowerCase() + '_';
98
- data.module_namespace = 'paymentmethod';
99
-
100
- Element.insert($('<?php echo $_htmlId ?>_container'), {
101
- bottom: (data.pm_issuerdata) ? this.ajaxTemplate.evaluate(data) : this.template.evaluate(data)
102
- });
103
-
104
- $('icepay_pm_row_' + data.index + '_enabled').selectedIndex = (data.pm_active == "1") ? 0 : 1;
105
- },
106
- addMessage: function() {
107
-
108
- var data = {
109
- type: '',
110
- msg: '',
111
- msg_id: '',
112
- index: this.msgCount++
113
- };
114
-
115
-
116
- data.type = arguments[0];
117
- data.msg = arguments[1];
118
- data.msg_id = "msg_id_" + data.index.toString();
119
-
120
- Element.insert($('icepay_debugger'), {
121
- bottom: this.msgTemplate.evaluate(data)
122
- });
123
-
124
- },
125
- clearMessages: function() {
126
- for (var i = 0; i < this.msgCount; i++) {
127
- try {
128
- Element.remove($('msg_id_' + i.toString()));
129
- } catch (err) {
130
- alert(err.toString());
131
- }
132
- }
133
- this.msgCount = 0;
134
- },
135
- clearAll: function() {
136
- for (var i = 0; i < this.itemsCount; i++) {
137
- try {
138
- Element.remove($('icepay_' + i));
139
- } catch (err) {
140
- }
141
- }
142
- this.itemsCount = 0;
143
- },
144
- retrieveFromICEPAY: function() {
145
- var url = '<?php echo $this->_ajaxGetPaymentMethodsURL ?>';
146
- var parameters = {};
147
- new Ajax.Request(url, {
148
- parameters: parameters,
149
- onComplete: function(response) {
150
- if (response.status === 200) {
151
- var result = response.responseText.evalJSON();
152
-
153
- if (result.msg) {
154
- ICEPAY.clearMessages();
155
- for (var i = 0; i < result.msg.length; i++)
156
- ICEPAY.addMessage(result.msg[i].type, result.msg[i].msg);
157
- }
158
-
159
- if (result.paymentmethods) {
160
- ICEPAY.clearAll();
161
- $('ice_webservice').value = 1;
162
-
163
- for (var i = 0; i < result.paymentmethods.length; i++) {
164
- var issuers = (result.paymentmethods[i].Issuers.Issuer.length > 0) ? result.paymentmethods[i].Issuers.Issuer.length.toString() + " issuers" : "1 issuer";
165
-
166
- ICEPAY.addItem(
167
- result.paymentmethods[i].PaymentMethodCode,
168
- result.paymentmethods[i].Description,
169
- result.paymentmethods[i].Image,
170
- issuers,
171
- result.paymentmethods[i].ConfigActive,
172
- result.paymentmethods[i].ConfigDescription,
173
- result.issuers[i]["data"]);
174
- }
175
- }
176
- }
177
- },
178
- onError: function(response) {
179
-
180
- }
181
- });
182
- return true;
183
- }
184
- };
185
-
186
-
187
- <?php foreach ($this->getPaymentmethods() as $_item): ?>
188
- <?php if (intval($_item['issuers']) > 0): ?>
189
- ICEPAY.addItem(
190
- '<?php echo $_item['code'] ?>',
191
- '<?php echo $_item['name'] ?>',
192
- '<?php echo $_item['image'] ?>',
193
- '<?php echo $_item['issuers'] ?>',
194
- '<?php echo $_item['active'] ?>',
195
- '<?php echo $_item['info'] ?>',
196
- null
197
- );
198
- <?php endif; ?>
199
- <?php endforeach; ?>
200
-
201
-
202
- var url = '<?php echo $this->_ajaxSavePaymentMethodURL ?>';
203
- var parameters = {};
204
-
205
- var icepayEditor = {
206
- overlayShowEffectOptions: null,
207
- overlayHideEffectOptions: null,
208
- open: function(editorUrl, elementId) {
209
- if (editorUrl && elementId) {
210
- new Ajax.Request(editorUrl, {
211
- parameters: {
212
- element_id: '', //elementId+'_editor',
213
- store_id: '0'
214
- },
215
- onSuccess: function(transport) {
216
- try {
217
- this.openDialogWindow(transport.responseText, elementId);
218
- } catch (e) {
219
- alert(e.message);
220
- }
221
- }.bind(this)
222
- });
223
- }
224
- },
225
- openDialogWindow: function(content, elementId) {
226
- this.overlayShowEffectOptions = Windows.overlayShowEffectOptions;
227
- this.overlayHideEffectOptions = Windows.overlayHideEffectOptions;
228
- Windows.overlayShowEffectOptions = {duration: 0};
229
- Windows.overlayHideEffectOptions = {duration: 0};
230
-
231
- Dialog.confirm(content, {
232
- draggable: true,
233
- resizable: true,
234
- closable: true,
235
- className: "magento",
236
- windowClassName: "popup-window",
237
- title: '<?php echo $this->__('ICEPAY paymentmethod configuration'); ?>',
238
- width: 750,
239
- height: 555,
240
- zIndex: 1000,
241
- recenterAuto: false,
242
- hideEffect: Element.hide,
243
- showEffect: Element.show,
244
- id: "catalog-wysiwyg-editor",
245
- buttonClass: "form-button",
246
- okLabel: "<?php echo $this->__('Save settings'); ?>",
247
- cancelLabel: "<?php echo $this->__('Cancel'); ?>",
248
- ok: this.saveDialogWindow.bind(this),
249
- cancel: this.closeDialogWindow.bind(this),
250
- onClose: this.closeDialogWindow.bind(this),
251
- firedElementId: elementId
252
- });
253
-
254
- content.evalScripts.bind(content).defer();
255
-
256
- },
257
- saveDialogWindow: function(dialogWindow) {
258
-
259
- var parameters = $('icepay_paymentmethod').serialize(true);
260
- parameters.active_issuers = $('iceadvanced_generic_issuers').getValue().join(',');
261
- parameters.specificcountry = $('iceadvanced_generic_specificcountry').getValue().join(',');
262
- dialogWindow.hide();
263
-
264
- new Ajax.Request(url, {
265
- parameters: parameters,
266
- onComplete: function(response) {
267
- if (response.status == 200) {
268
-
269
- }
270
- },
271
- onError: function(response) {
272
- alert("error");
273
- },
274
- onSuccess: function(transport) {
275
- alert(transport.responseText);
276
- }
277
-
278
- });
279
- this.closeDialogWindow(dialogWindow);
280
-
281
- },
282
- okDialogWindow: function(dialogWindow) {
283
- if (dialogWindow.options.firedElementId) {
284
- wysiwygObj = eval('wysiwyg' + dialogWindow.options.firedElementId + '_editor');
285
- wysiwygObj.turnOff();
286
- if (tinyMCE.get(wysiwygObj.id)) {
287
- $(dialogWindow.options.firedElementId).value = tinyMCE.get(wysiwygObj.id).getContent();
288
- } else {
289
- if ($(dialogWindow.options.firedElementId + '_editor')) {
290
- $(dialogWindow.options.firedElementId).value = $(dialogWindow.options.firedElementId + '_editor').value;
291
- }
292
- }
293
- }
294
- this.closeDialogWindow(dialogWindow);
295
- },
296
- closeDialogWindow: function(dialogWindow) {
297
- dialogWindow.close();
298
- Windows.overlayShowEffectOptions = this.overlayShowEffectOptions;
299
- Windows.overlayHideEffectOptions = this.overlayHideEffectOptions;
300
- }
301
- };
302
-
303
- //]]>
304
- </script>
305
  </td></tr>
1
+ <?php $_htmlId = $this->getElement()->getHtmlId() ?>
2
+ <?php $_htmlClass = $this->getElement()->getClass() ?>
3
+ <?php $_htmlName = $this->getElement()->getName() ?>
4
+
5
+ <tr>
6
+
7
+ <td colspan="11" class="grid tier">
8
+ <input id="ice_webservice" type="hidden" name="groups[iceadvanced][fields][webservice_data][value]" value="0"/>
9
+ <table cellspacing="0" class="data border" id="modules_table" style="width:600px">
10
+ <col width="100" />
11
+ <col width="120" />
12
+ <col width="70" />
13
+ <col width="190" />
14
+ <col width="120" />
15
+ <thead>
16
+ <tr class="headings">
17
+ <th><?php echo Mage::helper('iceadvanced')->__('Paymentmethod') ?></th>
18
+ <th><?php echo Mage::helper('iceadvanced')->__('Title') ?></th>
19
+ <th><?php echo Mage::helper('iceadvanced')->__('# Issuers') ?></th>
20
+ <th><?php echo Mage::helper('iceadvanced')->__('Settings') ?></th>
21
+ <th><?php echo Mage::helper('iceadvanced')->__('Active') ?></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody id="<?php echo $_htmlId ?>_container"></tbody>
25
+ <tfoot>
26
+ <tr>
27
+ <td colspan="5" class="a-right"><?php echo $this->getAddButtonHtml() ?></td>
28
+ </tr>
29
+ </tfoot>
30
+ </table>
31
+
32
+
33
+
34
+ <script type="text/javascript" src="<?php echo $this->getJS('tiny_mce/tiny_mce.js'); ?>"></script>
35
+ <script type="text/javascript">
36
+ //<![CDATA[
37
+
38
+ var ICEPAYPaymentMethodRowTemplate = '<tr id="icepay_{{index}}">'
39
+ + '<td>{{pm_img}}</td>'
40
+ + '<td><input class=" required-entry validate-length minimum-length-5 maximum-length-32 input-text" type="text" name="groups[{{module_namespace}}][fields][{{pm_key}}title][value]" value="{{pm_title}}" id="icepay_module_row_{{index}}_serial" style="width:93px;"/></td>'
41
+ + '<td>{{pm_issuers}}</td>'
42
+ + '<td><button type="button" class="scalable " onclick="icepayEditor.open(\'<?php echo $this->_ajaxLoadPaymentMethodURL ?>\', \'icepay_module_row_{{index}}_serial\')" style=""><span><?php echo $this->__('Configure') ?></span></button></td>'
43
+ + '<td><select class="<?php echo $_htmlClass ?>" name="groups[{{module_namespace}}][fields][{{pm_key}}active][value]" id="icepay_pm_row_{{index}}_enabled" {{module_active_switch}}>'
44
+ + '<option value="1"><?php echo Mage::helper("icecore")->__("Enabled") ?></option>'
45
+ + '<option value="0"><?php echo Mage::helper("icecore")->__("Disabled") ?></option>'
46
+ + '</select></td>'
47
+ + '</tr>';
48
+
49
+ var ICEPAYRetrievedPaymentMethodRowTemplate = '<tr id="icepay_{{index}}">'
50
+ + '<input type="hidden" name="groups[{{module_namespace}}][fields][{{pm_key}}_][value]" id="icepay_pm_row_{{index}}_issuerdata" value="{{pm_issuerdata}}"/>'
51
+ + '<input type="hidden" name="groups[{{module_namespace}}][fields][{{pm_key}}issuer][value]" id="icepay_pm_row_{{index}}_issuerdata" value="{{pm_issuerdata}}"/>'
52
+ + '<td>{{pm_img}}</td>'
53
+ + '<td><input class=" required-entry validate-length minimum-length-5 maximum-length-32 input-text" type="text" name="groups[{{module_namespace}}][fields][{{pm_key}}title][value]" value="{{pm_title}}" id="icepay_module_row_{{index}}_serial" style="width:93px;"/></td>'
54
+ + '<td>{{pm_issuers}}</td>'
55
+ + '<td><?php echo $this->__("Save Config to configure") ?></td>'
56
+ + '<td><select class="<?php echo $_htmlClass ?>" name="groups[{{module_namespace}}][fields][{{pm_key}}active][value]" id="icepay_pm_row_{{index}}_enabled" {{module_active_switch}}>'
57
+ + '<option value="1"><?php echo Mage::helper("icecore")->__("Enabled") ?></option>'
58
+ + '<option value="0"><?php echo Mage::helper("icecore")->__("Disabled") ?></option>'
59
+ + '</select></td>'
60
+ //+ '<input type="hidden" name="groups[{{module_namespace}}][fields][{{pm_key}}code][value]" value="{{pm_code}}"/>'
61
+ + '</tr>';
62
+
63
+ var ICEPAYSettingsTemplate = '<p id="{{msg_id}}" class="{{type}}">{{msg}}</p>';
64
+
65
+
66
+ var ICEPAY = {
67
+ template: new Template(ICEPAYPaymentMethodRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
68
+ ajaxTemplate: new Template(ICEPAYRetrievedPaymentMethodRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
69
+ msgTemplate: new Template(ICEPAYSettingsTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
70
+ itemsCount: 0,
71
+ msgCount: 0,
72
+ addItem: function() {
73
+ var data = {
74
+ pm_code: '',
75
+ pm_title: '',
76
+ pm_active: '',
77
+ pm_key: '',
78
+ pm_info: '',
79
+ pm_img: '',
80
+ pm_issuers: '',
81
+ pm_issuerdata: '',
82
+ pm_issuerimage: '',
83
+ module_namespace: '',
84
+ module_template: '',
85
+ index: this.itemsCount++
86
+ };
87
+
88
+ data.pm_code = arguments[0];
89
+ data.pm_title = arguments[1];
90
+ data.pm_img = arguments[2];
91
+ data.pm_issuers = arguments[3];
92
+ data.pm_active = arguments[4];
93
+ data.pm_info = arguments[5];
94
+ data.pm_issuerdata = arguments[6];
95
+ data.module_template = (arguments[7]) ? 1 : 0;
96
+
97
+ data.pm_key = 'pm_' + arguments[0].toLowerCase() + '_';
98
+ data.module_namespace = 'paymentmethod';
99
+
100
+ Element.insert($('<?php echo $_htmlId ?>_container'), {
101
+ bottom: (data.pm_issuerdata) ? this.ajaxTemplate.evaluate(data) : this.template.evaluate(data)
102
+ });
103
+
104
+ $('icepay_pm_row_' + data.index + '_enabled').selectedIndex = (data.pm_active == "1") ? 0 : 1;
105
+ },
106
+ addMessage: function() {
107
+
108
+ var data = {
109
+ type: '',
110
+ msg: '',
111
+ msg_id: '',
112
+ index: this.msgCount++
113
+ };
114
+
115
+
116
+ data.type = arguments[0];
117
+ data.msg = arguments[1];
118
+ data.msg_id = "msg_id_" + data.index.toString();
119
+
120
+ Element.insert($('icepay_debugger'), {
121
+ bottom: this.msgTemplate.evaluate(data)
122
+ });
123
+
124
+ },
125
+ clearMessages: function() {
126
+ for (var i = 0; i < this.msgCount; i++) {
127
+ try {
128
+ Element.remove($('msg_id_' + i.toString()));
129
+ } catch (err) {
130
+ alert(err.toString());
131
+ }
132
+ }
133
+ this.msgCount = 0;
134
+ },
135
+ clearAll: function() {
136
+ for (var i = 0; i < this.itemsCount; i++) {
137
+ try {
138
+ Element.remove($('icepay_' + i));
139
+ } catch (err) {
140
+ }
141
+ }
142
+ this.itemsCount = 0;
143
+ },
144
+ retrieveFromICEPAY: function() {
145
+ var url = '<?php echo $this->_ajaxGetPaymentMethodsURL ?>';
146
+ var parameters = {};
147
+ new Ajax.Request(url, {
148
+ parameters: parameters,
149
+ onComplete: function(response) {
150
+ if (response.status === 200) {
151
+ var result = response.responseText.evalJSON();
152
+
153
+ if (result.msg) {
154
+ ICEPAY.clearMessages();
155
+ for (var i = 0; i < result.msg.length; i++)
156
+ ICEPAY.addMessage(result.msg[i].type, result.msg[i].msg);
157
+ }
158
+
159
+ if (result.paymentmethods) {
160
+ ICEPAY.clearAll();
161
+ $('ice_webservice').value = 1;
162
+
163
+ for (var i = 0; i < result.paymentmethods.length; i++) {
164
+ var issuers = (result.paymentmethods[i].Issuers.Issuer.length > 0) ? result.paymentmethods[i].Issuers.Issuer.length.toString() + " issuers" : "1 issuer";
165
+
166
+ ICEPAY.addItem(
167
+ result.paymentmethods[i].PaymentMethodCode,
168
+ result.paymentmethods[i].Description,
169
+ result.paymentmethods[i].Image,
170
+ issuers,
171
+ result.paymentmethods[i].ConfigActive,
172
+ result.paymentmethods[i].ConfigDescription,
173
+ result.issuers[i]["data"]);
174
+ }
175
+ }
176
+ }
177
+ },
178
+ onError: function(response) {
179
+
180
+ }
181
+ });
182
+ return true;
183
+ }
184
+ };
185
+
186
+
187
+ <?php foreach ($this->getPaymentmethods() as $_item): ?>
188
+ <?php if (intval($_item['issuers']) > 0): ?>
189
+ ICEPAY.addItem(
190
+ '<?php echo $_item['code'] ?>',
191
+ '<?php echo $_item['name'] ?>',
192
+ '<?php echo $_item['image'] ?>',
193
+ '<?php echo $_item['issuers'] ?>',
194
+ '<?php echo $_item['active'] ?>',
195
+ '<?php echo $_item['info'] ?>',
196
+ null
197
+ );
198
+ <?php endif; ?>
199
+ <?php endforeach; ?>
200
+
201
+
202
+ var url = '<?php echo $this->_ajaxSavePaymentMethodURL ?>';
203
+ var parameters = {};
204
+
205
+ var icepayEditor = {
206
+ overlayShowEffectOptions: null,
207
+ overlayHideEffectOptions: null,
208
+ open: function(editorUrl, elementId) {
209
+ if (editorUrl && elementId) {
210
+ new Ajax.Request(editorUrl, {
211
+ parameters: {
212
+ element_id: '', //elementId+'_editor',
213
+ store_id: '0'
214
+ },
215
+ onSuccess: function(transport) {
216
+ try {
217
+ this.openDialogWindow(transport.responseText, elementId);
218
+ } catch (e) {
219
+ alert(e.message);
220
+ }
221
+ }.bind(this)
222
+ });
223
+ }
224
+ },
225
+ openDialogWindow: function(content, elementId) {
226
+ this.overlayShowEffectOptions = Windows.overlayShowEffectOptions;
227
+ this.overlayHideEffectOptions = Windows.overlayHideEffectOptions;
228
+ Windows.overlayShowEffectOptions = {duration: 0};
229
+ Windows.overlayHideEffectOptions = {duration: 0};
230
+
231
+ Dialog.confirm(content, {
232
+ draggable: true,
233
+ resizable: true,
234
+ closable: true,
235
+ className: "magento",
236
+ windowClassName: "popup-window",
237
+ title: '<?php echo $this->__('ICEPAY paymentmethod configuration'); ?>',
238
+ width: 750,
239
+ height: 555,
240
+ zIndex: 1000,
241
+ recenterAuto: false,
242
+ hideEffect: Element.hide,
243
+ showEffect: Element.show,
244
+ id: "catalog-wysiwyg-editor",
245
+ buttonClass: "form-button",
246
+ okLabel: "<?php echo $this->__('Save settings'); ?>",
247
+ cancelLabel: "<?php echo $this->__('Cancel'); ?>",
248
+ ok: this.saveDialogWindow.bind(this),
249
+ cancel: this.closeDialogWindow.bind(this),
250
+ onClose: this.closeDialogWindow.bind(this),
251
+ firedElementId: elementId
252
+ });
253
+
254
+ content.evalScripts.bind(content).defer();
255
+
256
+ },
257
+ saveDialogWindow: function(dialogWindow) {
258
+
259
+ var parameters = $('icepay_paymentmethod').serialize(true);
260
+ parameters.active_issuers = $('iceadvanced_generic_issuers').getValue().join(',');
261
+ parameters.specificcountry = $('iceadvanced_generic_specificcountry').getValue().join(',');
262
+ dialogWindow.hide();
263
+
264
+ new Ajax.Request(url, {
265
+ parameters: parameters,
266
+ onComplete: function(response) {
267
+ if (response.status == 200) {
268
+
269
+ }
270
+ },
271
+ onError: function(response) {
272
+ alert("error");
273
+ },
274
+ onSuccess: function(transport) {
275
+ alert(transport.responseText);
276
+ }
277
+
278
+ });
279
+ this.closeDialogWindow(dialogWindow);
280
+
281
+ },
282
+ okDialogWindow: function(dialogWindow) {
283
+ if (dialogWindow.options.firedElementId) {
284
+ wysiwygObj = eval('wysiwyg' + dialogWindow.options.firedElementId + '_editor');
285
+ wysiwygObj.turnOff();
286
+ if (tinyMCE.get(wysiwygObj.id)) {
287
+ $(dialogWindow.options.firedElementId).value = tinyMCE.get(wysiwygObj.id).getContent();
288
+ } else {
289
+ if ($(dialogWindow.options.firedElementId + '_editor')) {
290
+ $(dialogWindow.options.firedElementId).value = $(dialogWindow.options.firedElementId + '_editor').value;
291
+ }
292
+ }
293
+ }
294
+ this.closeDialogWindow(dialogWindow);
295
+ },
296
+ closeDialogWindow: function(dialogWindow) {
297
+ dialogWindow.close();
298
+ Windows.overlayShowEffectOptions = this.overlayShowEffectOptions;
299
+ Windows.overlayHideEffectOptions = this.overlayHideEffectOptions;
300
+ }
301
+ };
302
+
303
+ //]]>
304
+ </script>
305
  </td></tr>
app/design/adminhtml/default/default/template/icepayadvanced/paymentmethod.phtml CHANGED
@@ -1,85 +1,85 @@
1
-
2
- <form id="icepay_paymentmethod" name="icepay_paymentmethod" >
3
-
4
- <input type="hidden" name="reference" value="<?php echo $this->getViewData()->module ?>"/>
5
- <input type="hidden" name="name" value="<?php echo $this->getViewData()->config['title'] ?>"/>
6
- <input type="hidden" name="store" value="<?php echo $this->scopeID ?>"/>
7
-
8
- <table class="form-list" cellspacing="0"><colgroup class="label"></colgroup><colgroup class="value"></colgroup><colgroup class="scope-label"></colgroup><colgroup class=""></colgroup><tbody>
9
-
10
- <tr id="row_iceadvanced_generic_min_order_total">
11
- <td class="label"><label for="iceadvanced_generic_min_order_total"><?php echo($this->__("Settings for")); ?></label></td>
12
- <td class="value"><?php echo $this->getViewData()->config['title'] ?></td>
13
- </tr>
14
- <tr id="row_iceadvanced_generic_checkout_descr">
15
- <td class="label"><label for="iceadvanced_generic_checkout_descr"><?php echo($this->__("Description in checkout")); ?></label></td>
16
- <td class="value"><textarea id="iceadvanced_generic_checkout_descr" name="description" rows="2" cols="4" style="width:300px;height:40px"><?php echo $this->getViewData()->config['description'] ?></textarea>
17
- <p class="note"><span><?php echo($this->__("Description displayed in checkout")); ?></span></p>
18
- </td>
19
- </tr>
20
- <tr>
21
- <td class="label"><label><?php echo($this->__("Issuers")); ?></label></td>
22
- <td class="value"><select id="iceadvanced_generic_issuers" name="active_issuers" class=" select multiselect" size="9" multiple="multiple" <?php if (count($this->getViewData()->issuers) == 1) echo('disabled="disabled"'); ?>>
23
- <?php
24
- foreach ($this->getViewData()->issuers as $key => $value) {
25
- $selected = (strstr($this->getViewData()->config['active_issuers'], $value['issuer_code'])) ? "selected" : "";
26
- echo("<option value=\"{$value['issuer_code']}\" {$selected}>{$value['issuer_name']}</option>");
27
- }
28
- ?>
29
- </select>
30
- <p class="note"><span><?php echo($this->__("Use CTRL to activate/deactivate specific issuers")); ?></span></p>
31
- </td>
32
- </tr>
33
- <tr id="row_iceadvanced_generic_allowspecific">
34
- <td class="label"><label for="iceadvanced_generic_allowspecific"> <?php echo($this->__("Payment from Applicable Countries")); ?></label></td>
35
- <td class="value">
36
- <select id="iceadvanced_generic_allowspecific" name="allowspecific" class=" select">
37
- <option value="0" <?php if ($this->getViewData()->config['allowspecific'] != 1) echo('selected="selected"') ?>><?php echo($this->__("All Allowed Countries")); ?></option>
38
- <option value="1" <?php if ($this->getViewData()->config['allowspecific'] == 1) echo('selected="selected"') ?>><?php echo($this->__("Specific Countries")); ?></option>
39
- </select>
40
- <script type="text/javascript">
41
- checkDisplay();
42
- function checkDisplay() {
43
- specific = $('iceadvanced_generic_allowspecific').value;
44
- if (!specific || specific != 1) {
45
- $('row_iceadvanced_generic_specificcountry').hide();
46
- } else {
47
- $('row_iceadvanced_generic_specificcountry').show();
48
- }
49
- ;
50
- }
51
- ;
52
- Event.observe('iceadvanced_generic_allowspecific', 'change', function() {
53
- checkDisplay();
54
- });
55
- </script>
56
- </td>
57
- </tr>
58
- <tr id="row_iceadvanced_generic_specificcountry">
59
- <td class="label"><label for="iceadvanced_generic_specificcountry"> <?php echo($this->__("Payment from Specific Countries")); ?></label></td>
60
- <td class="value"><input name="groups[generic][fields][specificcountry][value]" value="" type="hidden">
61
- <select id="iceadvanced_generic_specificcountry" name="specificcountry" class=" select multiselect" size="10" multiple="multiple">
62
- <?php
63
- foreach ($this->getViewData()->countryCollection as $country) {
64
- $selected = (strstr($this->getViewData()->config['specificcountry'], $country['value'])) ? "selected" : "";
65
- echo("<option value=\"{$country['value']}\" {$selected}>{$country['label']}</option>");
66
- }
67
- ?>
68
- </select>
69
- <p class="note"><span><?php echo($this->__("Use CTRL to select specific countries")); ?></span></p>
70
- </td>
71
- </tr>
72
- <tr id="row_iceadvanced_generic_min_order_total">
73
- <td class="label"><label for="iceadvanced_generic_min_order_total"> <?php echo($this->__("Minimum Order Total")); ?></label></td>
74
- <td class="value"><input id="iceadvanced_generic_min_order_total" name="min_order_total" value="<?php echo $this->getViewData()->config['min_order_total'] ?>" class=" input-text" type="text"></td>
75
- </tr>
76
- <tr id="row_iceadvanced_generic_max_order_total">
77
- <td class="label"><label for="iceadvanced_generic_max_order_total"> <?php echo($this->__("Maximum Order Total")); ?></label></td>
78
- <td class="value"><input id="iceadvanced_generic_max_order_total" name="max_order_total" value="<?php echo $this->getViewData()->config['max_order_total'] ?>" class=" input-text" type="text"></td>
79
- </tr>
80
- <tr id="row_iceadvanced_generic_sort_order">
81
- <td class="label"><label for="iceadvanced_generic_sort_order"> <?php echo($this->__("Sort order")); ?></label></td>
82
- <td class="value"><input id="iceadvanced_generic_sort_order" name="sort_order" value="<?php echo $this->getViewData()->config['sort_order'] ?>" class=" input-text" type="text"></td>
83
- </tr>
84
- </tbody></table>
85
  </form>
1
+
2
+ <form id="icepay_paymentmethod" name="icepay_paymentmethod" >
3
+
4
+ <input type="hidden" name="reference" value="<?php echo $this->getViewData()->module ?>"/>
5
+ <input type="hidden" name="name" value="<?php echo $this->getViewData()->config['title'] ?>"/>
6
+ <input type="hidden" name="store" value="<?php echo $this->scopeID ?>"/>
7
+
8
+ <table class="form-list" cellspacing="0"><colgroup class="label"></colgroup><colgroup class="value"></colgroup><colgroup class="scope-label"></colgroup><colgroup class=""></colgroup><tbody>
9
+
10
+ <tr id="row_iceadvanced_generic_min_order_total">
11
+ <td class="label"><label for="iceadvanced_generic_min_order_total"><?php echo($this->__("Settings for")); ?></label></td>
12
+ <td class="value"><?php echo $this->getViewData()->config['title'] ?></td>
13
+ </tr>
14
+ <tr id="row_iceadvanced_generic_checkout_descr">
15
+ <td class="label"><label for="iceadvanced_generic_checkout_descr"><?php echo($this->__("Description in checkout")); ?></label></td>
16
+ <td class="value"><textarea id="iceadvanced_generic_checkout_descr" name="description" rows="2" cols="4" style="width:300px;height:40px"><?php echo $this->getViewData()->config['description'] ?></textarea>
17
+ <p class="note"><span><?php echo($this->__("Description displayed in checkout")); ?></span></p>
18
+ </td>
19
+ </tr>
20
+ <tr>
21
+ <td class="label"><label><?php echo($this->__("Issuers")); ?></label></td>
22
+ <td class="value"><select id="iceadvanced_generic_issuers" name="active_issuers" class=" select multiselect" size="9" multiple="multiple" <?php if (count($this->getViewData()->issuers) == 1) echo('disabled="disabled"'); ?>>
23
+ <?php
24
+ foreach ($this->getViewData()->issuers as $key => $value) {
25
+ $selected = (strstr($this->getViewData()->config['active_issuers'], $value['issuer_code'])) ? "selected" : "";
26
+ echo("<option value=\"{$value['issuer_code']}\" {$selected}>{$value['issuer_name']}</option>");
27
+ }
28
+ ?>
29
+ </select>
30
+ <p class="note"><span><?php echo($this->__("Use CTRL to activate/deactivate specific issuers")); ?></span></p>
31
+ </td>
32
+ </tr>
33
+ <tr id="row_iceadvanced_generic_allowspecific">
34
+ <td class="label"><label for="iceadvanced_generic_allowspecific"> <?php echo($this->__("Payment from Applicable Countries")); ?></label></td>
35
+ <td class="value">
36
+ <select id="iceadvanced_generic_allowspecific" name="allowspecific" class=" select">
37
+ <option value="0" <?php if ($this->getViewData()->config['allowspecific'] != 1) echo('selected="selected"') ?>><?php echo($this->__("All Allowed Countries")); ?></option>
38
+ <option value="1" <?php if ($this->getViewData()->config['allowspecific'] == 1) echo('selected="selected"') ?>><?php echo($this->__("Specific Countries")); ?></option>
39
+ </select>
40
+ <script type="text/javascript">
41
+ checkDisplay();
42
+ function checkDisplay() {
43
+ specific = $('iceadvanced_generic_allowspecific').value;
44
+ if (!specific || specific != 1) {
45
+ $('row_iceadvanced_generic_specificcountry').hide();
46
+ } else {
47
+ $('row_iceadvanced_generic_specificcountry').show();
48
+ }
49
+ ;
50
+ }
51
+ ;
52
+ Event.observe('iceadvanced_generic_allowspecific', 'change', function() {
53
+ checkDisplay();
54
+ });
55
+ </script>
56
+ </td>
57
+ </tr>
58
+ <tr id="row_iceadvanced_generic_specificcountry">
59
+ <td class="label"><label for="iceadvanced_generic_specificcountry"> <?php echo($this->__("Payment from Specific Countries")); ?></label></td>
60
+ <td class="value"><input name="groups[generic][fields][specificcountry][value]" value="" type="hidden">
61
+ <select id="iceadvanced_generic_specificcountry" name="specificcountry" class=" select multiselect" size="10" multiple="multiple">
62
+ <?php
63
+ foreach ($this->getViewData()->countryCollection as $country) {
64
+ $selected = (strstr($this->getViewData()->config['specificcountry'], $country['value'])) ? "selected" : "";
65
+ echo("<option value=\"{$country['value']}\" {$selected}>{$country['label']}</option>");
66
+ }
67
+ ?>
68
+ </select>
69
+ <p class="note"><span><?php echo($this->__("Use CTRL to select specific countries")); ?></span></p>
70
+ </td>
71
+ </tr>
72
+ <tr id="row_iceadvanced_generic_min_order_total">
73
+ <td class="label"><label for="iceadvanced_generic_min_order_total"> <?php echo($this->__("Minimum Order Total")); ?></label></td>
74
+ <td class="value"><input id="iceadvanced_generic_min_order_total" name="min_order_total" value="<?php echo $this->getViewData()->config['min_order_total'] ?>" class=" input-text" type="text"></td>
75
+ </tr>
76
+ <tr id="row_iceadvanced_generic_max_order_total">
77
+ <td class="label"><label for="iceadvanced_generic_max_order_total"> <?php echo($this->__("Maximum Order Total")); ?></label></td>
78
+ <td class="value"><input id="iceadvanced_generic_max_order_total" name="max_order_total" value="<?php echo $this->getViewData()->config['max_order_total'] ?>" class=" input-text" type="text"></td>
79
+ </tr>
80
+ <tr id="row_iceadvanced_generic_sort_order">
81
+ <td class="label"><label for="iceadvanced_generic_sort_order"> <?php echo($this->__("Sort order")); ?></label></td>
82
+ <td class="value"><input id="iceadvanced_generic_sort_order" name="sort_order" value="<?php echo $this->getViewData()->config['sort_order'] ?>" class=" input-text" type="text"></td>
83
+ </tr>
84
+ </tbody></table>
85
  </form>
app/design/adminhtml/default/default/template/icepaycore/grid_modules.phtml CHANGED
@@ -1,80 +1,80 @@
1
- <?php $_htmlId = $this->getElement()->getHtmlId() ?>
2
- <?php $_htmlClass = $this->getElement()->getClass() ?>
3
- <?php $_htmlName = $this->getElement()->getName() ?>
4
-
5
- <tr>
6
- <td colspan="11" class="grid tier">
7
- <table cellspacing="0" class="data border" id="modules_table" style="width:600px">
8
- <col width="90" />
9
- <col width="40" />
10
- <col width="120" />
11
- <col width="90" />
12
- <col width="120" />
13
- <thead>
14
- <tr class="headings">
15
- <th><?php echo Mage::helper('icecore')->__('Module') ?></th>
16
- <th><?php echo Mage::helper('icecore')->__('Version') ?></th>
17
- <th><?php echo Mage::helper('icecore')->__('Compatibility') ?></th>
18
- <th><?php echo Mage::helper('icecore')->__('Active') ?></th>
19
- </tr>
20
- </thead>
21
- <tbody id="<?php echo $_htmlId ?>_container"></tbody>
22
- </table>
23
-
24
- <script type="text/javascript">
25
- //<![CDATA[
26
- var ICEPAYModuleRowTemplate = '<tr>'
27
- + '<td>'
28
- + '{{module_name}}</td>'
29
- + '<td>{{module_version}}</td>'
30
- + '<td class="{{module_compatible}}">{{module_compatibility}}</td>'
31
- + '<td><select class="<?php echo $_htmlClass ?>" name="groups[{{module_namespace}}][fields][active][value]" id="icepay_module_row_{{index}}_enabled" {{module_active_switch}}>'
32
- + '<option value="1"><?php echo Mage::helper("icecore")->__("Enabled") ?></option>'
33
- + '<option value="0"><?php echo Mage::helper("icecore")->__("Disabled") ?></option>'
34
- + '</select></td>'
35
- + '</tr>';
36
-
37
-
38
- var ICEPAYControl = {
39
- template: new Template(ICEPAYModuleRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
40
- itemsCount: 0,
41
- addItem: function() {
42
-
43
- var data = {
44
- module_name: '',
45
- module_version: '',
46
- module_compatibility: '',
47
- module_active: '',
48
- module_serial: '',
49
- module_compatible: '',
50
- module_serialreq: '',
51
- module_namespace: '',
52
- module_active_switch: '',
53
- index: this.itemsCount++
54
- };
55
-
56
- data.module_name = arguments[0];
57
- data.module_version = arguments[1];
58
- data.module_compatibility = arguments[2];
59
- data.module_active = arguments[3];
60
- data.module_serial = arguments[4];
61
- data.module_compatible = arguments[5];
62
- data.module_serialreq = arguments[6];
63
- data.module_namespace = arguments[7];
64
- data.module_active_switch = (data.module_namespace == "icecore") ? "disabled" : "";
65
-
66
- Element.insert($('<?php echo $_htmlId ?>_container'), {
67
- bottom: this.template.evaluate(data)
68
- });
69
-
70
- $('icepay_module_row_' + data.index + '_enabled').selectedIndex = (data.module_active == "1") ? 0 : 1;
71
-
72
-
73
- },
74
- };
75
- <?php foreach ($this->getModules() as $_item): ?>
76
- ICEPAYControl.addItem('<?php echo $_item['name'] ?>', '<?php echo $_item['version'] ?>', '<?php echo $_item['compatible'] ?>', '<?php echo $_item['active'] ?>', '<?php echo (($_item['serialreq'] == 0) ? "N/A" : $_item['serial']) ?>', '<?php echo ((Mage::helper("icecore")->isCompatible($_item['compatibleFrom'], $_item['compatibleTo'])) ? "" : "icemodule_incompatible") ?>', '<?php echo (($_item['serialreq'] == 0) ? "disabled" : "") ?>', '<?php echo ($_item['namespace']) ?>');
77
- <?php endforeach; ?>
78
- //]]>
79
- </script>
80
  </td></tr>
1
+ <?php $_htmlId = $this->getElement()->getHtmlId() ?>
2
+ <?php $_htmlClass = $this->getElement()->getClass() ?>
3
+ <?php $_htmlName = $this->getElement()->getName() ?>
4
+
5
+ <tr>
6
+ <td colspan="11" class="grid tier">
7
+ <table cellspacing="0" class="data border" id="modules_table" style="width:600px">
8
+ <col width="90" />
9
+ <col width="40" />
10
+ <col width="120" />
11
+ <col width="90" />
12
+ <col width="120" />
13
+ <thead>
14
+ <tr class="headings">
15
+ <th><?php echo Mage::helper('icecore')->__('Module') ?></th>
16
+ <th><?php echo Mage::helper('icecore')->__('Version') ?></th>
17
+ <th><?php echo Mage::helper('icecore')->__('Compatibility') ?></th>
18
+ <th><?php echo Mage::helper('icecore')->__('Active') ?></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody id="<?php echo $_htmlId ?>_container"></tbody>
22
+ </table>
23
+
24
+ <script type="text/javascript">
25
+ //<![CDATA[
26
+ var ICEPAYModuleRowTemplate = '<tr>'
27
+ + '<td>'
28
+ + '{{module_name}}</td>'
29
+ + '<td>{{module_version}}</td>'
30
+ + '<td class="{{module_compatible}}">{{module_compatibility}}</td>'
31
+ + '<td><select class="<?php echo $_htmlClass ?>" name="groups[{{module_namespace}}][fields][active][value]" id="icepay_module_row_{{index}}_enabled" {{module_active_switch}}>'
32
+ + '<option value="1"><?php echo Mage::helper("icecore")->__("Enabled") ?></option>'
33
+ + '<option value="0"><?php echo Mage::helper("icecore")->__("Disabled") ?></option>'
34
+ + '</select></td>'
35
+ + '</tr>';
36
+
37
+
38
+ var ICEPAYControl = {
39
+ template: new Template(ICEPAYModuleRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
40
+ itemsCount: 0,
41
+ addItem: function() {
42
+
43
+ var data = {
44
+ module_name: '',
45
+ module_version: '',
46
+ module_compatibility: '',
47
+ module_active: '',
48
+ module_serial: '',
49
+ module_compatible: '',
50
+ module_serialreq: '',
51
+ module_namespace: '',
52
+ module_active_switch: '',
53
+ index: this.itemsCount++
54
+ };
55
+
56
+ data.module_name = arguments[0];
57
+ data.module_version = arguments[1];
58
+ data.module_compatibility = arguments[2];
59
+ data.module_active = arguments[3];
60
+ data.module_serial = arguments[4];
61
+ data.module_compatible = arguments[5];
62
+ data.module_serialreq = arguments[6];
63
+ data.module_namespace = arguments[7];
64
+ data.module_active_switch = (data.module_namespace == "icecore") ? "disabled" : "";
65
+
66
+ Element.insert($('<?php echo $_htmlId ?>_container'), {
67
+ bottom: this.template.evaluate(data)
68
+ });
69
+
70
+ $('icepay_module_row_' + data.index + '_enabled').selectedIndex = (data.module_active == "1") ? 0 : 1;
71
+
72
+
73
+ },
74
+ };
75
+ <?php foreach ($this->getModules() as $_item): ?>
76
+ ICEPAYControl.addItem('<?php echo $_item['name'] ?>', '<?php echo $_item['version'] ?>', '<?php echo $_item['compatible'] ?>', '<?php echo $_item['active'] ?>', '<?php echo (($_item['serialreq'] == 0) ? "N/A" : $_item['serial']) ?>', '<?php echo ((Mage::helper("icecore")->isCompatible($_item['compatibleFrom'], $_item['compatibleTo'])) ? "" : "icemodule_incompatible") ?>', '<?php echo (($_item['serialreq'] == 0) ? "disabled" : "") ?>', '<?php echo ($_item['namespace']) ?>');
77
+ <?php endforeach; ?>
78
+ //]]>
79
+ </script>
80
  </td></tr>
app/design/frontend/base/default/layout/icecore.xml CHANGED
@@ -1,10 +1,10 @@
1
- <?xml version="1.0"?>
2
-
3
-
4
- <layout>
5
- <icepay_about_index>
6
- <reference name="content">
7
- <block type="icecore/front_statement" name="icecore_statement" ></block>
8
- </reference>
9
- </icepay_about_index>
10
  </layout>
1
+ <?xml version="1.0"?>
2
+
3
+
4
+ <layout>
5
+ <icepay_about_index>
6
+ <reference name="content">
7
+ <block type="icecore/front_statement" name="icecore_statement" ></block>
8
+ </reference>
9
+ </icepay_about_index>
10
  </layout>
app/design/frontend/base/default/template/icepayadvanced/form/default.phtml CHANGED
@@ -1,52 +1,52 @@
1
- <?php
2
-
3
- $_code = $this->getMethodCode();
4
-
5
- ?>
6
-
7
- <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none">
8
-
9
- <input type="hidden" name="payment[<?php echo $_code ?>_paymentmethod]" value="<?php echo $this->getPMCode() ?>">
10
-
11
- <?php if($this->getPMCode()): ?>
12
- <li>
13
- <label for="<?php echo $_code ?>_image"><?php
14
- Mage::helper("icecore")->imageDir = "frontend/base/default/images/icepay/";
15
- Mage::helper("icecore")->imageExtension = "png";
16
- echo Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($this->getPMCode()));
17
- ?></label>
18
- </li>
19
- <?php endif; ?>
20
-
21
- <?php if($this->getTitle()): ?>
22
- <li>
23
- <label for="<?php echo $_code ?>_title"><?php echo $this->getTitle() ?></label>
24
- </li>
25
- <?php endif; ?>
26
-
27
- <?php if($this->getDescription()): ?>
28
- <li>
29
- <label for="<?php echo $_code ?>_info"><?php echo $this->getDescription() ?></label>
30
- </li>
31
- <?php endif; ?>
32
-
33
- <?php if($this->_issuer): ?>
34
- <?php if(count($this->_issuer) > 1): ?>
35
- <li>
36
- <label for="<?php echo $_code ?>_icepay_issuer" class="required"><em>*</em><?php echo $this->__('Please select an issuer') ?></label>
37
- <div class="input-box">
38
- <select id="<?php echo $_code ?>_icepay_issuer" name="payment[<?php echo $_code ?>_issuer]" class="required-entry validate-alpha">
39
- <option value="" selected><?php echo $this->__('--Please Select--')?></option>
40
- <?php
41
- foreach($this->_issuer as $issuer){
42
- echo('<option value="'.$issuer['value'].'">'.$this->__($issuer['label']).'</option>');
43
- };
44
- ?>
45
- </select>
46
- </div>
47
- </li>
48
- <?php else: ?>
49
- <input type="hidden" name="payment[<?php echo $_code ?>_issuer]" value="<?php echo $this->_issuer[0]['value'] ?>">
50
- <?php endif; ?>
51
- <?php endif; ?>
52
- </ul>
1
+ <?php
2
+
3
+ $_code = $this->getMethodCode();
4
+
5
+ ?>
6
+
7
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none">
8
+
9
+ <input type="hidden" name="payment[<?php echo $_code ?>_paymentmethod]" value="<?php echo $this->getPMCode() ?>">
10
+
11
+ <?php if($this->getPMCode()): ?>
12
+ <li>
13
+ <label for="<?php echo $_code ?>_image"><?php
14
+ Mage::helper("icecore")->imageDir = "frontend/base/default/images/icepay/";
15
+ Mage::helper("icecore")->imageExtension = "png";
16
+ echo Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($this->getPMCode()));
17
+ ?></label>
18
+ </li>
19
+ <?php endif; ?>
20
+
21
+ <?php if($this->getTitle()): ?>
22
+ <li>
23
+ <label for="<?php echo $_code ?>_title"><?php echo $this->getTitle() ?></label>
24
+ </li>
25
+ <?php endif; ?>
26
+
27
+ <?php if($this->getDescription()): ?>
28
+ <li>
29
+ <label for="<?php echo $_code ?>_info"><?php echo $this->getDescription() ?></label>
30
+ </li>
31
+ <?php endif; ?>
32
+
33
+ <?php if($this->_issuer): ?>
34
+ <?php if(count($this->_issuer) > 1): ?>
35
+ <li>
36
+ <label for="<?php echo $_code ?>_icepay_issuer" class="required"><em>*</em><?php echo $this->__('Please select an issuer') ?></label>
37
+ <div class="input-box">
38
+ <select id="<?php echo $_code ?>_icepay_issuer" name="payment[<?php echo $_code ?>_issuer]" class="required-entry validate-alpha">
39
+ <option value="" selected><?php echo $this->__('--Please Select--')?></option>
40
+ <?php
41
+ foreach($this->_issuer as $issuer){
42
+ echo('<option value="'.$issuer['value'].'">'.$this->__($issuer['label']).'</option>');
43
+ };
44
+ ?>
45
+ </select>
46
+ </div>
47
+ </li>
48
+ <?php else: ?>
49
+ <input type="hidden" name="payment[<?php echo $_code ?>_issuer]" value="<?php echo $this->_issuer[0]['value'] ?>">
50
+ <?php endif; ?>
51
+ <?php endif; ?>
52
+ </ul>
app/design/frontend/base/default/template/icepaycore/front/check.phtml ADDED
@@ -0,0 +1 @@
 
1
+ The ICEPAY [<?php echo(Mage::helper("iceadvanced")->title);?>] template is accessible.
app/design/frontend/base/default/template/icepaycore/front/statement.phtml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <p><img src="<?php echo($this->getSkinUrl('images/icepay/icepay-logo.png')); ?>"></p>
3
+
4
+ <div id="icepay_statement" style="background-color: #FFF; padding:16px;border-radius: 4px; -moz-border-radius: 4px;-webkit-border-radius: 4px;">
5
+
6
+ <p><?php echo Mage::helper("icecore")->__("icepay_about_line1"); ?></p>
7
+ <p><?php echo Mage::helper("icecore")->__("icepay_about_line2"); ?></p>
8
+ <p><?php echo Mage::helper("icecore")->__("icepay_about_line3"); ?></p>
9
+ <ul>
10
+ <li style="list-style:none; padding-left: 80px; min-height: 75px; background:url(<?php echo($this->getSkinUrl('images/icepay/logo-currence.png'))?>) no-repeat">
11
+ <p><?php echo Mage::helper("icecore")->__("icepay_about_currence"); ?></p>
12
+ </li>
13
+ <li style="list-style:none; padding-left: 80px; min-height: 75px; background:url(<?php echo($this->getSkinUrl('images/icepay/logo-thawte.png'))?>) no-repeat">
14
+ <p><?php echo Mage::helper("icecore")->__("icepay_about_thawte"); ?></p>
15
+ </li>
16
+ <li style="list-style:none; padding-left: 80px; min-height: 75px; background:url(<?php echo($this->getSkinUrl('images/icepay/logo-thuiswinkel.png'))?>) no-repeat">
17
+ <p><?php echo Mage::helper("icecore")->__("icepay_about_thuiswinkel"); ?></p>
18
+ </li>
19
+ </ul>
20
+ <p><?php echo Mage::helper("icecore")->__("icepay_about_link"); ?></p>
21
+ </div>
app/etc/modules/Icepay_IceAdvanced.xml CHANGED
@@ -1,10 +1,10 @@
1
- <?xml version="1.0"?>
2
-
3
- <config>
4
- <modules>
5
- <Icepay_IceAdvanced>
6
- <active>true</active>
7
- <codePool>community</codePool>
8
- </Icepay_IceAdvanced>
9
- </modules>
10
  </config>
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Icepay_IceAdvanced>
6
+ <active>true</active>
7
+ <codePool>community</codePool>
8
+ </Icepay_IceAdvanced>
9
+ </modules>
10
  </config>
app/etc/modules/Icepay_IceCore.xml CHANGED
@@ -1,10 +1,10 @@
1
- <?xml version="1.0"?>
2
-
3
- <config>
4
- <modules>
5
- <Icepay_IceCore>
6
- <active>true</active>
7
- <codePool>community</codePool>
8
- </Icepay_IceCore>
9
- </modules>
10
  </config>
1
+ <?xml version="1.0"?>
2
+
3
+ <config>
4
+ <modules>
5
+ <Icepay_IceCore>
6
+ <active>true</active>
7
+ <codePool>community</codePool>
8
+ </Icepay_IceCore>
9
+ </modules>
10
  </config>
app/locale/de_DE/Icepay_IceAdvanced.csv CHANGED
@@ -1,31 +1,31 @@
1
- /*adminhtml*/
2
- Paymentmethods,"Zahlungsmethoden"
3
- Filter paymentmethods on customer billing country,"Filter Sie die Zahlungsmethoden f&uuml;r die Zahlungsanschrift des Kunden"
4
- Configure ICEPAY paymentmethods [STORE VIEW],"Konfigurieren der ICEPAY Zahlungsmethoden, dies k&ouml;nnen Sie pro Store View (Gesch&auml;fts&uuml;bersicht) tun"
5
- SOAP webservices available,"SOAP Webservices sind verf&uuml;gbar"
6
- SOAP was not found on this server,"SOAP wurde nicht gefunden auf diesem Server"
7
- %s paymentmethods in database,"%s Zahlungsmethoden in Datenbank"
8
- %s paymentmethods stored for this Store view,"%s Zahlungsmethoden gespeichert f&uuml;r diese Gesch&auml;fts&uuml;bersicht"
9
- %s paymentmethods stored in Default settings,"%s Zahlungsmethoden bei den Standardeinstellungen gespeichert"
10
- No active paymentmethods found,"Keine Zahlungsmethoden gefunden"
11
- SOAP connection established,"SOAP Anschluss gemacht"
12
- %s active paymentmethods found,"%s aktive Zahlungsmethoden gefunden"
13
- Configure,"Einstellen"
14
- Title,"Titel"
15
- Settings,"Einstellungen"
16
- Settings for,"Einstellungen f&uuml;r"
17
- Sort order,"Reihenfolge sortieren"
18
- Get paymentmethods,"Zahlungsmethoden abholen"
19
- Paymentmethod,"Zahlungsmethode"
20
- Save Config to configure,"Die &auml;nderungen speichern, um die Zahlungsmethode weiter einzustellen"
21
- Please read the advanced manual,"<a href="http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf" target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Heeft u hulp nodig bij het instellen? Raadpleeg onze handleiding of installatie video.</span>"
22
- Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Einige Zahlungsmethoden unterst&uuml;tzen eine Beschreibung in der Transaktions&uuml;bersicht des Kunden. Falls leer, wird die Magento Bestell-ID verwendet."
23
- Description displayed in checkout,"Beschreibung w&auml;hrend dem Abrechnen."
24
- Save settings,"Einstellungen speichern"
25
- Cancel,"Annullieren"
26
- Use CTRL to activate/deactivate specific issuers,"Verwende CTRL, um spezifische Issuers an- oder auszuschalten. Mindestens 1 Issuer muss selektiert sein."
27
- Use CTRL to select specific countries,"Verwende CTRL, um spezifische L&auml;nder auszuw&auml;hlen."
28
-
29
- /*frontend*/
30
- Please select an issuer,"Treffen Sie Ihre Wahl"
31
- Please select a country,"Treffen Sie Ihre Wahl aus"
1
+ /*adminhtml*/
2
+ Paymentmethods,"Zahlungsmethoden"
3
+ Filter paymentmethods on customer billing country,"Filter Sie die Zahlungsmethoden f&uuml;r die Zahlungsanschrift des Kunden"
4
+ Configure ICEPAY paymentmethods [STORE VIEW],"Konfigurieren der ICEPAY Zahlungsmethoden, dies k&ouml;nnen Sie pro Store View (Gesch&auml;fts&uuml;bersicht) tun"
5
+ SOAP webservices available,"SOAP Webservices sind verf&uuml;gbar"
6
+ SOAP was not found on this server,"SOAP wurde nicht gefunden auf diesem Server"
7
+ %s paymentmethods in database,"%s Zahlungsmethoden in Datenbank"
8
+ %s paymentmethods stored for this Store view,"%s Zahlungsmethoden gespeichert f&uuml;r diese Gesch&auml;fts&uuml;bersicht"
9
+ %s paymentmethods stored in Default settings,"%s Zahlungsmethoden bei den Standardeinstellungen gespeichert"
10
+ No active paymentmethods found,"Keine Zahlungsmethoden gefunden"
11
+ SOAP connection established,"SOAP Anschluss gemacht"
12
+ %s active paymentmethods found,"%s aktive Zahlungsmethoden gefunden"
13
+ Configure,"Einstellen"
14
+ Title,"Titel"
15
+ Settings,"Einstellungen"
16
+ Settings for,"Einstellungen f&uuml;r"
17
+ Sort order,"Reihenfolge sortieren"
18
+ Get paymentmethods,"Zahlungsmethoden abholen"
19
+ Paymentmethod,"Zahlungsmethode"
20
+ Save Config to configure,"Die &auml;nderungen speichern, um die Zahlungsmethode weiter einzustellen"
21
+ Please read the advanced manual,"<a href="http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf" target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Heeft u hulp nodig bij het instellen? Raadpleeg onze handleiding of installatie video.</span>"
22
+ Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Einige Zahlungsmethoden unterst&uuml;tzen eine Beschreibung in der Transaktions&uuml;bersicht des Kunden. Falls leer, wird die Magento Bestell-ID verwendet."
23
+ Description displayed in checkout,"Beschreibung w&auml;hrend dem Abrechnen."
24
+ Save settings,"Einstellungen speichern"
25
+ Cancel,"Annullieren"
26
+ Use CTRL to activate/deactivate specific issuers,"Verwende CTRL, um spezifische Issuers an- oder auszuschalten. Mindestens 1 Issuer muss selektiert sein."
27
+ Use CTRL to select specific countries,"Verwende CTRL, um spezifische L&auml;nder auszuw&auml;hlen."
28
+
29
+ /*frontend*/
30
+ Please select an issuer,"Treffen Sie Ihre Wahl"
31
+ Please select a country,"Treffen Sie Ihre Wahl aus"
app/locale/de_DE/Icepay_IceCore.csv CHANGED
@@ -1,61 +1,61 @@
1
- /*headers*/
2
- Set-up configuration,"Installation Konfiguration"
3
- Installed modules,"Installierte Module"
4
-
5
- /*tooltips*/
6
- Copy the Merchant ID from your ICEPAY account.,"Kopieren Sie die Merchant ID von Ihrem ICEPAY Merchant Account"
7
- Copy the Secret Code from your ICEPAY account.,"Kopieren Sie den Secret Code von Ihrem ICEPAY Merchant Konto"
8
- Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.,"Kopieren und f&uuml;gen Sie diese URL in das Dankesch&ouml;nseite-Feld Ihrer (neuen) ICEPAY Merchant Website ein"
9
- Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.,"Kopieren und f&uuml;gen Sie diese URL in das Fehlermeldeseite-Feld Ihrer (neuen) ICEPAY Merchant Website ein"
10
- Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.,"Kopieren und f&uuml;gen Sie diese URL in das Postbackseite-Feld Ihrer (neuen) ICEPAY Merchant Website ein"
11
-
12
- /*labels*/
13
- Merchant ID,"Merchant ID"
14
- Secret Code,"Secret Code"
15
- URL for Success,"Dankesch&ouml;nseite"
16
- URL for Error,"Fehlermeldeseite"
17
- URL for Postback/Notify,"Postback URL"
18
- Auto invoice,"Automatische Fakturierung"
19
- Description on transaction statement of customer,"Beschreibung in der Transaktions&uuml;bersicht des Kunden"
20
- Please read the core manual,"<a href=""http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf"" target=""blank"" class=""btn-manual""></a> <a href=""http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic"" target=""blank"" class=""btn-movie""></a><BR/><BR/><BR/><span class=""manual-comment"">Ben&ouml;tigen Sie Hilfe beim Einstellen? Ziehen Sie unsere Anleitung oder das Installationsvideo zu Rate.</span>"
21
-
22
- /*comments*/
23
- Step 1.,"Schritt 1."
24
- Step 2.,"Schritt 2."
25
- This configuration section is for implementing ICEPAY, please do not change these settings after saving.,"This configuration section is for implementing your <a href=""https://www.icepay.com/NL/Login?origin=magento_admin"" target=""blank"">ICEPAY Merchant website</a>. bitte �ndern Sie diese Einstellungen nach dem Speichern nicht mehr."
26
- Configuration Information,"Information &uuml;ber die Konfiguration"
27
- This is an overview of installed ICEPAY modules,"Dies ist eine &uuml;bersicht der installierten ICEPAY Module"
28
- Have Magento create the invoice automatically when payment has been completed.,"Lassen Sie Magento die Rechnung automatisch erstellen, sobald bezahlt wurde."
29
-
30
- /*notifications*/
31
- Merchant ID is properly configured,"Merchant ID ist gut eingestellt"
32
- Merchant ID not set for this storeview,"Merchant ID ist nicht eingestellt in dieser Gesch�fts&uuml;bersicht"
33
- Merchant ID does not contain 5 digits,"Merchant ID enth�lt nicht die erforderlichen 5 Zahlen"
34
- Merchant ID is not numeric,"Merchant ID ist keine Zahl"
35
- SecretCode is properly configured,"Secret Code ist nicht gut eingestellt"
36
- SecretCode not set for this storeview,"Secret Code ist nicht eingestellt in dieser Gesch�fts&uuml;bersicht"
37
- SecretCode does not contain 40 characters,"Secret Code enth�lt nicht die erforderlichen 40 Zeichen"
38
-
39
- /*statuscodes*/
40
- Awaiting payment,"In Erwartung der Zahlung"
41
- Payment received,"Zahlung erhalten"
42
- Payment error,"Fehler bei Zahlung"
43
- Payment refund request,"Erstattungsanfrage"
44
- Payment chargeback request,"R&uuml;cklastschriftanfrage"
45
- ;;
46
- /*statement*/;;
47
- icepay_about_line1,"ICEPAY ist ein niederl�ndischer Payment Service Provider, der Online-Zahlungen f&uuml;r Dritte versorgt. Wenn Sie als Konsument eine Zahlung an den Eigent&uuml;mer dieses Webshops (ein Kunde von ICEPAY) t�tigen, geht die Zahlung erst an ICEPAY (oder Stiftung Escrow ICEPAY) und ICEPAY sorgt daf&uuml;r, dass Ihre Transaktion an den Eigent&uuml;mer des Webshops ausgezahlt wird."
48
- icepay_about_line2,"ICEPAY ist also ein Zwischenpartei und hat keinen Einfluss auf die Lieferung der von Ihnen bestellten Produkte oder Dienstleistungen. Sollten Sie Fragen zur Lieferung/Stornierung/R&uuml;ckzahlung Ihrer Bestellung haben, empfehlen wir Ihnen, Kontakt mit dem Webshop aufzunehmen."
49
- icepay_about_line3,"Ihre Zahlung wird auf verschiedene Arten durch ICEPAY gesichert, weil:"
50
- icepay_about_currence,"ICEPAY &uuml;ber eine iDEAL Zertifizierung von <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a>(Eigent&uuml;mer iDEAL) verf&uuml;gt. ICEPAY erf&uuml;llt damit die aufgestellten Anforderungen von Currence u.a. auf dem Gebiet von Technik, Sicherheit und Zuverl�ssigkeit."
51
- icepay_about_thawte,"ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving"
52
- icepay_about_thuiswinkel,"ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
53
- icepay_about_link,"<a href='http://www.icepay.com' target='_blank'>Besuchen Sie die ICEPAY Webseite</a>""";;
54
-
55
- /*frontend*/
56
- Redirecting...,"Einen Moment Geduld bitte. Sie werden weitergeleitet..."
57
-
58
- /* postback */
59
- Status of order changed,"Der Status Ihrer Bestellung wurde ge�ndert"
60
- Customer returned with status: %s,"Kunde ist zur&uuml;ckgekehrt mit dem Status: %s"
61
- The payment provider has returned the following error message: %s,"Der Zahlungsprovider hat die folgende Fehlermeldung abgegeben: %s"
1
+ /*headers*/
2
+ Set-up configuration,"Installation Konfiguration"
3
+ Installed modules,"Installierte Module"
4
+
5
+ /*tooltips*/
6
+ Copy the Merchant ID from your ICEPAY account.,"Kopieren Sie die Merchant ID von Ihrem ICEPAY Merchant Account"
7
+ Copy the Secret Code from your ICEPAY account.,"Kopieren Sie den Secret Code von Ihrem ICEPAY Merchant Konto"
8
+ Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.,"Kopieren und f&uuml;gen Sie diese URL in das Dankesch&ouml;nseite-Feld Ihrer (neuen) ICEPAY Merchant Website ein"
9
+ Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.,"Kopieren und f&uuml;gen Sie diese URL in das Fehlermeldeseite-Feld Ihrer (neuen) ICEPAY Merchant Website ein"
10
+ Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.,"Kopieren und f&uuml;gen Sie diese URL in das Postbackseite-Feld Ihrer (neuen) ICEPAY Merchant Website ein"
11
+
12
+ /*labels*/
13
+ Merchant ID,"Merchant ID"
14
+ Secret Code,"Secret Code"
15
+ URL for Success,"Dankesch&ouml;nseite"
16
+ URL for Error,"Fehlermeldeseite"
17
+ URL for Postback/Notify,"Postback URL"
18
+ Auto invoice,"Automatische Fakturierung"
19
+ Description on transaction statement of customer,"Beschreibung in der Transaktions&uuml;bersicht des Kunden"
20
+ Please read the core manual,"<a href=""http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf"" target=""blank"" class=""btn-manual""></a> <a href=""http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic"" target=""blank"" class=""btn-movie""></a><BR/><BR/><BR/><span class=""manual-comment"">Ben&ouml;tigen Sie Hilfe beim Einstellen? Ziehen Sie unsere Anleitung oder das Installationsvideo zu Rate.</span>"
21
+
22
+ /*comments*/
23
+ Step 1.,"Schritt 1."
24
+ Step 2.,"Schritt 2."
25
+ This configuration section is for implementing ICEPAY, please do not change these settings after saving.,"This configuration section is for implementing your <a href=""https://www.icepay.com/NL/Login?origin=magento_admin"" target=""blank"">ICEPAY Merchant website</a>. bitte �ndern Sie diese Einstellungen nach dem Speichern nicht mehr."
26
+ Configuration Information,"Information &uuml;ber die Konfiguration"
27
+ This is an overview of installed ICEPAY modules,"Dies ist eine &uuml;bersicht der installierten ICEPAY Module"
28
+ Have Magento create the invoice automatically when payment has been completed.,"Lassen Sie Magento die Rechnung automatisch erstellen, sobald bezahlt wurde."
29
+
30
+ /*notifications*/
31
+ Merchant ID is properly configured,"Merchant ID ist gut eingestellt"
32
+ Merchant ID not set for this storeview,"Merchant ID ist nicht eingestellt in dieser Gesch�fts&uuml;bersicht"
33
+ Merchant ID does not contain 5 digits,"Merchant ID enth�lt nicht die erforderlichen 5 Zahlen"
34
+ Merchant ID is not numeric,"Merchant ID ist keine Zahl"
35
+ SecretCode is properly configured,"Secret Code ist nicht gut eingestellt"
36
+ SecretCode not set for this storeview,"Secret Code ist nicht eingestellt in dieser Gesch�fts&uuml;bersicht"
37
+ SecretCode does not contain 40 characters,"Secret Code enth�lt nicht die erforderlichen 40 Zeichen"
38
+
39
+ /*statuscodes*/
40
+ Awaiting payment,"In Erwartung der Zahlung"
41
+ Payment received,"Zahlung erhalten"
42
+ Payment error,"Fehler bei Zahlung"
43
+ Payment refund request,"Erstattungsanfrage"
44
+ Payment chargeback request,"R&uuml;cklastschriftanfrage"
45
+ ;;
46
+ /*statement*/;;
47
+ icepay_about_line1,"ICEPAY ist ein niederl�ndischer Payment Service Provider, der Online-Zahlungen f&uuml;r Dritte versorgt. Wenn Sie als Konsument eine Zahlung an den Eigent&uuml;mer dieses Webshops (ein Kunde von ICEPAY) t�tigen, geht die Zahlung erst an ICEPAY (oder Stiftung Escrow ICEPAY) und ICEPAY sorgt daf&uuml;r, dass Ihre Transaktion an den Eigent&uuml;mer des Webshops ausgezahlt wird."
48
+ icepay_about_line2,"ICEPAY ist also ein Zwischenpartei und hat keinen Einfluss auf die Lieferung der von Ihnen bestellten Produkte oder Dienstleistungen. Sollten Sie Fragen zur Lieferung/Stornierung/R&uuml;ckzahlung Ihrer Bestellung haben, empfehlen wir Ihnen, Kontakt mit dem Webshop aufzunehmen."
49
+ icepay_about_line3,"Ihre Zahlung wird auf verschiedene Arten durch ICEPAY gesichert, weil:"
50
+ icepay_about_currence,"ICEPAY &uuml;ber eine iDEAL Zertifizierung von <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a>(Eigent&uuml;mer iDEAL) verf&uuml;gt. ICEPAY erf&uuml;llt damit die aufgestellten Anforderungen von Currence u.a. auf dem Gebiet von Technik, Sicherheit und Zuverl�ssigkeit."
51
+ icepay_about_thawte,"ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving"
52
+ icepay_about_thuiswinkel,"ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
53
+ icepay_about_link,"<a href='http://www.icepay.com' target='_blank'>Besuchen Sie die ICEPAY Webseite</a>""";;
54
+
55
+ /*frontend*/
56
+ Redirecting...,"Einen Moment Geduld bitte. Sie werden weitergeleitet..."
57
+
58
+ /* postback */
59
+ Status of order changed,"Der Status Ihrer Bestellung wurde ge�ndert"
60
+ Customer returned with status: %s,"Kunde ist zur&uuml;ckgekehrt mit dem Status: %s"
61
+ The payment provider has returned the following error message: %s,"Der Zahlungsprovider hat die folgende Fehlermeldung abgegeben: %s"
app/locale/en_US/Icepay_IceAdvanced.csv CHANGED
@@ -1,38 +1,38 @@
1
- /*adminhtml*/
2
- "Please read the advanced manual","<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Need help? View our manual or install video!</span>
3
- "Paymentmethods","Paymentmethods"
4
- "Filter paymentmethods on customer billing country","Filter paymentmethods on customer billing country"
5
- "Configure ICEPAY paymentmethods [STORE VIEW]","Configure ICEPAY paymentmethods [STORE VIEW]"
6
- "SOAP webservices available","SOAP webservices available"
7
- "SOAP was not found on this server","SOAP was not found on this server"
8
- "%s paymentmethods in database","%s paymentmethods in database"
9
- "%s paymentmethods stored for this Store view","%s paymentmethods stored for this Store view"
10
- "%s paymentmethods stored in Default settings","%s paymentmethods stored in Default settings"
11
- "No active paymentmethods found","No active paymentmethods found"
12
- "SOAP connection established","SOAP connection established"
13
- "%s active paymentmethods found","%s active paymentmethods found"
14
- "Configure","Configure"
15
- "Title","Title"
16
- "Settings","Settings"
17
- "Settings for","Settings for"
18
- "Sort order","Sort order"
19
- "Get paymentmethods","Get paymentmethods"
20
- "Paymentmethod","Paymentmethod"
21
- "Save Config to configure","Save Config to configure"
22
- "Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.)","Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.)"
23
- "Description displayed in checkout","Description displayed in checkout"
24
- "Save settings","Save settings"
25
- "Cancel","Cancel"
26
- "Use CTRL to activate/deactivate specific issuers","Use CTRL to activate/deactivate specific issuers"
27
- "Use CTRL to select specific countries","Use CTRL to select specific countries"
28
-
29
- /*frontend*/
30
- "Please select an issuer","Please select an issuer"
31
- "Please select a country","Please select a country"
32
-
33
- /*frontend-errors*/
34
- "It seems your billing address is incorrect, please confirm the postal code.", "It seems your billing address is incorrect, please confirm the postal code."
35
- "It seems your billing address is incorrect, please confirm the phonenumber.", "It seems your billing address is incorrect, please confirm the phonenumber."
36
- "It seems your billing address is incorrect, please confirm the street and housenumber.", "It seems your billing address is incorrect, please confirm the street and housenumber."
37
- "It seems your shipping address is incorrect, please confirm the street and housenumber.", "It seems your shipping address is incorrect, please confirm the street and housenumber."
38
-
1
+ /*adminhtml*/
2
+ "Please read the advanced manual","<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Need help? View our manual or install video!</span>
3
+ "Paymentmethods","Paymentmethods"
4
+ "Filter paymentmethods on customer billing country","Filter paymentmethods on customer billing country"
5
+ "Configure ICEPAY paymentmethods [STORE VIEW]","Configure ICEPAY paymentmethods [STORE VIEW]"
6
+ "SOAP webservices available","SOAP webservices available"
7
+ "SOAP was not found on this server","SOAP was not found on this server"
8
+ "%s paymentmethods in database","%s paymentmethods in database"
9
+ "%s paymentmethods stored for this Store view","%s paymentmethods stored for this Store view"
10
+ "%s paymentmethods stored in Default settings","%s paymentmethods stored in Default settings"
11
+ "No active paymentmethods found","No active paymentmethods found"
12
+ "SOAP connection established","SOAP connection established"
13
+ "%s active paymentmethods found","%s active paymentmethods found"
14
+ "Configure","Configure"
15
+ "Title","Title"
16
+ "Settings","Settings"
17
+ "Settings for","Settings for"
18
+ "Sort order","Sort order"
19
+ "Get paymentmethods","Get paymentmethods"
20
+ "Paymentmethod","Paymentmethod"
21
+ "Save Config to configure","Save Config to configure"
22
+ "Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.)","Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.)"
23
+ "Description displayed in checkout","Description displayed in checkout"
24
+ "Save settings","Save settings"
25
+ "Cancel","Cancel"
26
+ "Use CTRL to activate/deactivate specific issuers","Use CTRL to activate/deactivate specific issuers"
27
+ "Use CTRL to select specific countries","Use CTRL to select specific countries"
28
+
29
+ /*frontend*/
30
+ "Please select an issuer","Please select an issuer"
31
+ "Please select a country","Please select a country"
32
+
33
+ /*frontend-errors*/
34
+ "It seems your billing address is incorrect, please confirm the postal code.", "It seems your billing address is incorrect, please confirm the postal code."
35
+ "It seems your billing address is incorrect, please confirm the phonenumber.", "It seems your billing address is incorrect, please confirm the phonenumber."
36
+ "It seems your billing address is incorrect, please confirm the street and housenumber.", "It seems your billing address is incorrect, please confirm the street and housenumber."
37
+ "It seems your shipping address is incorrect, please confirm the street and housenumber.", "It seems your shipping address is incorrect, please confirm the street and housenumber."
38
+
app/locale/en_US/Icepay_IceCore.csv CHANGED
@@ -1,61 +1,61 @@
1
- /*headers*/
2
- "Set-up configuration","Set-up configuration"
3
- "Installed modules","Installed modules"
4
-
5
- /*tooltips*/
6
- "Copy the Merchant ID from your ICEPAY account.","Copy the Merchant ID from your ICEPAY account."
7
- "Copy the Secret Code from your ICEPAY account.","Copy the Secret Code from your ICEPAY account."
8
- "Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.","Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account."
9
- "Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.","Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account."
10
- "Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.","Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account."
11
-
12
- /*labels*/
13
- "Merchant ID","Merchant ID"
14
- "Secret Code","Secret Code"
15
- "URL for Success","Thank you page"
16
- "URL for Error","Error page"
17
- "URL for Postback/Notify","Postback URL"
18
- "Auto invoice","Auto invoice"
19
- "Description on transaction statement of customer","Description on transaction statement of customer"
20
- "Please read the core manual","<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Need help? View our manual or install video!</span>
21
-
22
- /*comments*/
23
- "Step 1.","Step 1."
24
- "Step 2.","Step 2."
25
- "This configuration section is for implementing ICEPAY, please do not change these settings after saving.","This configuration section is for linking to your <a href="https://www.icepay.com/EN/Login?origin=magento_admin" target="blank">ICEPAY Merchant website</a>, please do not change these settings after saving."
26
- "Configuration Information","Configuration Information"
27
- "This is an overview of installed ICEPAY modules",""
28
- "Have Magento create the invoice automatically when payment has been completed.","Have Magento create the invoice automatically when payment has been completed."
29
- "Have Magento refund the ICEPAY transaction online when creating a credit memo.", "Have Magento refund the ICEPAY transaction online when creating a credit memo."
30
- /*notifications*/
31
- "Merchant ID is properly configured","Merchant ID is properly configured"
32
- "Merchant ID not set for this storeview","Merchant ID not set for this storeview"
33
- "Merchant ID does not contain 5 digits","Merchant ID does not contain 5 digits"
34
- "Merchant ID is not numeric","Merchant ID is not numeric"
35
- "SecretCode is properly configured","SecretCode is properly configured"
36
- "SecretCode not set for this storeview","SecretCode not set for this storeview"
37
- "SecretCode does not contain 40 characters","SecretCode does not contain 40 characters"
38
-
39
- /*statuscodes*/
40
- "Awaiting payment","Awaiting payment"
41
- "Payment received","Payment received"
42
- "Payment error","Payment error"
43
- "Payment refund request","Payment refund request"
44
- "Payment chargeback request","Payment chargeback request"
45
-
46
- /*statement*/
47
- "icepay_about_line1","ICEPAY is a Dutch Payment Service Provider that provides online payments for third parties. The following happens when you, the consumer, do a payment to the owner of this web shop ( a customer of ICEPAY): First, the payment goes to ICEPAY ( or Stichting Escrow ICEPAY) and next ICEPAY ensures that the owner of the web shop receives your transaction. ICEPAY is an intermediary party."
48
- "icepay_about_line2","Hence, ICEPAY does not have any influence on the delivery of the products or services you ordered .In case you have any questions about the delivery/cancellation/refunding of your order, we advise to contact the web shop."
49
- "icepay_about_line3","Your payment is protected by ICEPAY in different ways, because:"
50
- "icepay_about_currence","ICEPAY has a <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a> (owner of iDEAL) iDEAL certification. This way, ICEPAY meets the Currence requirements of the competency guidelines;"
51
- "icepay_about_thawte","ICEPAY has the Thawte SSL certification. Thus ICEPAY obtains the highest level of authentication during the processing of a payment. This means a guaranteed safe payment environment;"
52
- "icepay_about_thuiswinkel","ICEPAY is an official business partner of Thuiswinkel.org (the Dutch organization for online shopping). This partnership shows that ICEPAY follows strict rules and regulations concerning privacy, right of withdrawal and dispute settlement."
53
- "icepay_about_link","<a href='http://www.icepay.com' target='_blank'>Visit the ICEPAY website</a>"
54
-
55
- /*frontend*/
56
- "Redirecting...","Redirecting... Please wait a moment"
57
-
58
- /* postback */
59
- "Status of order changed","Status of order changed"
60
- "Customer returned with status: %s","Customer returned with status: %s"
61
  "The payment provider has returned the following error message: %s","The payment provider has returned the following error message: %s"
1
+ /*headers*/
2
+ "Set-up configuration","Set-up configuration"
3
+ "Installed modules","Installed modules"
4
+
5
+ /*tooltips*/
6
+ "Copy the Merchant ID from your ICEPAY account.","Copy the Merchant ID from your ICEPAY account."
7
+ "Copy the Secret Code from your ICEPAY account.","Copy the Secret Code from your ICEPAY account."
8
+ "Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.","Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account."
9
+ "Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.","Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account."
10
+ "Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.","Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account."
11
+
12
+ /*labels*/
13
+ "Merchant ID","Merchant ID"
14
+ "Secret Code","Secret Code"
15
+ "URL for Success","Thank you page"
16
+ "URL for Error","Error page"
17
+ "URL for Postback/Notify","Postback URL"
18
+ "Auto invoice","Auto invoice"
19
+ "Description on transaction statement of customer","Description on transaction statement of customer"
20
+ "Please read the core manual","<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Need help? View our manual or install video!</span>
21
+
22
+ /*comments*/
23
+ "Step 1.","Step 1."
24
+ "Step 2.","Step 2."
25
+ "This configuration section is for implementing ICEPAY, please do not change these settings after saving.","This configuration section is for linking to your <a href="https://www.icepay.com/EN/Login?origin=magento_admin" target="blank">ICEPAY Merchant website</a>, please do not change these settings after saving."
26
+ "Configuration Information","Configuration Information"
27
+ "This is an overview of installed ICEPAY modules",""
28
+ "Have Magento create the invoice automatically when payment has been completed.","Have Magento create the invoice automatically when payment has been completed."
29
+ "Have Magento refund the ICEPAY transaction online when creating a credit memo.", "Have Magento refund the ICEPAY transaction online when creating a credit memo."
30
+ /*notifications*/
31
+ "Merchant ID is properly configured","Merchant ID is properly configured"
32
+ "Merchant ID not set for this storeview","Merchant ID not set for this storeview"
33
+ "Merchant ID does not contain 5 digits","Merchant ID does not contain 5 digits"
34
+ "Merchant ID is not numeric","Merchant ID is not numeric"
35
+ "SecretCode is properly configured","SecretCode is properly configured"
36
+ "SecretCode not set for this storeview","SecretCode not set for this storeview"
37
+ "SecretCode does not contain 40 characters","SecretCode does not contain 40 characters"
38
+
39
+ /*statuscodes*/
40
+ "Awaiting payment","Awaiting payment"
41
+ "Payment received","Payment received"
42
+ "Payment error","Payment error"
43
+ "Payment refund request","Payment refund request"
44
+ "Payment chargeback request","Payment chargeback request"
45
+
46
+ /*statement*/
47
+ "icepay_about_line1","ICEPAY is a Dutch Payment Service Provider that provides online payments for third parties. The following happens when you, the consumer, do a payment to the owner of this web shop ( a customer of ICEPAY): First, the payment goes to ICEPAY ( or Stichting Escrow ICEPAY) and next ICEPAY ensures that the owner of the web shop receives your transaction. ICEPAY is an intermediary party."
48
+ "icepay_about_line2","Hence, ICEPAY does not have any influence on the delivery of the products or services you ordered .In case you have any questions about the delivery/cancellation/refunding of your order, we advise to contact the web shop."
49
+ "icepay_about_line3","Your payment is protected by ICEPAY in different ways, because:"
50
+ "icepay_about_currence","ICEPAY has a <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a> (owner of iDEAL) iDEAL certification. This way, ICEPAY meets the Currence requirements of the competency guidelines;"
51
+ "icepay_about_thawte","ICEPAY has the Thawte SSL certification. Thus ICEPAY obtains the highest level of authentication during the processing of a payment. This means a guaranteed safe payment environment;"
52
+ "icepay_about_thuiswinkel","ICEPAY is an official business partner of Thuiswinkel.org (the Dutch organization for online shopping). This partnership shows that ICEPAY follows strict rules and regulations concerning privacy, right of withdrawal and dispute settlement."
53
+ "icepay_about_link","<a href='http://www.icepay.com' target='_blank'>Visit the ICEPAY website</a>"
54
+
55
+ /*frontend*/
56
+ "Redirecting...","Redirecting... Please wait a moment"
57
+
58
+ /* postback */
59
+ "Status of order changed","Status of order changed"
60
+ "Customer returned with status: %s","Customer returned with status: %s"
61
  "The payment provider has returned the following error message: %s","The payment provider has returned the following error message: %s"
app/locale/es_ES/Icepay_IceAdvanced.csv CHANGED
@@ -1,31 +1,31 @@
1
- /*adminhtml*/
2
- Paymentmethods,"M&euml;todos de pago"
3
- Filter paymentmethods on customer billing country,"Filtre los m&euml;todos de pago seg�n la direcci&ouml;n de pago del cliente"
4
- Configure ICEPAY paymentmethods [STORE VIEW],"Configure los m&euml;todos de pago ICEPAY. Esto lo puede hacer a trav&euml;s de Store View (vista de tienda)"
5
- SOAP webservices available,"SOAP webservices est&auml;n disponibles"
6
- SOAP was not found on this server,"No se encontr&ouml; SOAP en este servidor"
7
- %s paymentmethods in database,"%s m&euml;todos de pago en la base de datos"
8
- %s paymentmethods stored for this Store view,"%s m&euml;todos de pago almacenados para esta vista de tienda"
9
- %s paymentmethods stored in Default settings,"%s m&euml;todos de pago almacenados en la configuraci&ouml;n est&auml;ndar"
10
- No active paymentmethods found,"No se han encontrado m&euml;todos de pago"
11
- SOAP connection established,"Conexi&ouml;n SOAP establecida"
12
- %s active paymentmethods found,"Se han encontrado %s m&euml;todos de pago activos"
13
- Configure,"Configurar"
14
- Title,"T&iuml;tulo"
15
- Settings,"Configuraci&ouml;n"
16
- Settings for,"Configuraci&ouml;n para"
17
- Sort order,"Clasificar orden"
18
- Get paymentmethods,"Recuperar los m&euml;todos de pago"
19
- Paymentmethod,"M&euml;todo de pago"
20
- Save Config to configure,"Guardar las modificaciones para seguir con la configuraci&ouml;n del m&euml;todo de pago"
21
- Please read the advanced manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Necesita ayuda durante la configuraci&ouml;n? Consulte nuestro manual o el video de instalaci&ouml;n.</span>
22
- Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Algunos m&euml;todos de pago permiten una descripci&ouml;n en el estado de transacciones del cliente Si se deja vac&iuml;o, se utilizar&auml; el ID del pedido Magento."
23
- Description displayed in checkout,"Descripci&ouml;n durante el proceso de pago."
24
- Save settings,"Guardar configuraci&ouml;n"
25
- Cancel,"Cancelar"
26
- Use CTRL to activate/deactivate specific issuers,"Utilice CTRL para activar o desactivar issuers espec&iuml;ficos. Se ha de seleccionar al menos 1 issuer."
27
- Use CTRL to select specific countries,"Utilice CTRL para seleccionar pa&iuml;ses espec&iuml;ficos."
28
-
29
- /*frontend*/
30
- Please select an issuer,"Seleccione"
31
- Please select a country,"Seleccione entre"
1
+ /*adminhtml*/
2
+ Paymentmethods,"M&euml;todos de pago"
3
+ Filter paymentmethods on customer billing country,"Filtre los m&euml;todos de pago seg�n la direcci&ouml;n de pago del cliente"
4
+ Configure ICEPAY paymentmethods [STORE VIEW],"Configure los m&euml;todos de pago ICEPAY. Esto lo puede hacer a trav&euml;s de Store View (vista de tienda)"
5
+ SOAP webservices available,"SOAP webservices est&auml;n disponibles"
6
+ SOAP was not found on this server,"No se encontr&ouml; SOAP en este servidor"
7
+ %s paymentmethods in database,"%s m&euml;todos de pago en la base de datos"
8
+ %s paymentmethods stored for this Store view,"%s m&euml;todos de pago almacenados para esta vista de tienda"
9
+ %s paymentmethods stored in Default settings,"%s m&euml;todos de pago almacenados en la configuraci&ouml;n est&auml;ndar"
10
+ No active paymentmethods found,"No se han encontrado m&euml;todos de pago"
11
+ SOAP connection established,"Conexi&ouml;n SOAP establecida"
12
+ %s active paymentmethods found,"Se han encontrado %s m&euml;todos de pago activos"
13
+ Configure,"Configurar"
14
+ Title,"T&iuml;tulo"
15
+ Settings,"Configuraci&ouml;n"
16
+ Settings for,"Configuraci&ouml;n para"
17
+ Sort order,"Clasificar orden"
18
+ Get paymentmethods,"Recuperar los m&euml;todos de pago"
19
+ Paymentmethod,"M&euml;todo de pago"
20
+ Save Config to configure,"Guardar las modificaciones para seguir con la configuraci&ouml;n del m&euml;todo de pago"
21
+ Please read the advanced manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Necesita ayuda durante la configuraci&ouml;n? Consulte nuestro manual o el video de instalaci&ouml;n.</span>
22
+ Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Algunos m&euml;todos de pago permiten una descripci&ouml;n en el estado de transacciones del cliente Si se deja vac&iuml;o, se utilizar&auml; el ID del pedido Magento."
23
+ Description displayed in checkout,"Descripci&ouml;n durante el proceso de pago."
24
+ Save settings,"Guardar configuraci&ouml;n"
25
+ Cancel,"Cancelar"
26
+ Use CTRL to activate/deactivate specific issuers,"Utilice CTRL para activar o desactivar issuers espec&iuml;ficos. Se ha de seleccionar al menos 1 issuer."
27
+ Use CTRL to select specific countries,"Utilice CTRL para seleccionar pa&iuml;ses espec&iuml;ficos."
28
+
29
+ /*frontend*/
30
+ Please select an issuer,"Seleccione"
31
+ Please select a country,"Seleccione entre"
app/locale/es_ES/Icepay_IceCore.csv CHANGED
@@ -1,61 +1,61 @@
1
- /*headers*/
2
- Set-up configuration,Configuraci&ouml;n de la instalaci&ouml;n
3
- Installed modules,"M&ouml;dulos instalados"
4
-
5
- /*tooltips*/
6
- Copy the Merchant ID from your ICEPAY account.,"Copie el Merchant ID de su ICEPAY merchant account"
7
- Copy the Secret Code from your ICEPAY account.,"Copie el Secret Code de su ICEPAY merchant account"
8
- Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.,"Copie y pegue este URL del campo de la p&auml;gina de agradecimiento a su (nuevo) ICEPAY merchant website"
9
- Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.,"Copie y pegue este URL del campo de la p&auml;gina de errores a su (nuevo) ICEPAY merchant website"
10
- Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.,"Copie y pegue este URL al campo de la p&auml;gina Postback de su (nuevo) ICEPAY merchant website"
11
-
12
- /*labels*/
13
- Merchant ID,"Merchant ID"
14
- Secret Code,"Secret Code"
15
- URL for Success,"P&auml;gina de agradecimiento"
16
- URL for Error,"P&auml;gina de errores"
17
- URL for Postback/Notify,"URL Postback"
18
- Auto invoice,"Facturaci&ouml;n autom&auml;tica"
19
- Description on transaction statement of customer,"Descripci&ouml;n en el estado de transacciones del cliente"
20
- Please read the core manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Necesita ayuda durante la configuraci&ouml;n? Consulte nuestro manual o el video de instalaci&ouml;n.</span>
21
-
22
- /*comments*/
23
- Step 1.,"Paso 1:"
24
- Step 2.,"Paso 2:"
25
- This configuration section is for implementing ICEPAY, please do not change these settings after saving.,"This configuration section is for implementing your <a href="https://www.icepay.com/NL/Login?origin=magento_admin" target="blank">ICEPAY Merchant website</a>. Por favor, no cambie la configuraci&ouml;n despu&euml;s de guardarla. "
26
- Configuration Information,"Informaci&ouml;n sobre la configuraci&ouml;n"
27
- This is an overview of installed ICEPAY modules,"Esta es una lista de los m&ouml;dulos ICEPAY instalados"
28
- Have Magento create the invoice automatically when payment has been completed.,"Deje que Magento genere la factura autom&auml;ticamente cuando se haya completado el pago."
29
-
30
- /*notifications*/
31
- Merchant ID is properly configured,"Merchant ID est&auml; correctamente ajustado"
32
- Merchant ID not set for this storeview,"Merchant ID no est&auml; ajustado en esta vista de tienda"
33
- Merchant ID does not contain 5 digits,"Merchant ID no contiene los 5 d�gitos obligatorios"
34
- Merchant ID is not numeric,"Merchant ID no es un d�gito"
35
- SecretCode is properly configured,"Secret Code est&auml; correctamente ajustado"
36
- SecretCode not set for this storeview,"Secret Code no est&auml; ajustado en esta vista de tienda"
37
- SecretCode does not contain 40 characters,"Secret Code no contiene los 40 d�gitos obligatorios"
38
-
39
- /*statuscodes*/
40
- Awaiting payment,"Pago pendiente"
41
- Payment received,"Pago recibido"
42
- Payment error,"Error durante el pago"
43
- Payment refund request,"Solicitud de devoluci&ouml;n"
44
- Payment chargeback request,"Solicitud de reembolso"
45
-
46
- /*statement*/
47
- icepay_about_line1,"ICEPAY es un Proveedor de Servicios de Pago holand&euml;s que realiza pagos en l�nea para terceros. Cuando usted, como consumidor, realiza un pago al propietario de esta tienda en l�nea (un cliente de ICEPAY), el pago se dirigir&auml; primero a ICEPAY (o la fundaci&ouml;n Escrow ICEPAY) y ICEPAY se cuidar&auml; de que la transacci&ouml;n se pague al propietario de la tienda en l�nea."
48
- icepay_about_line2,"Es decir, ICEPAY es un intermediario y no tiene influencia sobre la entrega de los productos ni los servicios que usted ha pedido. Si tiene preguntas sobre la entrega/cancelaci&ouml;n/reembolso de su pedido, le aconsejamos ponerse en contacto con la tienda en l�nea."
49
- icepay_about_line3,"ICEPAY protege su pago de varias formas, porque:"
50
- icepay_about_currence,"ICEPAY cuenta con una certificaci&ouml;n iDEAL de <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a>(propietario de iDEAL). ICEPAY cumple con los requisitos exigidos por Currence en lo que respecta a la t&euml;cnica, seguridad y fiabilidad, entre otras cosas.";"
51
- icepay_about_thawte","ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving"
52
- icepay_about_thuiswinkel","ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
53
- icepay_about_link,"<a href='http://www.icepay.com' target='_blank'>Visite el sitio web de ICEPAY</a>"
54
-
55
- /*frontend*/
56
- Redirecting...,"Por favor, espere un momento mientras es redireccionado..."
57
-
58
- /* postback */
59
- Status of order changed,"El estado del pedido ha cambiado"
60
- Customer returned with status: %s,"El cliente ha vuelto con el estado: %s"
61
- The payment provider has returned the following error message: %s, "El proveedor de pagos ha detectado los siguientes errores: %s"
1
+ /*headers*/
2
+ Set-up configuration,Configuraci&ouml;n de la instalaci&ouml;n
3
+ Installed modules,"M&ouml;dulos instalados"
4
+
5
+ /*tooltips*/
6
+ Copy the Merchant ID from your ICEPAY account.,"Copie el Merchant ID de su ICEPAY merchant account"
7
+ Copy the Secret Code from your ICEPAY account.,"Copie el Secret Code de su ICEPAY merchant account"
8
+ Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.,"Copie y pegue este URL del campo de la p&auml;gina de agradecimiento a su (nuevo) ICEPAY merchant website"
9
+ Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.,"Copie y pegue este URL del campo de la p&auml;gina de errores a su (nuevo) ICEPAY merchant website"
10
+ Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.,"Copie y pegue este URL al campo de la p&auml;gina Postback de su (nuevo) ICEPAY merchant website"
11
+
12
+ /*labels*/
13
+ Merchant ID,"Merchant ID"
14
+ Secret Code,"Secret Code"
15
+ URL for Success,"P&auml;gina de agradecimiento"
16
+ URL for Error,"P&auml;gina de errores"
17
+ URL for Postback/Notify,"URL Postback"
18
+ Auto invoice,"Facturaci&ouml;n autom&auml;tica"
19
+ Description on transaction statement of customer,"Descripci&ouml;n en el estado de transacciones del cliente"
20
+ Please read the core manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Necesita ayuda durante la configuraci&ouml;n? Consulte nuestro manual o el video de instalaci&ouml;n.</span>
21
+
22
+ /*comments*/
23
+ Step 1.,"Paso 1:"
24
+ Step 2.,"Paso 2:"
25
+ This configuration section is for implementing ICEPAY, please do not change these settings after saving.,"This configuration section is for implementing your <a href="https://www.icepay.com/NL/Login?origin=magento_admin" target="blank">ICEPAY Merchant website</a>. Por favor, no cambie la configuraci&ouml;n despu&euml;s de guardarla. "
26
+ Configuration Information,"Informaci&ouml;n sobre la configuraci&ouml;n"
27
+ This is an overview of installed ICEPAY modules,"Esta es una lista de los m&ouml;dulos ICEPAY instalados"
28
+ Have Magento create the invoice automatically when payment has been completed.,"Deje que Magento genere la factura autom&auml;ticamente cuando se haya completado el pago."
29
+
30
+ /*notifications*/
31
+ Merchant ID is properly configured,"Merchant ID est&auml; correctamente ajustado"
32
+ Merchant ID not set for this storeview,"Merchant ID no est&auml; ajustado en esta vista de tienda"
33
+ Merchant ID does not contain 5 digits,"Merchant ID no contiene los 5 d�gitos obligatorios"
34
+ Merchant ID is not numeric,"Merchant ID no es un d�gito"
35
+ SecretCode is properly configured,"Secret Code est&auml; correctamente ajustado"
36
+ SecretCode not set for this storeview,"Secret Code no est&auml; ajustado en esta vista de tienda"
37
+ SecretCode does not contain 40 characters,"Secret Code no contiene los 40 d�gitos obligatorios"
38
+
39
+ /*statuscodes*/
40
+ Awaiting payment,"Pago pendiente"
41
+ Payment received,"Pago recibido"
42
+ Payment error,"Error durante el pago"
43
+ Payment refund request,"Solicitud de devoluci&ouml;n"
44
+ Payment chargeback request,"Solicitud de reembolso"
45
+
46
+ /*statement*/
47
+ icepay_about_line1,"ICEPAY es un Proveedor de Servicios de Pago holand&euml;s que realiza pagos en l�nea para terceros. Cuando usted, como consumidor, realiza un pago al propietario de esta tienda en l�nea (un cliente de ICEPAY), el pago se dirigir&auml; primero a ICEPAY (o la fundaci&ouml;n Escrow ICEPAY) y ICEPAY se cuidar&auml; de que la transacci&ouml;n se pague al propietario de la tienda en l�nea."
48
+ icepay_about_line2,"Es decir, ICEPAY es un intermediario y no tiene influencia sobre la entrega de los productos ni los servicios que usted ha pedido. Si tiene preguntas sobre la entrega/cancelaci&ouml;n/reembolso de su pedido, le aconsejamos ponerse en contacto con la tienda en l�nea."
49
+ icepay_about_line3,"ICEPAY protege su pago de varias formas, porque:"
50
+ icepay_about_currence,"ICEPAY cuenta con una certificaci&ouml;n iDEAL de <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a>(propietario de iDEAL). ICEPAY cumple con los requisitos exigidos por Currence en lo que respecta a la t&euml;cnica, seguridad y fiabilidad, entre otras cosas.";"
51
+ icepay_about_thawte","ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving"
52
+ icepay_about_thuiswinkel","ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
53
+ icepay_about_link,"<a href='http://www.icepay.com' target='_blank'>Visite el sitio web de ICEPAY</a>"
54
+
55
+ /*frontend*/
56
+ Redirecting...,"Por favor, espere un momento mientras es redireccionado..."
57
+
58
+ /* postback */
59
+ Status of order changed,"El estado del pedido ha cambiado"
60
+ Customer returned with status: %s,"El cliente ha vuelto con el estado: %s"
61
+ The payment provider has returned the following error message: %s, "El proveedor de pagos ha detectado los siguientes errores: %s"
app/locale/fr_FR/Icepay_IceAdvanced.csv CHANGED
@@ -1,31 +1,31 @@
1
- /*adminhtml*/
2
- Paymentmethods,"Modes de paiement"
3
- Filter paymentmethods on customer billing country,"Filtrer les modes de paiement d&apos;apr&egrave;s l&apos;adresse de paiement du client"
4
- Configure ICEPAY paymentmethods [STORE VIEW],"Configurer les modes de paiement ICEPAY en utilisant la fonction Store View (affichage de magasins)"
5
- SOAP webservices available,"Les SOAP webservices sont disponibles"
6
- SOAP was not found on this server,"SOAP n&apos;a pas &eacute;t&eacute; trouv&eacute; sur ce serveur"
7
- %s paymentmethods in database,"%s modes de paiement dans la base de donn&eacute;es"
8
- %s paymentmethods stored for this Store view,"%s modes de paiement pour cet affichage de magasin"
9
- %s paymentmethods stored in Default settings,"%s modes de paiement sauvegard&eacute;s dans les param&egrave;tres par d&eacute;faut"
10
- No active paymentmethods found,"Aucun mode de paiement actif n&apos;a &eacute;t&eacute; trouv&eacute;."
11
- SOAP connection established,"Connexion SOAP &eacute;tablie"
12
- %s active paymentmethods found,"%s modes de paiement actifs trouv&eacute;s"
13
- Configure,"Configuration"
14
- Title,"Titre"
15
- Settings,"Param&egrave;tres"
16
- Settings for,"Param&egrave;tres pour"
17
- Sort order,"Trier l&apos;ordre"
18
- Get paymentmethods,"Obtenir les modes de paiement"
19
- Paymentmethod,"Mode de paiement"
20
- Save Config to configure,"Sauvegarder la configuration pour param&eacute;trer le mode de paiement"
21
- Please read the advanced manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Besoin d&apos;aide pour la configuration ? Consultez notre mode d&apos;emploi ou visionnez la vid&eacute;o d&apos;installation.</span>
22
- Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Certains modes de paiement autorisent une description d&eacute;taill&eacute;e dans la liste de transactions du client. Si le champ est laiss&eacute; vierge, l&apos;ID Commande Magento sera utilis&eacute;e."
23
- Description displayed in checkout,"Description pendant le paiement."
24
- Save settings,"Sauvegarder les param&egrave;tres"
25
- Cancel,"Annuler"
26
- Use CTRL to activate/deactivate specific issuers,"Taper CTRL pour activer ou d&eacute;sactiver les issuers sp&eacute;cifiques. S&eacute;lectionner au moins 1 issuer."
27
- Use CTRL to select specific countries,"Taper CTRL pour s&eacute;lectionner des pays sp&eacute;cifiques."
28
-
29
- /*frontend*/
30
- Please select an issuer,"S&eacute;lectionnez un utilisateur"
31
- Please select a country,"S&eacute;lectionnez un pays"
1
+ /*adminhtml*/
2
+ Paymentmethods,"Modes de paiement"
3
+ Filter paymentmethods on customer billing country,"Filtrer les modes de paiement d&apos;apr&egrave;s l&apos;adresse de paiement du client"
4
+ Configure ICEPAY paymentmethods [STORE VIEW],"Configurer les modes de paiement ICEPAY en utilisant la fonction Store View (affichage de magasins)"
5
+ SOAP webservices available,"Les SOAP webservices sont disponibles"
6
+ SOAP was not found on this server,"SOAP n&apos;a pas &eacute;t&eacute; trouv&eacute; sur ce serveur"
7
+ %s paymentmethods in database,"%s modes de paiement dans la base de donn&eacute;es"
8
+ %s paymentmethods stored for this Store view,"%s modes de paiement pour cet affichage de magasin"
9
+ %s paymentmethods stored in Default settings,"%s modes de paiement sauvegard&eacute;s dans les param&egrave;tres par d&eacute;faut"
10
+ No active paymentmethods found,"Aucun mode de paiement actif n&apos;a &eacute;t&eacute; trouv&eacute;."
11
+ SOAP connection established,"Connexion SOAP &eacute;tablie"
12
+ %s active paymentmethods found,"%s modes de paiement actifs trouv&eacute;s"
13
+ Configure,"Configuration"
14
+ Title,"Titre"
15
+ Settings,"Param&egrave;tres"
16
+ Settings for,"Param&egrave;tres pour"
17
+ Sort order,"Trier l&apos;ordre"
18
+ Get paymentmethods,"Obtenir les modes de paiement"
19
+ Paymentmethod,"Mode de paiement"
20
+ Save Config to configure,"Sauvegarder la configuration pour param&eacute;trer le mode de paiement"
21
+ Please read the advanced manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Besoin d&apos;aide pour la configuration ? Consultez notre mode d&apos;emploi ou visionnez la vid&eacute;o d&apos;installation.</span>
22
+ Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Certains modes de paiement autorisent une description d&eacute;taill&eacute;e dans la liste de transactions du client. Si le champ est laiss&eacute; vierge, l&apos;ID Commande Magento sera utilis&eacute;e."
23
+ Description displayed in checkout,"Description pendant le paiement."
24
+ Save settings,"Sauvegarder les param&egrave;tres"
25
+ Cancel,"Annuler"
26
+ Use CTRL to activate/deactivate specific issuers,"Taper CTRL pour activer ou d&eacute;sactiver les issuers sp&eacute;cifiques. S&eacute;lectionner au moins 1 issuer."
27
+ Use CTRL to select specific countries,"Taper CTRL pour s&eacute;lectionner des pays sp&eacute;cifiques."
28
+
29
+ /*frontend*/
30
+ Please select an issuer,"S&eacute;lectionnez un utilisateur"
31
+ Please select a country,"S&eacute;lectionnez un pays"
app/locale/fr_FR/Icepay_IceCore.csv CHANGED
@@ -1,61 +1,61 @@
1
- /*headers*/
2
- Set-up configuration,"Configuration de l&apos;installation"
3
- Installed modules,"Modules install&eacute;s"
4
-
5
- /*tooltips*/
6
- Copy the Merchant ID from your ICEPAY account.,"Copiez le Merchant ID de votre ICEPAY merchant account"
7
- Copy the Secret Code from your ICEPAY account.,"Copiez le Secret Code de votre ICEPAY merchant account"
8
- Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.,"Copiez et collez cette URL vers le champ de la page Remerciements de votre (nouveau) ICEPAY merchant website"
9
- Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.,"Copiez et collez cette URL vers le champ de la page Message d&apos;erreur de votre (nouveau) ICEPAY merchant website"
10
- Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.,"Copiez et collez cette URL vers le champ de la page Postback (notification) de votre (nouveau) ICEPAY merchant website"
11
-
12
- /*labels*/
13
- Merchant ID,"Merchant ID"
14
- Secret Code,"Secret Code"
15
- URL for Success,"Page Remerciements"
16
- URL for Error,"Page Message d&apos;erreur"
17
- URL for Postback/Notify,"URL de Postback"
18
- Auto invoice,"Facturation automatique"
19
- Description on transaction statement of customer,"Description sur le r&eacute;capitulatif de la transaction du client"
20
- Please read the core manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Besoin d&apos;aide pour la configuration ? Consultez notre mode d&apos;emploi ou visionnez la vid&eacute;o d&apos;installation.</span>
21
-
22
- /*comments*/
23
- Step 1.,"&eacute;tape 1."
24
- Step 2.,"&eacute;tape 2."
25
- This configuration section is for implementing ICEPAY, please do not change these settings after saving.,"This configuration section is for implementing your <a href="https://www.icepay.com/NL/Login?origin=magento_admin" target="blank">ICEPAY Merchant website</a>. Veuillez ne pas modifier ces param&egrave;tres apr&egrave;s la sauvegarde."
26
- Configuration Information,"Informations concernant la configuration"
27
- This is an overview of installed ICEPAY modules,"Voici un r&eacute;capitulatif des modules ICEPAY install&eacute;s"
28
- Have Magento create the invoice automatically when payment has been completed.,"Laisser Magento g&eacute;n&eacute;rer automatiquement la facture d&egrave;s que le paiement a &eacute;t&eacute; transf&eacute;r&eacute;."
29
-
30
- /*notifications*/
31
- Merchant ID is properly configured,"Merchant ID est correctement configur&eacute;"
32
- Merchant ID not set for this storeview,"Merchant ID n&apos;est pas r&eacute;gl&eacute; pour cet affichage de magasin"
33
- Merchant ID does not contain 5 digits,"Merchant ID ne contient pas 5 chiffres"
34
- Merchant ID is not numeric,"Merchant ID ne correspond pas � un nombre"
35
- SecretCode is properly configured,"Secret Code est correctement configur&eacute;"
36
- SecretCode not set for this storeview,"Secret Code n&apos;est pas r&eacute;gl&eacute; pour cet affichage de magasin"
37
- SecretCode does not contain 40 characters,"Secret Code ne contient pas les 40 caract&egrave;res exig&eacute;s"
38
-
39
- /*statuscodes*/
40
- Awaiting payment,"En attente de paiement"
41
- Payment received,"Paiement r&eacute;ceptionn&eacute;"
42
- Payment error,"Erreur lors du paiement"
43
- Payment refund request,"Demande de remboursement de paiement"
44
- Payment chargeback request,"Demande de r&eacute;trofacturation"
45
-
46
- /*statement*/
47
- icepay_about_line1,"ICEPAY est un fournisseur n&eacute;erlandais de services de paiement qui assure les paiements en ligne pour des tiers. Lorsqu&apos;un consommateur proc&egrave;de au paiement au propri&eacute;taire de cette boutique en ligne (un client d&apos;ICEPAY), le paiement est tout d&apos;abord transf&eacute;r&eacute; � ICEPAY (ou la soci&eacute;t&eacute; Escrow ICEPAY) et ICEPAY se charge du paiement de votre transaction au propri&eacute;taire de la boutique en ligne."
48
- icepay_about_line2,"ICEPAY est donc un interm&eacute;diaire et n&apos;intervient donc pas dans la livraison des produits ou services que vous avez command&eacute;s. En cas de questions concernant la livraison/l&apos;annulation/le remboursement de votre commande, nous vous recommandons de contacter la boutique en ligne concern&eacute;e."
49
- icepay_about_line3,"Votre paiement est s&eacute;curis&eacute; de diff&eacute;rentes mani&egrave;res par ICEPAY, car :"
50
- icepay_about_currence,"ICEPAY poss&egrave;de une certification iDEAL attribu&eacute;e par<a href=&acute;http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx&acute; target=&acute;_blank&acute;>Currence</a>(propri&eacute;taire d&apos;iDEAL). ICEPAY satisfait ainsi aux exigences impos&eacute;es par Currence entre autres dans le domaine de la technologie, de la s&eacute;curit&eacute; et de la fiabilit&eacute;.";"
51
- icepay_about_thawte","ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving";"
52
- icepay_about_thuiswinkel","ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
53
- icepay_about_link,"<a href=&acute;http://www.icepay.com&acute; target=&acute;_blank&acute;>Visitez le site Web ICEPAY</a>"
54
-
55
- /*frontend*/
56
- Redirecting...,"Veuillez patienter, vous allez �tre redirig&eacute;..."
57
-
58
- /* postback */
59
- Status of order changed,"Le statut de la commande a &eacute;t&eacute; modifi&eacute;"
60
- Customer returned with status: %s,"Retour du client avec le statut : %s"
61
- The payment provider has returned the following error message: %s,"Le fournisseur de paiement a publi&eacute; le message d&apos;erreur suivant : %s"
1
+ /*headers*/
2
+ Set-up configuration,"Configuration de l&apos;installation"
3
+ Installed modules,"Modules install&eacute;s"
4
+
5
+ /*tooltips*/
6
+ Copy the Merchant ID from your ICEPAY account.,"Copiez le Merchant ID de votre ICEPAY merchant account"
7
+ Copy the Secret Code from your ICEPAY account.,"Copiez le Secret Code de votre ICEPAY merchant account"
8
+ Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.,"Copiez et collez cette URL vers le champ de la page Remerciements de votre (nouveau) ICEPAY merchant website"
9
+ Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.,"Copiez et collez cette URL vers le champ de la page Message d&apos;erreur de votre (nouveau) ICEPAY merchant website"
10
+ Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.,"Copiez et collez cette URL vers le champ de la page Postback (notification) de votre (nouveau) ICEPAY merchant website"
11
+
12
+ /*labels*/
13
+ Merchant ID,"Merchant ID"
14
+ Secret Code,"Secret Code"
15
+ URL for Success,"Page Remerciements"
16
+ URL for Error,"Page Message d&apos;erreur"
17
+ URL for Postback/Notify,"URL de Postback"
18
+ Auto invoice,"Facturation automatique"
19
+ Description on transaction statement of customer,"Description sur le r&eacute;capitulatif de la transaction du client"
20
+ Please read the core manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Besoin d&apos;aide pour la configuration ? Consultez notre mode d&apos;emploi ou visionnez la vid&eacute;o d&apos;installation.</span>
21
+
22
+ /*comments*/
23
+ Step 1.,"&eacute;tape 1."
24
+ Step 2.,"&eacute;tape 2."
25
+ This configuration section is for implementing ICEPAY, please do not change these settings after saving.,"This configuration section is for implementing your <a href="https://www.icepay.com/NL/Login?origin=magento_admin" target="blank">ICEPAY Merchant website</a>. Veuillez ne pas modifier ces param&egrave;tres apr&egrave;s la sauvegarde."
26
+ Configuration Information,"Informations concernant la configuration"
27
+ This is an overview of installed ICEPAY modules,"Voici un r&eacute;capitulatif des modules ICEPAY install&eacute;s"
28
+ Have Magento create the invoice automatically when payment has been completed.,"Laisser Magento g&eacute;n&eacute;rer automatiquement la facture d&egrave;s que le paiement a &eacute;t&eacute; transf&eacute;r&eacute;."
29
+
30
+ /*notifications*/
31
+ Merchant ID is properly configured,"Merchant ID est correctement configur&eacute;"
32
+ Merchant ID not set for this storeview,"Merchant ID n&apos;est pas r&eacute;gl&eacute; pour cet affichage de magasin"
33
+ Merchant ID does not contain 5 digits,"Merchant ID ne contient pas 5 chiffres"
34
+ Merchant ID is not numeric,"Merchant ID ne correspond pas � un nombre"
35
+ SecretCode is properly configured,"Secret Code est correctement configur&eacute;"
36
+ SecretCode not set for this storeview,"Secret Code n&apos;est pas r&eacute;gl&eacute; pour cet affichage de magasin"
37
+ SecretCode does not contain 40 characters,"Secret Code ne contient pas les 40 caract&egrave;res exig&eacute;s"
38
+
39
+ /*statuscodes*/
40
+ Awaiting payment,"En attente de paiement"
41
+ Payment received,"Paiement r&eacute;ceptionn&eacute;"
42
+ Payment error,"Erreur lors du paiement"
43
+ Payment refund request,"Demande de remboursement de paiement"
44
+ Payment chargeback request,"Demande de r&eacute;trofacturation"
45
+
46
+ /*statement*/
47
+ icepay_about_line1,"ICEPAY est un fournisseur n&eacute;erlandais de services de paiement qui assure les paiements en ligne pour des tiers. Lorsqu&apos;un consommateur proc&egrave;de au paiement au propri&eacute;taire de cette boutique en ligne (un client d&apos;ICEPAY), le paiement est tout d&apos;abord transf&eacute;r&eacute; � ICEPAY (ou la soci&eacute;t&eacute; Escrow ICEPAY) et ICEPAY se charge du paiement de votre transaction au propri&eacute;taire de la boutique en ligne."
48
+ icepay_about_line2,"ICEPAY est donc un interm&eacute;diaire et n&apos;intervient donc pas dans la livraison des produits ou services que vous avez command&eacute;s. En cas de questions concernant la livraison/l&apos;annulation/le remboursement de votre commande, nous vous recommandons de contacter la boutique en ligne concern&eacute;e."
49
+ icepay_about_line3,"Votre paiement est s&eacute;curis&eacute; de diff&eacute;rentes mani&egrave;res par ICEPAY, car :"
50
+ icepay_about_currence,"ICEPAY poss&egrave;de une certification iDEAL attribu&eacute;e par<a href=&acute;http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx&acute; target=&acute;_blank&acute;>Currence</a>(propri&eacute;taire d&apos;iDEAL). ICEPAY satisfait ainsi aux exigences impos&eacute;es par Currence entre autres dans le domaine de la technologie, de la s&eacute;curit&eacute; et de la fiabilit&eacute;.";"
51
+ icepay_about_thawte","ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving";"
52
+ icepay_about_thuiswinkel","ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
53
+ icepay_about_link,"<a href=&acute;http://www.icepay.com&acute; target=&acute;_blank&acute;>Visitez le site Web ICEPAY</a>"
54
+
55
+ /*frontend*/
56
+ Redirecting...,"Veuillez patienter, vous allez �tre redirig&eacute;..."
57
+
58
+ /* postback */
59
+ Status of order changed,"Le statut de la commande a &eacute;t&eacute; modifi&eacute;"
60
+ Customer returned with status: %s,"Retour du client avec le statut : %s"
61
+ The payment provider has returned the following error message: %s,"Le fournisseur de paiement a publi&eacute; le message d&apos;erreur suivant : %s"
app/locale/it_IT/Icepay_IceAdvanced.csv CHANGED
@@ -1,31 +1,31 @@
1
- /*adminhtml*/
2
- Paymentmethods,"Metodi di pagamento"
3
- Filter paymentmethods on customer billing country,"Filtri i metodi di pagamento sull'indirizzo di pagamento del cliente"
4
- Configure ICEPAY paymentmethods [STORE VIEW],"Configuri i metodi di pagamento ICEPAY, pu&ograve; farlo con Store View (panoramica del negozio)"
5
- SOAP webservices available,"I webservice SOAP sono disponibili"
6
- SOAP was not found on this server,"SOAP non &Egrave; stato trovato su questo server"
7
- %s paymentmethods in database,"%s metodi di pagamento nel database"
8
- %s paymentmethods stored for this Store view,"%s metodi di pagamento salvati per questa panoramica del negozio"
9
- %s paymentmethods stored in Default settings,"%s metodi di pagamento salvati nelle impostazioni predefinite"
10
- No active paymentmethods found,"Non &Egrave; stato trovato alcun metodo di pagamento"
11
- SOAP connection established,"Connessione con SOAP effettuata"
12
- %s active paymentmethods found,"Trovati %s metodi di pagamento attivi"
13
- Configure,"Configura"
14
- Title,"Titolo"
15
- Settings,"Impostazioni"
16
- Settings for,"Impostazioni per"
17
- Sort order,"Seleziona la sequenza"
18
- Get paymentmethods,"Ritiri i metodi di pagamento"
19
- Paymentmethod,"Metodo di pagamento"
20
- Save Config to configure,"Salvi le modifiche per configurare ulteriormente il metodo di pagamento"
21
- Please read the advanced manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Ha bisogno di aiuto per l'impostazione? Consulti il nostro manuale o il video di installazione.</span>
22
- Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Alcuni metodi di pagamento permettono l'utilizzo di una descrizione nel resoconto della transazione del cliente. Se lasciato vuoto, verr&agrave; utilizzato l'ID dell'Ordinazione di Magento."
23
- Description displayed in checkout,"Descrizione visualizzata al momento del saldo "
24
- Save settings,"Salva le impostazioni"
25
- Cancel,"Annulla"
26
- Use CTRL to activate/deactivate specific issuers,"Utilizzi CTRL per attivare/disattivare issuer specifici. &Egrave; necessario selezionare almeno 1 issuer."
27
- Use CTRL to select specific countries,"Utilizzi CTRL per selezionare paesi specifici."
28
-
29
- /*frontend*/
30
- Please select an issuer,"Faccia la sua scelta"
31
- Please select a country,"Faccia la sua scelta tra"
1
+ /*adminhtml*/
2
+ Paymentmethods,"Metodi di pagamento"
3
+ Filter paymentmethods on customer billing country,"Filtri i metodi di pagamento sull'indirizzo di pagamento del cliente"
4
+ Configure ICEPAY paymentmethods [STORE VIEW],"Configuri i metodi di pagamento ICEPAY, pu&ograve; farlo con Store View (panoramica del negozio)"
5
+ SOAP webservices available,"I webservice SOAP sono disponibili"
6
+ SOAP was not found on this server,"SOAP non &Egrave; stato trovato su questo server"
7
+ %s paymentmethods in database,"%s metodi di pagamento nel database"
8
+ %s paymentmethods stored for this Store view,"%s metodi di pagamento salvati per questa panoramica del negozio"
9
+ %s paymentmethods stored in Default settings,"%s metodi di pagamento salvati nelle impostazioni predefinite"
10
+ No active paymentmethods found,"Non &Egrave; stato trovato alcun metodo di pagamento"
11
+ SOAP connection established,"Connessione con SOAP effettuata"
12
+ %s active paymentmethods found,"Trovati %s metodi di pagamento attivi"
13
+ Configure,"Configura"
14
+ Title,"Titolo"
15
+ Settings,"Impostazioni"
16
+ Settings for,"Impostazioni per"
17
+ Sort order,"Seleziona la sequenza"
18
+ Get paymentmethods,"Ritiri i metodi di pagamento"
19
+ Paymentmethod,"Metodo di pagamento"
20
+ Save Config to configure,"Salvi le modifiche per configurare ulteriormente il metodo di pagamento"
21
+ Please read the advanced manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Ha bisogno di aiuto per l'impostazione? Consulti il nostro manuale o il video di installazione.</span>
22
+ Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Alcuni metodi di pagamento permettono l'utilizzo di una descrizione nel resoconto della transazione del cliente. Se lasciato vuoto, verr&agrave; utilizzato l'ID dell'Ordinazione di Magento."
23
+ Description displayed in checkout,"Descrizione visualizzata al momento del saldo "
24
+ Save settings,"Salva le impostazioni"
25
+ Cancel,"Annulla"
26
+ Use CTRL to activate/deactivate specific issuers,"Utilizzi CTRL per attivare/disattivare issuer specifici. &Egrave; necessario selezionare almeno 1 issuer."
27
+ Use CTRL to select specific countries,"Utilizzi CTRL per selezionare paesi specifici."
28
+
29
+ /*frontend*/
30
+ Please select an issuer,"Faccia la sua scelta"
31
+ Please select a country,"Faccia la sua scelta tra"
app/locale/it_IT/Icepay_IceCore.csv CHANGED
@@ -1,61 +1,61 @@
1
- /*headers*/
2
- Set-up configuration,"Configurazione dell'installazione"
3
- Installed modules,"Moduli installati"
4
-
5
- /*tooltips*/
6
- Copy the Merchant ID from your ICEPAY account.,"Copi il Merchant ID del suo ICEPAY merchant account"
7
- Copy the Secret Code from your ICEPAY account.,"Copi il Secret Code del suo ICEPAY merchant account"
8
- Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.,"Copi e incolli questo URL nel campo della Pagina di ringraziamento del suo (nuovo) ICEPAY merchant website"
9
- Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.,"Copi e incolli questo URL nel campo della Pagina di errore del suo (nuovo) ICEPAY merchant website"
10
- Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.,"Copi e incolli questo URL nel campo della Pagina di Postback del suo (nuovo) ICEPAY merchant website"
11
-
12
- /*labels*/
13
- Merchant ID,"Merchant ID"
14
- Secret Code,"Secret Code"
15
- URL for Success,"Pagina di ringraziamento"
16
- URL for Error,"Pagina di errore"
17
- URL for Postback/Notify,"URL di Postback"
18
- Auto invoice,"Fatturazione automatica"
19
- Description on transaction statement of customer,"Descrizione sul resoconto della transazione del cliente"
20
- Please read the core manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Ha bisogno di aiuto per l'impostazione? Consulti il nostro manuale o il video di installazione.</span>
21
-
22
- /*comments*/
23
- Step 1.,"Passo 1"
24
- Step 2.,"Passo 2"
25
- This configuration section is for implementing ICEPAY, please do not change these settings after saving.,"This configuration section is for implementing your <a href="https://www.icepay.com/NL/Login?origin=magento_admin" target="blank">ICEPAY Merchant website</a>. Una volta salvate la preghiamo di non cambiare queste impostazioni. "
26
- Configuration Information,"Informazioni sulla configurazione"
27
- This is an overview of installed ICEPAY modules,"Questa &egrave; una panoramica dei moduli ICEPAY installati"
28
- Have Magento create the invoice automatically when payment has been completed.,"Lasci che Magenta crei automaticamente la fattura una volta completato il pagamento."
29
-
30
- /*notifications*/
31
- Merchant ID is properly configured,"Merchant ID &egrave; stato configurato correttamente"
32
- Merchant ID not set for this storeview,"Merchant ID non &egrave; configurato in questa panoramica del negozio"
33
- Merchant ID does not contain 5 digits,"Merchant ID non contiene le 5 cifre necessarie"
34
- Merchant ID is not numeric,"Merchant ID non &egrave; numerico"
35
- SecretCode is properly configured,"Secret Code &egrave; stato configurato correttamente"
36
- SecretCode not set for this storeview,"Secret Code non &egrave; configurato in questa panoramica del negozio"
37
- SecretCode does not contain 40 characters,"Secret Code non contiene i 40 caratteri necessari"
38
-
39
- /*statuscodes*/
40
- Awaiting payment,"In attesa di pagamento"
41
- Payment received,"Pagamento ricevuto"
42
- Payment error,"Errore nel pagamento"
43
- Payment refund request,"Richiesta di rimborso"
44
- Payment chargeback request,"Richiesta di chargeback"
45
-
46
- /*statement*/
47
- icepay_about_line1,"ICEPAY &egrave; un Service Provider di Pagamenti olandese che si occupa dei pagamenti per terzi. Quando lei come consumatore effettua un pagamento al proprietario di questo webshop (un cliente di ICEPAY), il pagamento viene prima ricevuto da ICEPAY (o fondazione Escrow ICEPAY) e ICEPAY fa in modo che la sua transazione venga pagata al proprietario del webshop."
48
- icepay_about_line2,"ICEPAY &egrave; perci&ograve; un intermediario e non ha alcuna influenza sulla consegna dei prodotti o dei servizi da lei ordinati. Se ha delle domande sulla consegna/l'annullamento/il rimborso della sua ordinazione, allora le consigliamo di mettersi in contatto con il webshop."
49
- icepay_about_line3,"Il suo pagamento &egrave; assicurato in diversi modi da ICEPAY poich� "
50
- icepay_about_currence,"ICEPAY &egrave; in possesso di una Certificazione iDEAL di <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a>(proprietario di iDEAL). In questo modo ICEPAY risponde ai requisiti richiesti da Currence riguardanti, tra le altre cose, la tecnica, la sicurezza e l'affidabilit�.";"
51
- icepay_about_thawte","ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving";"
52
- icepay_about_thuiswinkel","ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
53
- icepay_about_link,"<a href='http://www.icepay.com' target='_blank'>Visiti il sito web ICEPAY</a>"
54
-
55
- /*frontend*/
56
- Redirecting...,"Attenda un attimo per favore"
57
-
58
- /* postback */
59
- Status of order changed,"Lo status dell'ordinazione &egrave; cambiato"
60
- Customer returned with status: %s,"Il cliente &egrave; ritornato con lo status: %s"
61
- The payment provider has returned the following error message: %s,"Il provider dei pagamenti ha inviato il seguente messaggio di errore: %s"
1
+ /*headers*/
2
+ Set-up configuration,"Configurazione dell'installazione"
3
+ Installed modules,"Moduli installati"
4
+
5
+ /*tooltips*/
6
+ Copy the Merchant ID from your ICEPAY account.,"Copi il Merchant ID del suo ICEPAY merchant account"
7
+ Copy the Secret Code from your ICEPAY account.,"Copi il Secret Code del suo ICEPAY merchant account"
8
+ Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.,"Copi e incolli questo URL nel campo della Pagina di ringraziamento del suo (nuovo) ICEPAY merchant website"
9
+ Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.,"Copi e incolli questo URL nel campo della Pagina di errore del suo (nuovo) ICEPAY merchant website"
10
+ Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.,"Copi e incolli questo URL nel campo della Pagina di Postback del suo (nuovo) ICEPAY merchant website"
11
+
12
+ /*labels*/
13
+ Merchant ID,"Merchant ID"
14
+ Secret Code,"Secret Code"
15
+ URL for Success,"Pagina di ringraziamento"
16
+ URL for Error,"Pagina di errore"
17
+ URL for Postback/Notify,"URL di Postback"
18
+ Auto invoice,"Fatturazione automatica"
19
+ Description on transaction statement of customer,"Descrizione sul resoconto della transazione del cliente"
20
+ Please read the core manual,"<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Ha bisogno di aiuto per l'impostazione? Consulti il nostro manuale o il video di installazione.</span>
21
+
22
+ /*comments*/
23
+ Step 1.,"Passo 1"
24
+ Step 2.,"Passo 2"
25
+ This configuration section is for implementing ICEPAY, please do not change these settings after saving.,"This configuration section is for implementing your <a href="https://www.icepay.com/NL/Login?origin=magento_admin" target="blank">ICEPAY Merchant website</a>. Una volta salvate la preghiamo di non cambiare queste impostazioni. "
26
+ Configuration Information,"Informazioni sulla configurazione"
27
+ This is an overview of installed ICEPAY modules,"Questa &egrave; una panoramica dei moduli ICEPAY installati"
28
+ Have Magento create the invoice automatically when payment has been completed.,"Lasci che Magenta crei automaticamente la fattura una volta completato il pagamento."
29
+
30
+ /*notifications*/
31
+ Merchant ID is properly configured,"Merchant ID &egrave; stato configurato correttamente"
32
+ Merchant ID not set for this storeview,"Merchant ID non &egrave; configurato in questa panoramica del negozio"
33
+ Merchant ID does not contain 5 digits,"Merchant ID non contiene le 5 cifre necessarie"
34
+ Merchant ID is not numeric,"Merchant ID non &egrave; numerico"
35
+ SecretCode is properly configured,"Secret Code &egrave; stato configurato correttamente"
36
+ SecretCode not set for this storeview,"Secret Code non &egrave; configurato in questa panoramica del negozio"
37
+ SecretCode does not contain 40 characters,"Secret Code non contiene i 40 caratteri necessari"
38
+
39
+ /*statuscodes*/
40
+ Awaiting payment,"In attesa di pagamento"
41
+ Payment received,"Pagamento ricevuto"
42
+ Payment error,"Errore nel pagamento"
43
+ Payment refund request,"Richiesta di rimborso"
44
+ Payment chargeback request,"Richiesta di chargeback"
45
+
46
+ /*statement*/
47
+ icepay_about_line1,"ICEPAY &egrave; un Service Provider di Pagamenti olandese che si occupa dei pagamenti per terzi. Quando lei come consumatore effettua un pagamento al proprietario di questo webshop (un cliente di ICEPAY), il pagamento viene prima ricevuto da ICEPAY (o fondazione Escrow ICEPAY) e ICEPAY fa in modo che la sua transazione venga pagata al proprietario del webshop."
48
+ icepay_about_line2,"ICEPAY &egrave; perci&ograve; un intermediario e non ha alcuna influenza sulla consegna dei prodotti o dei servizi da lei ordinati. Se ha delle domande sulla consegna/l'annullamento/il rimborso della sua ordinazione, allora le consigliamo di mettersi in contatto con il webshop."
49
+ icepay_about_line3,"Il suo pagamento &egrave; assicurato in diversi modi da ICEPAY poich� "
50
+ icepay_about_currence,"ICEPAY &egrave; in possesso di una Certificazione iDEAL di <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a>(proprietario di iDEAL). In questo modo ICEPAY risponde ai requisiti richiesti da Currence riguardanti, tra le altre cose, la tecnica, la sicurezza e l'affidabilit�.";"
51
+ icepay_about_thawte","ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving";"
52
+ icepay_about_thuiswinkel","ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
53
+ icepay_about_link,"<a href='http://www.icepay.com' target='_blank'>Visiti il sito web ICEPAY</a>"
54
+
55
+ /*frontend*/
56
+ Redirecting...,"Attenda un attimo per favore"
57
+
58
+ /* postback */
59
+ Status of order changed,"Lo status dell'ordinazione &egrave; cambiato"
60
+ Customer returned with status: %s,"Il cliente &egrave; ritornato con lo status: %s"
61
+ The payment provider has returned the following error message: %s,"Il provider dei pagamenti ha inviato il seguente messaggio di errore: %s"
app/locale/nl_NL/Icepay_IceAdvanced.csv CHANGED
@@ -1,37 +1,37 @@
1
- /*adminhtml*/
2
- "Paymentmethods,"Betaalmethoden"
3
- "Filter paymentmethods on customer billing country,"Filter de betaalmethoden op het betaaladres van de klant"
4
- "Configure ICEPAY paymentmethods [STORE VIEW],"Configureer ICEPAY Betaalmethoden, dit kunt u doen per Store View (winkel overzicht)"
5
- "SOAP webservices available,"SOAP webservices zijn beschikbaar"
6
- "SOAP was not found on this server,"SOAP is niet gevonden op deze server"
7
- "%s paymentmethods in database,"%s betaalmethoden in database"
8
- "%s paymentmethods stored for this Store view,"%s betaalmethoden opgeslagen voor dit winkel overzicht"
9
- "%s paymentmethods stored in Default settings,"%s betaalmethoden opgeslagen bij de standaard instellingen"
10
- "No active paymentmethods found,"Geen betaalmethoden gevonden"
11
- "SOAP connection established,"SOAP connectie gemaakt"
12
- "%s active paymentmethods found,"%s actieve betaalmethoden gevonden"
13
- "Configure,"Instellen"
14
- "Title,"Titel"
15
- "Settings,"Instellingen"
16
- "Settings for,"Instellingen voor"
17
- "Sort order,"Sorteer volgorde"
18
- "Get paymentmethods,"Haal de betaalmethoden op"
19
- "Paymentmethod,"Betaalmethode"
20
- "Save Config to configure,"Sla de wijzigingen op om de betaalmethode verder in te stellen"
21
- "Please read the advanced manual","<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Hulp nodig? Bekijk onze handleiding of installatie video!</span>
22
- "Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Enkele betaalmethoden ondersteunen een omschrijving in het transactie overzicht van de klant. Indien leeg gelaten wordt het Magento Bestel ID gebruikt."
23
- "Description displayed in checkout,"Omschrijving tijdens het afrekenen."
24
- "Save settings,"Instellingen opslaan"
25
- "Cancel,"Annuleer"
26
- "Use CTRL to activate/deactivate specific issuers,"Gebruik CTRL om specifieke issuers aan- of uit te schakelen. Minimaal 1 issuer dient geselecteerd te zijn."
27
- "Use CTRL to select specific countries,"Gebruik CTRL om specifieke landen te selecteren."
28
-
29
- /*frontend*/
30
- "Please select an issuer,"Maak uw keuze"
31
- "Please select a country,"Maak uw keuze uit"
32
-
33
- /*frontend-errors*/
34
- "It seems your billing address is incorrect, please confirm the postal code.", "Het lijkt erop dat de postcode van uw factuuradres fout is."
35
- "It seems your billing address is incorrect, please confirm the phonenumber.", "Het lijkt erop dat het telefoonnummber van uw factuuradres fout is."
36
- "It seems your billing address is incorrect, please confirm the street and housenumber.", "Het lijkt erop dat de straat en/of het huisnummer van uw factuuradres fout is ingevuld."
37
  "It seems your shipping address is incorrect, please confirm the street and housenumber.", "Het lijkt erop dat de straat en/of het huisnummer van uw verzendadres fout is ingevuld."
1
+ /*adminhtml*/
2
+ "Paymentmethods,"Betaalmethoden"
3
+ "Filter paymentmethods on customer billing country,"Filter de betaalmethoden op het betaaladres van de klant"
4
+ "Configure ICEPAY paymentmethods [STORE VIEW],"Configureer ICEPAY Betaalmethoden, dit kunt u doen per Store View (winkel overzicht)"
5
+ "SOAP webservices available,"SOAP webservices zijn beschikbaar"
6
+ "SOAP was not found on this server,"SOAP is niet gevonden op deze server"
7
+ "%s paymentmethods in database,"%s betaalmethoden in database"
8
+ "%s paymentmethods stored for this Store view,"%s betaalmethoden opgeslagen voor dit winkel overzicht"
9
+ "%s paymentmethods stored in Default settings,"%s betaalmethoden opgeslagen bij de standaard instellingen"
10
+ "No active paymentmethods found,"Geen betaalmethoden gevonden"
11
+ "SOAP connection established,"SOAP connectie gemaakt"
12
+ "%s active paymentmethods found,"%s actieve betaalmethoden gevonden"
13
+ "Configure,"Instellen"
14
+ "Title,"Titel"
15
+ "Settings,"Instellingen"
16
+ "Settings for,"Instellingen voor"
17
+ "Sort order,"Sorteer volgorde"
18
+ "Get paymentmethods,"Haal de betaalmethoden op"
19
+ "Paymentmethod,"Betaalmethode"
20
+ "Save Config to configure,"Sla de wijzigingen op om de betaalmethode verder in te stellen"
21
+ "Please read the advanced manual","<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-advanced.pdf' target="blank" class="btn-manual"></a> <a href="http://www.icepay.nl/webshop-modules/ideal-voor-magento-advanced" target="blank" class="btn-movie"></a><BR/><BR/><BR/><span class="manual-comment">Hulp nodig? Bekijk onze handleiding of installatie video!</span>
22
+ "Some payment methods allow customized descriptions on the transaction statement. If left empty the Magento Order ID is used. (Max 100 char.),"Enkele betaalmethoden ondersteunen een omschrijving in het transactie overzicht van de klant. Indien leeg gelaten wordt het Magento Bestel ID gebruikt."
23
+ "Description displayed in checkout,"Omschrijving tijdens het afrekenen."
24
+ "Save settings,"Instellingen opslaan"
25
+ "Cancel,"Annuleer"
26
+ "Use CTRL to activate/deactivate specific issuers,"Gebruik CTRL om specifieke issuers aan- of uit te schakelen. Minimaal 1 issuer dient geselecteerd te zijn."
27
+ "Use CTRL to select specific countries,"Gebruik CTRL om specifieke landen te selecteren."
28
+
29
+ /*frontend*/
30
+ "Please select an issuer,"Maak uw keuze"
31
+ "Please select a country,"Maak uw keuze uit"
32
+
33
+ /*frontend-errors*/
34
+ "It seems your billing address is incorrect, please confirm the postal code.", "Het lijkt erop dat de postcode van uw factuuradres fout is."
35
+ "It seems your billing address is incorrect, please confirm the phonenumber.", "Het lijkt erop dat het telefoonnummber van uw factuuradres fout is."
36
+ "It seems your billing address is incorrect, please confirm the street and housenumber.", "Het lijkt erop dat de straat en/of het huisnummer van uw factuuradres fout is ingevuld."
37
  "It seems your shipping address is incorrect, please confirm the street and housenumber.", "Het lijkt erop dat de straat en/of het huisnummer van uw verzendadres fout is ingevuld."
app/locale/nl_NL/Icepay_IceCore.csv CHANGED
@@ -1,64 +1,64 @@
1
- /*headers*/
2
- "Set-up configuration","Installatie configuratie"
3
- "Installed modules","Geïnstalleerde modules"
4
-
5
- /*tooltips*/
6
- "Copy the Merchant ID from your ICEPAY account.","Kopiëer de Merchant ID van uw ICEPAY merchant account"
7
- "Copy the Secret Code from your ICEPAY account.","Kopiëer de Secret Code van uw ICEPAY merchant account"
8
- "Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.","Kopiëer en plak deze URL naar het Bedanktpagina veld van uw (nieuwe) ICEPAY merchant website"
9
- "Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.","Kopiëer en plak deze URL naar het Foutmeldingspagina veld van uw (nieuwe) ICEPAY merchant website"
10
- "Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.","Kopiëer en plak deze URL naar het Postbackpagina veld van uw (nieuwe) ICEPAY merchant website"
11
-
12
- /*labels*/
13
- "Merchant ID","Merchant ID"
14
- "Secret Code","Secret Code"
15
- "URL for Success","Bedanktpagina"
16
- "URL for Error","Foutmeldingspagina"
17
- "URL for Postback/Notify","Postback URL"
18
- "Auto invoice","Automatische facturatie"
19
- "Description on transaction statement of customer","Omschrijving op het transactie overzicht van de klant"
20
- "Please read the core manual","<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target='blank' class='btn-manual'></a> <a href='http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target='blank" class='btn-movie'></a><BR/><BR/><BR/><span class='manual-comment'>Heeft u hulp nodig bij het instellen? Raadpleeg onze handleiding of installatie video.</span>
21
-
22
- /*comments*/
23
- "Step 1.","Stap 1."
24
- "Step 2.","Stap 2."
25
- "This configuration section is for implementing ICEPAY, please do not change these settings after saving.","Deze configuratie is voor het koppelen aan uw <a href='https://www.icepay.com/NL/Login?origin=magento_admin' target='blank'>ICEPAY Merchant website</a>. Pas deze instellingen niet meer aan nadat alles correct is opgeslagen."
26
- "Configuration Information","Informatie over de configuratie"
27
- "This is an overview of installed ICEPAY modules",""
28
- "Have Magento create the invoice automatically when payment has been completed.","Have Magento create the invoice automatically when payment has been completed."
29
- "Have Magento refund the ICEPAY transaction online when creating a credit memo.", "Have Magento refund the ICEPAY transaction online when creating a credit memo."
30
-
31
-
32
- /*notifications*/
33
- "Merchant ID is properly configured","Merchant ID is goed ingesteld"
34
- "Merchant ID not set for this storeview","Merchant ID is niet ingesteld in dit winkel overzicht"
35
- "Merchant ID does not contain 5 digits","Merchant ID bevat niet de vereiste 5 cijfers"
36
- "Merchant ID is not numeric","Merchant ID is geen getal"
37
- "SecretCode is properly configured","Secret Code is goed ingesteld"
38
- "SecretCode not set for this storeview","Secret Code is niet ingesteld in dit winkel overzicht"
39
- "SecretCode does not contain 40 characters","Secret Code bevat niet de vereiste 40 karakters"
40
-
41
- /*statuscodes*/
42
- "Awaiting payment","In afwachting van betaling"
43
- "Payment received","Betaling ontvangen"
44
- "Payment error","Fout bij betaling"
45
- "Payment refund request","Refund aanvraag"
46
- "Payment chargeback request","Chargeback aanvraag"
47
-
48
- /*statement*/
49
- "icepay_about_line1","ICEPAY is een Nederlandse Payment Service Provider die online betalingen verzorgt voor derden. Als u als consument een betaling doet aan de eigenaar van deze webshop (een klant van ICEPAY), gaat de betaling eerst naar ICEPAY (of stichting Escrow ICEPAY) en ICEPAY zorgt ervoor dat uw transactie aan de webshop eigenaar wordt uitbetaald."
50
- "icepay_about_line2","ICEPAY is dus een tussenpartij en heeft geen invloed op de levering van de door u bestelde producten of diensten. Mocht u vragen hebben over de levering/annulering/terugbetaling van uw bestelling, dan raden wij u aan om contact op te nemen met de webshop."
51
- "icepay_about_line3","Uw betaling is op verschillende manieren door ICEPAY beveiligd doordat:"
52
- "icepay_about_currence","ICEPAY een iDEAL Certificering van <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a> (eigenaar iDEAL) heeft. ICEPAY voldoet daarmee aan de gestelde eisen van Currence op het gebied van o.a. techniek, veiligheid en betrouwbaarheid;"
53
- "icepay_about_thawte","ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving;"
54
- "icepay_about_thuiswinkel","ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
55
- "icepay_about_link","<a href='http://www.icepay.com' target='_blank'>Bezoek de ICEPAY website</a>"
56
-
57
- /*frontend*/
58
- "Redirecting...","Een moment geduld a.u.b. U wordt doorgestuurd..."
59
-
60
- /* postback */
61
- "Status of order changed","De status van de bestelling is veranderd"
62
- "Customer returned with status: %s","Klant is teruggekeerd met status: %s"
63
- "The payment provider has returned the following error message: %s","De betaal provider heeft de volgende foutmelding gegeven: %s"
64
-
1
+ /*headers*/
2
+ "Set-up configuration","Installatie configuratie"
3
+ "Installed modules","Geïnstalleerde modules"
4
+
5
+ /*tooltips*/
6
+ "Copy the Merchant ID from your ICEPAY account.","Kopiëer de Merchant ID van uw ICEPAY merchant account"
7
+ "Copy the Secret Code from your ICEPAY account.","Kopiëer de Secret Code van uw ICEPAY merchant account"
8
+ "Copy-Paste this URL to the Success URL section of a (new) ICEPAY merchant account.","Kopiëer en plak deze URL naar het Bedanktpagina veld van uw (nieuwe) ICEPAY merchant website"
9
+ "Copy-Paste this URL to the Error URL section of a (new) ICEPAY merchant account.","Kopiëer en plak deze URL naar het Foutmeldingspagina veld van uw (nieuwe) ICEPAY merchant website"
10
+ "Copy-Paste this URL to the Postback URL section of a (new) ICEPAY merchant account.","Kopiëer en plak deze URL naar het Postbackpagina veld van uw (nieuwe) ICEPAY merchant website"
11
+
12
+ /*labels*/
13
+ "Merchant ID","Merchant ID"
14
+ "Secret Code","Secret Code"
15
+ "URL for Success","Bedanktpagina"
16
+ "URL for Error","Foutmeldingspagina"
17
+ "URL for Postback/Notify","Postback URL"
18
+ "Auto invoice","Automatische facturatie"
19
+ "Description on transaction statement of customer","Omschrijving op het transactie overzicht van de klant"
20
+ "Please read the core manual","<a href='http://www.icepay.com/downloads/pdf/manuals/magento/icepay-manual-magento-basic.pdf' target='blank' class='btn-manual'></a> <a href='http://www.icepay.nl/webshop-modules/ideal-voor-magento-basic" target='blank" class='btn-movie'></a><BR/><BR/><BR/><span class='manual-comment'>Heeft u hulp nodig bij het instellen? Raadpleeg onze handleiding of installatie video.</span>
21
+
22
+ /*comments*/
23
+ "Step 1.","Stap 1."
24
+ "Step 2.","Stap 2."
25
+ "This configuration section is for implementing ICEPAY, please do not change these settings after saving.","Deze configuratie is voor het koppelen aan uw <a href='https://www.icepay.com/NL/Login?origin=magento_admin' target='blank'>ICEPAY Merchant website</a>. Pas deze instellingen niet meer aan nadat alles correct is opgeslagen."
26
+ "Configuration Information","Informatie over de configuratie"
27
+ "This is an overview of installed ICEPAY modules",""
28
+ "Have Magento create the invoice automatically when payment has been completed.","Have Magento create the invoice automatically when payment has been completed."
29
+ "Have Magento refund the ICEPAY transaction online when creating a credit memo.", "Have Magento refund the ICEPAY transaction online when creating a credit memo."
30
+
31
+
32
+ /*notifications*/
33
+ "Merchant ID is properly configured","Merchant ID is goed ingesteld"
34
+ "Merchant ID not set for this storeview","Merchant ID is niet ingesteld in dit winkel overzicht"
35
+ "Merchant ID does not contain 5 digits","Merchant ID bevat niet de vereiste 5 cijfers"
36
+ "Merchant ID is not numeric","Merchant ID is geen getal"
37
+ "SecretCode is properly configured","Secret Code is goed ingesteld"
38
+ "SecretCode not set for this storeview","Secret Code is niet ingesteld in dit winkel overzicht"
39
+ "SecretCode does not contain 40 characters","Secret Code bevat niet de vereiste 40 karakters"
40
+
41
+ /*statuscodes*/
42
+ "Awaiting payment","In afwachting van betaling"
43
+ "Payment received","Betaling ontvangen"
44
+ "Payment error","Fout bij betaling"
45
+ "Payment refund request","Refund aanvraag"
46
+ "Payment chargeback request","Chargeback aanvraag"
47
+
48
+ /*statement*/
49
+ "icepay_about_line1","ICEPAY is een Nederlandse Payment Service Provider die online betalingen verzorgt voor derden. Als u als consument een betaling doet aan de eigenaar van deze webshop (een klant van ICEPAY), gaat de betaling eerst naar ICEPAY (of stichting Escrow ICEPAY) en ICEPAY zorgt ervoor dat uw transactie aan de webshop eigenaar wordt uitbetaald."
50
+ "icepay_about_line2","ICEPAY is dus een tussenpartij en heeft geen invloed op de levering van de door u bestelde producten of diensten. Mocht u vragen hebben over de levering/annulering/terugbetaling van uw bestelling, dan raden wij u aan om contact op te nemen met de webshop."
51
+ "icepay_about_line3","Uw betaling is op verschillende manieren door ICEPAY beveiligd doordat:"
52
+ "icepay_about_currence","ICEPAY een iDEAL Certificering van <a href='http://www.currence.nl/nl-NL/OverOnzeProducten/LicentieEnCertificaathouders/Pages/iDEAL.aspx' target='_blank'>Currence</a> (eigenaar iDEAL) heeft. ICEPAY voldoet daarmee aan de gestelde eisen van Currence op het gebied van o.a. techniek, veiligheid en betrouwbaarheid;"
53
+ "icepay_about_thawte","ICEPAY beschikt over de Thawte SSL certificering . Zo verkrijgt ICEPAY het hoogste niveau van authentificatie bij de afhandeling van een betaling. Dit betekent een gegarandeerd veilige betaalomgeving;"
54
+ "icepay_about_thuiswinkel","ICEPAY business partner van Thuiswinkel. org is. Dit verzekert u ervan dat ICEPAY strikte regels op gebied van informatieplicht, privacy, herroepingrecht en geschillenbeslechting naleeft."
55
+ "icepay_about_link","<a href='http://www.icepay.com' target='_blank'>Bezoek de ICEPAY website</a>"
56
+
57
+ /*frontend*/
58
+ "Redirecting...","Een moment geduld a.u.b. U wordt doorgestuurd..."
59
+
60
+ /* postback */
61
+ "Status of order changed","De status van de bestelling is veranderd"
62
+ "Customer returned with status: %s","Klant is teruggekeerd met status: %s"
63
+ "The payment provider has returned the following error message: %s","De betaal provider heeft de volgende foutmelding gegeven: %s"
64
+
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Icepay_IceAdvanced</name>
4
- <version>1.2.9</version>
5
  <stability>stable</stability>
6
  <license>Commercial</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Enables payments using payment service provider ICEPAY.</summary>
10
  <description>Enables payments using payment service provider ICEPAY.</description>
11
- <notes>Compatiblity with CE 1.9.2.1 and the SUPEE-6285 patch.</notes>
12
  <authors><author><name>ICEPAY</name><user>ICEPAY_PSP</user><email>info@icepay.com</email></author></authors>
13
- <date>2015-08-18</date>
14
- <time>21:23:46</time>
15
- <contents><target name="magecommunity"><dir name="Icepay"><dir name="IceAdvanced"><dir name="Block"><dir name="Adminhtml"><file name="CheckSettings.php" hash="1e9e08f5414b22dd84557ade567aba48"/><dir name="Grid"><file name="Paymentmethods.php" hash="143c90a3e15f72a4b32d3c57eefd8ecc"/></dir><dir name="Setting"><file name="Paymentmethod.php" hash="57ced6e44f2a7683898949d8e1ca21ba"/></dir></dir><dir name="Payment"><dir name="Form"><file name="Default.php" hash="f30a65638dea2fe9a0c0fa7beefbe062"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="909b314ba54be42dd8ec8687207954da"/></dir><dir name="Model"><dir name="Checkout"><file name="PaymentObject.php" hash="8cee8b70324b37453d6263d209dd5fe3"/><dir name="Placeholder"><file name="Paymentmethod01.php" hash="b825da0ac49ce5fba409116b2a46bf4f"/><file name="Paymentmethod02.php" hash="202eac322f5cd2df65034476d3e87dd5"/><file name="Paymentmethod03.php" hash="1f193436b77bed331837ab64d148c977"/><file name="Paymentmethod04.php" hash="3d4775f70070381a492b7207fce0d606"/><file name="Paymentmethod05.php" hash="16f86a94192131bddd0f078501c277d2"/><file name="Paymentmethod06.php" hash="113c6788b168790700d2baacbdbcb20c"/><file name="Paymentmethod07.php" hash="50635324e7913f864af6a32a65e299bb"/><file name="Paymentmethod08.php" hash="dba0bf1fb39667ff4b94dcea6821d372"/><file name="Paymentmethod09.php" hash="0029e9dcbb989ac4c6ae686b5d2db262"/><file name="Paymentmethod10.php" hash="94ff83c6d23c879f27c958de595bff3b"/><file name="Paymentmethod11.php" hash="4725cefbb4cdc69d12961853b4c00d13"/><file name="Paymentmethod12.php" hash="b82d7e8830a7b22f942496614d84f2ed"/><file name="Paymentmethod13.php" hash="43f18f4948afc2f7613b3ad47baa2577"/><file name="Paymentmethod14.php" hash="a04a63494d6e4df283049abfe35f57f8"/><file name="Paymentmethod15.php" hash="a5d02861c4668c74492b1865d471afdf"/><file name="Paymentmethod16.php" hash="a9d90c5414e27f814aa7b1ff1e212682"/><file name="Paymentmethod17.php" hash="e55127cbf73fecbb8ec66848f300c414"/><file name="Paymentmethod18.php" hash="388c76235c1c35a97ab8893d1f672807"/><file name="Paymentmethod19.php" hash="454f5142fb3e17152c137a052e13294c"/><file name="Paymentmethod20.php" hash="638b60e75678908fc92df8b1469a2500"/></dir><file name="Standard.php" hash="308741495eec0ccae20ec620d38ffba5"/></dir><dir name="Extensions"><dir name="MS"><file name="Customerreward.php" hash="e39bc48c00621f299b83d012cc0d9464"/></dir><dir name="MW"><file name="GiftWrap.php" hash="49e31b11e5ec1d6669ba67efe7c073ae"/></dir><dir name="MageWorx"><file name="MultiFees.php" hash="e40642173c9779217b9e1d8429e30ffa"/></dir></dir><dir name="Mysql4"><file name="IceAdvanced.php" hash="3351b0d4adb8b173a736d4b32fe6997e"/></dir><file name="Observer.php" hash="0607cad8ce0b6d3146fd06feb647e1f9"/><file name="Order.php" hash="a7f88e2e19ced7081b1e7a426d420fbf"/><file name="Pay.php" hash="c22531bd58311a335ae7aecabd5f91ae"/><file name="Paymentmethods.php" hash="9a4ea214394e1813609ee4166f2e0b98"/><dir name="Webservice"><file name="Advanced.php" hash="ab5824d6c57d2af9bb2709422cf1b7ca"/><file name="Refund.php" hash="13aa4224c32fb5680eb836bbdd65bbf0"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="ed28f1dabdc96c9205dcbab0e3e58705"/><file name="ConfigController.php" hash="68761f14e84f9287a9ad9f17158e9345"/><file name="ProcessingController.php" hash="e4d78169084e0a9ed88809fb781515e5"/></dir><dir name="etc"><file name="config.xml" hash="0da94353482c2a3b6fdf4a19b09747f1"/><file name="system.xml" hash="b2bad1bed9d20d6cc159b4b1834a67d5"/></dir><dir name="sql"><dir name="icepayadvanced_setup"><file name="mysql4-install-1.0.0.php" hash="f0b069a3503871e8221dc30441012e56"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="927a9f3e63c681be068f2180247b3881"/></dir></dir></dir><dir name="IceCore"><dir name="Block"><dir name="Adminhtml"><file name="CheckSettings.php" hash="1e37aaa21895b1536895d4b2f2063061"/><file name="GenerateURL.php" hash="6582848f5a1f7145baa398a1b8f0ccbd"/><dir name="Grid"><file name="Modules.php" hash="7e9bb7382c7f7052cce2f4959472cc87"/></dir><file name="Init.php" hash="16ee74a19916ce9f788d75c755d31a65"/></dir><dir name="Front"><file name="Statement.php" hash="85ee089622ff4a3bc15d08f0a2e80813"/><file name="Template.php" hash="06eb31a4a51dc6ee7143d6c8866131d6"/></dir></dir><dir name="Helper"><file name="Data.php" hash="e14987570abb87287c1b44b5f5071933"/></dir><dir name="Model"><file name="Config.php" hash="fc575adbda90cc5b89df70aa56e0acac"/><dir name="Icepay"><file name="Postback.php" hash="73ea12ebba71b27c4c423825150e9edd"/><file name="Result.php" hash="14d372385dabe7b8a1721ba5affed3c2"/></dir><dir name="Mysql4"><file name="IceCore.php" hash="9d15c849be80cdb93075b4f7c15feb2d"/></dir><dir name="Webservice"><file name="Core.php" hash="2bdd3f156d24b423e308902d76cb3010"/></dir></dir><dir name="controllers"><file name="AboutController.php" hash="0d4c838b96279e6a1fcb6f247c720777"/><file name="CheckController.php" hash="901adc45f9c44fa5b1a11dd36eb025d1"/><file name="IndexController.php" hash="01d74f3579ebf469788ee6e7e41d7b21"/><file name="ProcessingController.php" hash="53c95c3853b6e5e8cce95f7c6ef64135"/></dir><dir name="etc"><file name="config.xml" hash="2ef2ef75715a849c5462e1df1e54faac"/><file name="system.xml" hash="14ba5eb16d30fd5f1ad68a1b0eb0c2ae"/></dir><dir name="sql"><dir name="icepaycore_setup"><file name="mysql4-install-1.0.0.php" hash="bc37063c45b48e52a7e12584daf82aef"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="23872334bc62080838fda65286964782"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="icepayadvanced"><dir name="form"><file name="default.phtml" hash="70005c542f01393a8cd934a15c12ae57"/></dir><file name="grid_paymentmethods.phtml" hash="ef9628706df985a8ab779fec9c77d911"/><file name="paymentmethod.phtml" hash="09998ba17469eba710e5c3bf9b2fe1a4"/></dir><dir name="icepaycore"><file name="grid_modules.phtml" hash="0405ac0b853f5f7c3bfcdb23c8183c92"/></dir></dir><dir name="layout"><file name="icecore.xml" hash="98b5a6c55a72ba244b21a5815ae0c4fc"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="icecore.xml" hash="b78a4b91f80c334ade859c34c59d7967"/></dir><dir name="template"><dir name="icepayadvanced"><dir name="form"><file name="default.phtml" hash="70005c542f01393a8cd934a15c12ae57"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Icepay_IceAdvanced.xml" hash="c56a9f75265a04d8129ed883779909b9"/><file name="Icepay_IceCore.xml" hash="b92390374f238cedc4b3d18b1e2a252e"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Icepay_IceAdvanced.csv" hash="3cae75009684ac7a1b4afb6667d6a477"/><file name="Icepay_IceCore.csv" hash="e8ad59c02f83d67b31e7bbef3ede043e"/></dir><dir name="en_US"><file name="Icepay_IceAdvanced.csv" hash="a2d4d7a36cf4155161c1205a26ea577b"/><file name="Icepay_IceCore.csv" hash="f3c72eb858a4bd643b177f573593b04f"/></dir><dir name="es_ES"><file name="Icepay_IceAdvanced.csv" hash="f469c13d48a7361d0346fd29181c8370"/><file name="Icepay_IceCore.csv" hash="fa46bf1feedc31495401dfab9e4232d6"/></dir><dir name="fr_FR"><file name="Icepay_IceAdvanced.csv" hash="66ae26a1d9f20009878f19673d2d67b0"/><file name="Icepay_IceCore.csv" hash="5191576073b592b4285a983cc7fd17dc"/></dir><dir name="it_IT"><file name="Icepay_IceAdvanced.csv" hash="114d8290130a9f090efe210484eff1b9"/><file name="Icepay_IceCore.csv" hash="351fdc02d699cf65d763da8a44479f42"/></dir><dir name="nl_NL"><file name="Icepay_IceAdvanced.csv" hash="692d6675d44b308801dc8c08e7cbcdec"/><file name="Icepay_IceCore.csv" hash="36d5cfcd04c82e747ba0934db755904a"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="icepay"><file name="admin.css" hash="bd74e1bb19f00bfa5a3cf3c281bd77e2"/><file name="general.css" hash="bfbea7ee85c376759aee57dd49a16cb4"/><dir name="images"><file name="button-manual.png" hash="7b708db3c8915897a4e3526389b7e3b2"/><file name="button-movie.png" hash="c164da277349322fcd4480ece39d6e00"/><dir name="en"><file name="afterpay.png" hash="a3b02f6f3e53f548d58d2da794f4c900"/><file name="creditcard.png" hash="a1f1758c0ed18c576daddfad4e287dcf"/><file name="ddebit.png" hash="8eaa9ca96554a065bba75f3a3c62c25b"/><file name="directebank.png" hash="ec990be24336501593956872b5a69a0c"/><file name="elv.png" hash="af722d1a80025fbef18faf9baafe91e3"/><file name="giropay.png" hash="abbc084008a2bc4692cee1e014e88e01"/><file name="ideal.png" hash="3ad4441b5e59613b07efad0b4c781812"/><file name="mistercash.png" hash="fe437531e8ea3160dd3ce7c22c6d1dd7"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="paypal.png" hash="db854b8832246666da38130f2d527331"/><file name="paysafecard.png" hash="d9fac94c828b6429641e74f027a6e23d"/><file name="wallie.png" hash="9bbc206f96bfeb2ec82a47d6ecbae4b9"/><file name="wire.png" hash="f602b0978725d2663fe69c93276cace0"/></dir><file name="error_msg_icon.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="icepay-logo.png" hash="03fa84c0b549acdde205e78022ac1e98"/><dir name="nl"><file name="afterpay.png" hash="a3b02f6f3e53f548d58d2da794f4c900"/><file name="creditcard.png" hash="48a101cac247f07311ef3ccf1075092d"/><file name="ddebit.png" hash="89793240543046ce977a11eee9b99368"/><file name="directebank.png" hash="ec990be24336501593956872b5a69a0c"/><file name="elv.png" hash="af722d1a80025fbef18faf9baafe91e3"/><file name="giropay.png" hash="5e167cb8dbe05391b1ecceb02042a158"/><file name="ideal.png" hash="16ecbed935f5fb896620c1ec60d5fecd"/><file name="mistercash.png" hash="fe437531e8ea3160dd3ce7c22c6d1dd7"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="paypal.png" hash="4d28dd0b563dcffb4192b5fe54a43530"/><file name="paysafecard.png" hash="55a46938a74dbba9f8fa2c63e464ae98"/><file name="wallie.png" hash="643897c26a2ad7be40457bc1faafd591"/><file name="wire.png" hash="6027a80b16b699c299e748fc1f891b03"/></dir><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="section-logo.png" hash="03fa84c0b549acdde205e78022ac1e98"/><file name="success_msg_icon.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="icepay"><dir name="en"><file name="afterpay.png" hash="b9d37ce8c7daad7939f25d4f3f522d28"/><file name="creditcard.png" hash="1036251ede1a09299feecb75043d6e16"/><file name="ddebit.png" hash="408f41a0650a204cadb791c3e1b0e1a1"/><file name="directebank.png" hash="65bea681edb8442463b96ca0a6d2f604"/><file name="elv.png" hash="cdb571467e6e3f0718887ea5c6e9dc24"/><file name="giropay.png" hash="57167e2c98a48f3a24b1743e74f6158a"/><file name="icepay.png" hash="39a55d71460ccce2b65517ce40d3826a"/><file name="ideal.png" hash="fc18c3e422e4163afee4646623b2569b"/><file name="mistercash.png" hash="84164ec464031eb983cf971c93883291"/><file name="nologo.png" hash="72e977c925c8b6c70ff5fb69c0e054c8"/><file name="paypal.png" hash="944b54460b95c4842ce19982264e577d"/><file name="paysafecard.png" hash="23deaae36aa2cb0d7ef1c04804e30145"/><file name="wallie.png" hash="489236d8a7d678f355d6401a1f34dd5b"/><file name="wire.png" hash="d61bac01ea81d71bebc03f484b883c12"/></dir><file name="icepay-logo.png" hash="03fa84c0b549acdde205e78022ac1e98"/><file name="logo-currence.png" hash="fa37b87e496d9955ef455e96251bd434"/><file name="logo-thawte.png" hash="dcf93e2d0631b1e2853ce8380d80c125"/><file name="logo-thuiswinkel.png" hash="4a54a5f4e09988a4b16697fe54a462e7"/><dir name="nl"><file name="afterpay.png" hash="b9d37ce8c7daad7939f25d4f3f522d28"/><file name="creditcard.png" hash="1036251ede1a09299feecb75043d6e16"/><file name="ddebit.png" hash="2efd78c91a6558f0e5e71a4cdc6f82e4"/><file name="directebank.png" hash="70c2f9d0c6726b7b4b72b97437ed137b"/><file name="elv.png" hash="cdb571467e6e3f0718887ea5c6e9dc24"/><file name="giropay.png" hash="57167e2c98a48f3a24b1743e74f6158a"/><file name="icepay.png" hash="39a55d71460ccce2b65517ce40d3826a"/><file name="ideal.png" hash="fc18c3e422e4163afee4646623b2569b"/><file name="mistercash.png" hash="84164ec464031eb983cf971c93883291"/><file name="nologo.png" hash="59b4f3e8abf4cd51d1c5ab9f1a425999"/><file name="paypal.png" hash="944b54460b95c4842ce19982264e577d"/><file name="paysafecard.png" hash="23deaae36aa2cb0d7ef1c04804e30145"/><file name="wallie.png" hash="489236d8a7d678f355d6401a1f34dd5b"/><file name="wire.png" hash="63be6b74df1fc107d31e7830756ae39b"/></dir><file name="nologo.png" hash="72e977c925c8b6c70ff5fb69c0e054c8"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>soap</name><min/><max/></extension><extension><name>openssl</name><min/><max/></extension></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Icepay_IceAdvanced</name>
4
+ <version>1.2.11</version>
5
  <stability>stable</stability>
6
  <license>Commercial</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Enables payments using payment service provider ICEPAY.</summary>
10
  <description>Enables payments using payment service provider ICEPAY.</description>
11
+ <notes>Compatiblity with CE 1.9.2.2 and the SUPEE-6788 patch.</notes>
12
  <authors><author><name>ICEPAY</name><user>ICEPAY_PSP</user><email>info@icepay.com</email></author></authors>
13
+ <date>2015-11-06</date>
14
+ <time>22:05:52</time>
15
+ <contents><target name="magecommunity"><dir name="Icepay"><dir name="IceAdvanced"><dir name="Block"><dir name="Adminhtml"><file name="CheckSettings.php" hash="c1d714e8f8a2230f1a25f3d84dc98450"/><dir name="Grid"><file name="Paymentmethods.php" hash="011fe48221d7fecb314a3fc2b67aaf31"/></dir><dir name="Setting"><file name="Paymentmethod.php" hash="00210d7bee46504373b596b3ac87f07c"/></dir></dir><dir name="Payment"><dir name="Form"><file name="Default.php" hash="f96542cd1e5f13f3639ddc93b9c0172c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="388a4c6b92442639a44348766147ddf7"/></dir><dir name="Model"><dir name="Checkout"><file name="PaymentObject.php" hash="9f900b66043096c398718a4ecbf5537d"/><dir name="Placeholder"><file name="Paymentmethod01.php" hash="d87008e4e5e01de89e7b303cdc1a9668"/><file name="Paymentmethod02.php" hash="3b498c8d46bd7d07238716d4f53b5c6b"/><file name="Paymentmethod03.php" hash="daf62716ed5275737a8e59dc3b830b7e"/><file name="Paymentmethod04.php" hash="2270e29a53a4dfd7bce43a4881821642"/><file name="Paymentmethod05.php" hash="471ddd5095e1be2c3fd7d4259e7f2abb"/><file name="Paymentmethod06.php" hash="c471811eae541a31320281d7161d1f89"/><file name="Paymentmethod07.php" hash="fbd29ab3b2bf92f0ae821e53aca7bff1"/><file name="Paymentmethod08.php" hash="419d26f1505e958f7872ed2d3fd9d6bd"/><file name="Paymentmethod09.php" hash="c6f45d9bf34bfa6efe09d3ed755e3b3d"/><file name="Paymentmethod10.php" hash="c7427fef9fa46aa8ef6a504d5da03644"/><file name="Paymentmethod11.php" hash="d5821cff0deb32d9fc6e5804fd2db9dd"/><file name="Paymentmethod12.php" hash="0f876e7cd7ddc609c2ade19f270d2808"/><file name="Paymentmethod13.php" hash="a53fb73605951dea4b6ce73580bc1b83"/><file name="Paymentmethod14.php" hash="b3f80567d65cfd93ea71977efd2892fc"/><file name="Paymentmethod15.php" hash="f14c329fdc5870294f9087bb384c3ab6"/><file name="Paymentmethod16.php" hash="fad123e3e7f1c63a3a7323e2dec5e932"/><file name="Paymentmethod17.php" hash="d1e51dc8ab883b14b7b63ecba008e241"/><file name="Paymentmethod18.php" hash="1831634c550dad50f82f3c2d88d04b25"/><file name="Paymentmethod19.php" hash="297133ccfae9936ac174bfbaa8339f4c"/><file name="Paymentmethod20.php" hash="5a865928cbae27b23b1ffe7596c5e09d"/></dir><file name="Standard.php" hash="62c86450a936b7a6576475f1104884a0"/></dir><dir name="Extensions"><dir name="MS"><file name="Customerreward.php" hash="9baf476310f748c29f5383c6264ccd55"/></dir><dir name="MW"><file name="GiftWrap.php" hash="f845c1249ce2ee37cebae1757af59b1a"/></dir><dir name="MageWorx"><file name="MultiFees.php" hash="23cad45ce5c834b8719e994c2599977c"/></dir></dir><dir name="Mysql4"><file name="IceAdvanced.php" hash="fa71d6da29db5381685a3a4e029f4812"/></dir><file name="Observer.php" hash="5d70704fb5b5183fd5b1ad37422b7bc2"/><file name="Order.php" hash="4fa8eba6f96ad83b6606d0e2991a34d5"/><file name="Pay.php" hash="c64836f3691f6701bf57946d282ffc5d"/><file name="Paymentmethods.php" hash="420e084be7aa6242ea5eff38569572a5"/><dir name="Webservice"><file name="Advanced.php" hash="7d923f36edc545d4d5b0f9f496770198"/><file name="Refund.php" hash="aa20348a9149c6164a0166661d66059e"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Iceadvanced"><file name="AjaxController.php" hash="0b86a26029bb1f878b1c2cf961bba3ce"/><file name="ConfigController.php" hash="6d3a95685c71d6238d0ed696405f32f1"/></dir></dir><file name="ProcessingController.php" hash="0372267e60254f8e0c916f264b72b7cf"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1836055bc321380ca52610fd3d82488e"/><file name="config.xml" hash="3eb0e8cff1141c02429e9d82706139c1"/><file name="system.xml" hash="60a2a1356ab4880a735a923feae86763"/></dir><dir name="sql"><dir name="icepayadvanced_setup"><file name="mysql4-install-1.0.0.php" hash="1973a599aba64b664b117dc11b85c1e5"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="6c771822888f14d9679f6b4ab71719c0"/></dir></dir></dir><dir name="IceCore"><dir name="Block"><dir name="Adminhtml"><file name="CheckSettings.php" hash="c7748b9e578b31a1e6ca0910d6e5d6a9"/><file name="GenerateURL.php" hash="d15c789f6478854c43d8f53f8b03926e"/><dir name="Grid"><file name="Modules.php" hash="702147e1395626e6dbd74ea225885ff0"/></dir><file name="Init.php" hash="9997c445d1f58ad5610aed89cfe457de"/></dir><dir name="Front"><file name="Statement.php" hash="53f102a3f6f9c47fba5443eb17c10778"/><file name="Template.php" hash="8ee1ba571d2bdd8dba5a58da9e82df73"/></dir></dir><dir name="Helper"><file name="Data.php" hash="906ac274846dd27a6128e102baed3575"/></dir><dir name="Model"><file name="Config.php" hash="206f04e34ba26c7c0c87a2abe6ca7c08"/><dir name="Icepay"><file name="Postback.php" hash="8d1e4a39b9a5f9a1cab4d48e183fdc20"/><file name="Result.php" hash="0ee6c3d80483312f9bd1743dbe52b7e2"/></dir><dir name="Mysql4"><file name="IceCore.php" hash="5d888dd72aed01d5950ef8fc0fd25651"/></dir><dir name="Webservice"><file name="Core.php" hash="aeb1c73ff7ad21b6507df280fd1c15b3"/></dir></dir><dir name="controllers"><file name="AboutController.php" hash="9ca5a652dbf27e57cc7bbcb7ed073e1b"/><file name="CheckController.php" hash="3742f15e01a9ee5d67c08727fa5d98be"/><file name="IndexController.php" hash="e3fcbfa86b83b55252d6f32502233681"/><file name="ProcessingController.php" hash="4cbedbf49193562e9739b0a3d00b3dda"/></dir><dir name="etc"><file name="config.xml" hash="d1245f36ab67941bdda193cd93884d90"/><file name="system.xml" hash="da3c07f47d4b94f63e055f6ee868c45d"/></dir><dir name="sql"><dir name="icepaycore_setup"><file name="mysql4-install-1.0.0.php" hash="18359dde1e8eb9df89f80f3b74eedbaf"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="b1b1dfd41f1aff682dcf34fb544e922e"/><file name="mysql4-upgrade-1.0.1-1.2.10.php" hash="42c3284b7b6f3d8619e2370c9e5c855f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="icecore.xml" hash="ef9f0d3c59081e63d49d7ef263ac3f24"/></dir><dir><dir name="template"><dir name="icepayadvanced"><dir name="form"><file name="default.phtml" hash="fdf9eb2d5c4a5ef8f43f6e9d8090ebd4"/></dir><file name="grid_paymentmethods.phtml" hash="28f608b5e8c373b912bd5826424de840"/><file name="paymentmethod.phtml" hash="28dfbb959013471567d2db769516cb18"/></dir><dir name="icepaycore"><file name="grid_modules.phtml" hash="f113cfa6d561031bcd5a90f3a1fb48a0"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="icecore.xml" hash="96ed3cf67c702affdb8869e1a6c5d980"/></dir><dir name="template"><dir name="icepayadvanced"><dir name="form"><file name="default.phtml" hash="fdf9eb2d5c4a5ef8f43f6e9d8090ebd4"/></dir></dir><dir name="icepaycore"><dir name="front"><file name="check.phtml" hash="ae5608fb727b2457af10c7bd9faee6d9"/><file name="statement.phtml" hash="d251f7c4db2abbd7d49f13f75e5525b1"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Icepay_IceAdvanced.xml" hash="069d0a2d2c7a34e366bc2b79483cd2b4"/><file name="Icepay_IceCore.xml" hash="a87a236cf44dabb80d37cd0dceb3869d"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Icepay_IceAdvanced.csv" hash="f0725d7ee59aad7a73917149b0f03f69"/><file name="Icepay_IceCore.csv" hash="534eab3a8b270152089c68c71f0d0a0a"/></dir><dir name="en_US"><file name="Icepay_IceAdvanced.csv" hash="2a1ef5a634f208cccc4b63f7b6431009"/><file name="Icepay_IceCore.csv" hash="81cd47985745c0957f115b24302daa8e"/></dir><dir name="es_ES"><file name="Icepay_IceAdvanced.csv" hash="222442088540f16eb5aefe684447f2ac"/><file name="Icepay_IceCore.csv" hash="71077744cb96302e49be04db8547fba3"/></dir><dir name="fr_FR"><file name="Icepay_IceAdvanced.csv" hash="01f9e44e1dd7808bea2f83862fa887ac"/><file name="Icepay_IceCore.csv" hash="6da8f0b3b73030e6366ae50fa91f41d5"/></dir><dir name="it_IT"><file name="Icepay_IceAdvanced.csv" hash="f9b4d0135e2a873beefccffea45718bd"/><file name="Icepay_IceCore.csv" hash="0d6a1eb0b7f8a40b3c563fc540cde890"/></dir><dir name="nl_NL"><file name="Icepay_IceAdvanced.csv" hash="c5cc721830abaed918787cfa4e094158"/><file name="Icepay_IceCore.csv" hash="542c241c37f7b07cf4a1e3d771593fc9"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="icepay"><file name="admin.css" hash="773bb7d4f87f42214421960f4ccda8c3"/><file name="general.css" hash="bfbea7ee85c376759aee57dd49a16cb4"/><dir name="images"><file name="button-manual.png" hash="7b708db3c8915897a4e3526389b7e3b2"/><file name="button-movie.png" hash="c164da277349322fcd4480ece39d6e00"/><dir name="en"><file name="afterpay.png" hash="a3b02f6f3e53f548d58d2da794f4c900"/><file name="creditcard.png" hash="a1f1758c0ed18c576daddfad4e287dcf"/><file name="ddebit.png" hash="8eaa9ca96554a065bba75f3a3c62c25b"/><file name="directebank.png" hash="ec990be24336501593956872b5a69a0c"/><file name="elv.png" hash="af722d1a80025fbef18faf9baafe91e3"/><file name="giropay.png" hash="abbc084008a2bc4692cee1e014e88e01"/><file name="ideal.png" hash="3ad4441b5e59613b07efad0b4c781812"/><file name="mistercash.png" hash="fe437531e8ea3160dd3ce7c22c6d1dd7"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="paypal.png" hash="db854b8832246666da38130f2d527331"/><file name="paysafecard.png" hash="d9fac94c828b6429641e74f027a6e23d"/><file name="wallie.png" hash="9bbc206f96bfeb2ec82a47d6ecbae4b9"/><file name="wire.png" hash="f602b0978725d2663fe69c93276cace0"/></dir><file name="error_msg_icon.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="icepay-logo.png" hash="03fa84c0b549acdde205e78022ac1e98"/><dir name="nl"><file name="afterpay.png" hash="a3b02f6f3e53f548d58d2da794f4c900"/><file name="creditcard.png" hash="48a101cac247f07311ef3ccf1075092d"/><file name="ddebit.png" hash="89793240543046ce977a11eee9b99368"/><file name="directebank.png" hash="ec990be24336501593956872b5a69a0c"/><file name="elv.png" hash="af722d1a80025fbef18faf9baafe91e3"/><file name="giropay.png" hash="5e167cb8dbe05391b1ecceb02042a158"/><file name="ideal.png" hash="16ecbed935f5fb896620c1ec60d5fecd"/><file name="mistercash.png" hash="fe437531e8ea3160dd3ce7c22c6d1dd7"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="paypal.png" hash="4d28dd0b563dcffb4192b5fe54a43530"/><file name="paysafecard.png" hash="55a46938a74dbba9f8fa2c63e464ae98"/><file name="wallie.png" hash="643897c26a2ad7be40457bc1faafd591"/><file name="wire.png" hash="6027a80b16b699c299e748fc1f891b03"/></dir><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="section-logo.png" hash="03fa84c0b549acdde205e78022ac1e98"/><file name="success_msg_icon.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="icepay"><dir name="en"><file name="afterpay.png" hash="b9d37ce8c7daad7939f25d4f3f522d28"/><file name="creditcard.png" hash="1036251ede1a09299feecb75043d6e16"/><file name="ddebit.png" hash="408f41a0650a204cadb791c3e1b0e1a1"/><file name="directebank.png" hash="65bea681edb8442463b96ca0a6d2f604"/><file name="elv.png" hash="cdb571467e6e3f0718887ea5c6e9dc24"/><file name="giropay.png" hash="57167e2c98a48f3a24b1743e74f6158a"/><file name="icepay.png" hash="39a55d71460ccce2b65517ce40d3826a"/><file name="ideal.png" hash="fc18c3e422e4163afee4646623b2569b"/><file name="mistercash.png" hash="84164ec464031eb983cf971c93883291"/><file name="nologo.png" hash="72e977c925c8b6c70ff5fb69c0e054c8"/><file name="paypal.png" hash="944b54460b95c4842ce19982264e577d"/><file name="paysafecard.png" hash="23deaae36aa2cb0d7ef1c04804e30145"/><file name="wallie.png" hash="489236d8a7d678f355d6401a1f34dd5b"/><file name="wire.png" hash="d61bac01ea81d71bebc03f484b883c12"/></dir><file name="icepay-logo.png" hash="03fa84c0b549acdde205e78022ac1e98"/><file name="logo-currence.png" hash="fa37b87e496d9955ef455e96251bd434"/><file name="logo-thawte.png" hash="dcf93e2d0631b1e2853ce8380d80c125"/><file name="logo-thuiswinkel.png" hash="4a54a5f4e09988a4b16697fe54a462e7"/><dir name="nl"><file name="afterpay.png" hash="b9d37ce8c7daad7939f25d4f3f522d28"/><file name="creditcard.png" hash="1036251ede1a09299feecb75043d6e16"/><file name="ddebit.png" hash="2efd78c91a6558f0e5e71a4cdc6f82e4"/><file name="directebank.png" hash="70c2f9d0c6726b7b4b72b97437ed137b"/><file name="elv.png" hash="cdb571467e6e3f0718887ea5c6e9dc24"/><file name="giropay.png" hash="57167e2c98a48f3a24b1743e74f6158a"/><file name="icepay.png" hash="39a55d71460ccce2b65517ce40d3826a"/><file name="ideal.png" hash="fc18c3e422e4163afee4646623b2569b"/><file name="mistercash.png" hash="84164ec464031eb983cf971c93883291"/><file name="nologo.png" hash="59b4f3e8abf4cd51d1c5ab9f1a425999"/><file name="paypal.png" hash="944b54460b95c4842ce19982264e577d"/><file name="paysafecard.png" hash="23deaae36aa2cb0d7ef1c04804e30145"/><file name="wallie.png" hash="489236d8a7d678f355d6401a1f34dd5b"/><file name="wire.png" hash="63be6b74df1fc107d31e7830756ae39b"/></dir><file name="nologo.png" hash="72e977c925c8b6c70ff5fb69c0e054c8"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>soap</name><min/><max/></extension><extension><name>openssl</name><min/><max/></extension></required></dependencies>
18
  </package>
skin/adminhtml/default/default/icepay/admin.css CHANGED
@@ -1,133 +1,133 @@
1
- #row_icecore_settings_step_1,
2
- #row_icecore_settings_step_2,
3
- #row_icecore_settings_step_3 {
4
- font-weight: bold;
5
- border-bottom-width: 1px;
6
- border-bottom-style: solid;
7
- border-bottom-color: #333;
8
- }
9
- #row_icecore_settings_step_1 .scope-label,
10
- #row_icecore_settings_step_1 .use-default,
11
- #row_icecore_settings_step_2 .scope-label,
12
- #row_icecore_settings_step_2 .use-default,
13
- #row_icecore_settings_step_3 .scope-label,
14
- #row_icecore_settings_step_3 .use-default,
15
- #row_icecore_settings_manual .scope-label,
16
- #row_icecore_settings_manual .use-default,
17
- #row_icecore_settings_merchant_url_notify .use-default,
18
- #row_icecore_settings_merchant_url_ok .use-default,
19
- #row_icecore_settings_merchant_url_err .use-default,
20
- #row_icecore_advanced_settings_info .scope-label,
21
- #row_icecore_advanced_settings_info .use-default,
22
- #row_icecore_advanced_settings_manual .scope-label,
23
- #row_icecore_advanced_settings_manual .use-default
24
-
25
- {
26
- display: none;
27
- }
28
-
29
- #row_icecore_settings_merchant_url_notify input,
30
- #row_icecore_settings_merchant_url_ok input,
31
- #row_icecore_settings_merchant_url_err input,
32
- #row_icecore_settings_merchant_id input,
33
- #row_icecore_settings_merchant_secret input {
34
- width: 316px;
35
- }
36
-
37
-
38
- #row_icecore_settings_merchant_url_notify label,
39
- #row_icecore_settings_merchant_url_ok label,
40
- #row_icecore_settings_merchant_url_err label,
41
- #row_icecore_settings_merchant_url_notify label,
42
- #row_icecore_settings_merchant_id label,
43
- #row_icecore_settings_merchant_secret label
44
- {
45
- margin-left: 20px;
46
- }
47
-
48
- /* manual links */
49
- #row_icecore_settings_manual .note,
50
- #row_icecore_advanced_settings_manual .note {
51
- width: 310px;
52
- }
53
-
54
- #row_icecore_settings_manual .btn-manual,
55
- #row_icecore_settings_manual .btn-movie,
56
- #row_icecore_advanced_settings_manual .btn-manual,
57
- #row_icecore_advanced_settings_manual .btn-movie {
58
- display: inline-block;
59
- background-image: url("images/button-manual.png");
60
- background-repeat: no-repeat;
61
- background-attachment: scroll;
62
- background-position: 0px 0px;
63
- width: 150px;
64
- height: 50px;
65
- float: left;
66
- margin-right: 4px;
67
- }
68
- #row_icecore_settings_manual .btn-movie,
69
- #row_icecore_advanced_settings_manual .btn-movie {
70
- background-image: url("images/button-movie.png");
71
- }
72
-
73
-
74
- .icepay_issuer {
75
- font-size: 9px;
76
- border-bottom: 1px solid #dadfe0;
77
- /*white-space: nowrap;*/
78
- }
79
-
80
- .icepay_url_form {
81
- padding: 2px;
82
- width: 274px;
83
- color:#6f8992;
84
- }
85
-
86
- .icepay_debug {
87
- padding: 4px;
88
- font-size: 9px;
89
- font-weight: bold;
90
- border: 1px solid #c8c8c8;
91
- }
92
- .icepay_debug .ok{
93
- color: #3d6611;
94
- background-color: #eff5ea;
95
- background-image: url("images/success_msg_icon.gif");
96
- background-repeat: no-repeat;
97
- background-attachment: scroll;
98
- background-position: 0px 0px;
99
- padding-left: 20px;
100
- }
101
- .icepay_debug .err{
102
- color: #eb5e00;
103
- background-color: #fff9e9;
104
- background-image: url("images/error_msg_icon.gif");
105
- background-repeat: no-repeat;
106
- background-attachment: scroll;
107
- background-position: 0px 0px;
108
- padding-left: 20px;
109
- }
110
-
111
- .icemodule_incompatible {
112
- background-color: #fff9e9;
113
- font-size: 11px;
114
- font-weight: bold;
115
- color: #eb5e00;
116
- }
117
-
118
- #icepay_statement table {
119
- border: 1px solid #D9DEE4;
120
- }
121
-
122
- #icepay_statement td {
123
- background-color: #FAFBFF;
124
- font-family: Arial, Verdana, sans-serif;
125
- color: #7093a9;
126
- font-size: 12px;
127
- padding: 8px;
128
- text-align: left;
129
- }
130
-
131
- .content-header h3.icepay-header {
132
- background:url(images/icepay-logo.png) no-repeat 0 0; height:0; padding: 25px 0 0 220px; width: 224px; height: 39px; display:block;
133
  }
1
+ #row_icecore_settings_step_1,
2
+ #row_icecore_settings_step_2,
3
+ #row_icecore_settings_step_3 {
4
+ font-weight: bold;
5
+ border-bottom-width: 1px;
6
+ border-bottom-style: solid;
7
+ border-bottom-color: #333;
8
+ }
9
+ #row_icecore_settings_step_1 .scope-label,
10
+ #row_icecore_settings_step_1 .use-default,
11
+ #row_icecore_settings_step_2 .scope-label,
12
+ #row_icecore_settings_step_2 .use-default,
13
+ #row_icecore_settings_step_3 .scope-label,
14
+ #row_icecore_settings_step_3 .use-default,
15
+ #row_icecore_settings_manual .scope-label,
16
+ #row_icecore_settings_manual .use-default,
17
+ #row_icecore_settings_merchant_url_notify .use-default,
18
+ #row_icecore_settings_merchant_url_ok .use-default,
19
+ #row_icecore_settings_merchant_url_err .use-default,
20
+ #row_icecore_advanced_settings_info .scope-label,
21
+ #row_icecore_advanced_settings_info .use-default,
22
+ #row_icecore_advanced_settings_manual .scope-label,
23
+ #row_icecore_advanced_settings_manual .use-default
24
+
25
+ {
26
+ display: none;
27
+ }
28
+
29
+ #row_icecore_settings_merchant_url_notify input,
30
+ #row_icecore_settings_merchant_url_ok input,
31
+ #row_icecore_settings_merchant_url_err input,
32
+ #row_icecore_settings_merchant_id input,
33
+ #row_icecore_settings_merchant_secret input {
34
+ width: 316px;
35
+ }
36
+
37
+
38
+ #row_icecore_settings_merchant_url_notify label,
39
+ #row_icecore_settings_merchant_url_ok label,
40
+ #row_icecore_settings_merchant_url_err label,
41
+ #row_icecore_settings_merchant_url_notify label,
42
+ #row_icecore_settings_merchant_id label,
43
+ #row_icecore_settings_merchant_secret label
44
+ {
45
+ margin-left: 20px;
46
+ }
47
+
48
+ /* manual links */
49
+ #row_icecore_settings_manual .note,
50
+ #row_icecore_advanced_settings_manual .note {
51
+ width: 310px;
52
+ }
53
+
54
+ #row_icecore_settings_manual .btn-manual,
55
+ #row_icecore_settings_manual .btn-movie,
56
+ #row_icecore_advanced_settings_manual .btn-manual,
57
+ #row_icecore_advanced_settings_manual .btn-movie {
58
+ display: inline-block;
59
+ background-image: url("images/button-manual.png");
60
+ background-repeat: no-repeat;
61
+ background-attachment: scroll;
62
+ background-position: 0px 0px;
63
+ width: 150px;
64
+ height: 50px;
65
+ float: left;
66
+ margin-right: 4px;
67
+ }
68
+ #row_icecore_settings_manual .btn-movie,
69
+ #row_icecore_advanced_settings_manual .btn-movie {
70
+ background-image: url("images/button-movie.png");
71
+ }
72
+
73
+
74
+ .icepay_issuer {
75
+ font-size: 9px;
76
+ border-bottom: 1px solid #dadfe0;
77
+ /*white-space: nowrap;*/
78
+ }
79
+
80
+ .icepay_url_form {
81
+ padding: 2px;
82
+ width: 274px;
83
+ color:#6f8992;
84
+ }
85
+
86
+ .icepay_debug {
87
+ padding: 4px;
88
+ font-size: 9px;
89
+ font-weight: bold;
90
+ border: 1px solid #c8c8c8;
91
+ }
92
+ .icepay_debug .ok{
93
+ color: #3d6611;
94
+ background-color: #eff5ea;
95
+ background-image: url("images/success_msg_icon.gif");
96
+ background-repeat: no-repeat;
97
+ background-attachment: scroll;
98
+ background-position: 0px 0px;
99
+ padding-left: 20px;
100
+ }
101
+ .icepay_debug .err{
102
+ color: #eb5e00;
103
+ background-color: #fff9e9;
104
+ background-image: url("images/error_msg_icon.gif");
105
+ background-repeat: no-repeat;
106
+ background-attachment: scroll;
107
+ background-position: 0px 0px;
108
+ padding-left: 20px;
109
+ }
110
+
111
+ .icemodule_incompatible {
112
+ background-color: #fff9e9;
113
+ font-size: 11px;
114
+ font-weight: bold;
115
+ color: #eb5e00;
116
+ }
117
+
118
+ #icepay_statement table {
119
+ border: 1px solid #D9DEE4;
120
+ }
121
+
122
+ #icepay_statement td {
123
+ background-color: #FAFBFF;
124
+ font-family: Arial, Verdana, sans-serif;
125
+ color: #7093a9;
126
+ font-size: 12px;
127
+ padding: 8px;
128
+ text-align: left;
129
+ }
130
+
131
+ .content-header h3.icepay-header {
132
+ background:url(images/icepay-logo.png) no-repeat 0 0; height:0; padding: 25px 0 0 220px; width: 224px; height: 39px; display:block;
133
  }