Camiloo_Pay4later - Version 1.0.0.0

Version Notes

First release

Download this release

Release Info

Developer Magento Core Team
Extension Camiloo_Pay4later
Version 1.0.0.0
Comparing to
See all releases


Version 1.0.0.0

Files changed (145) hide show
  1. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Configheader.php +25 -0
  2. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Kbase/Kbase.php +25 -0
  3. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing.php +38 -0
  4. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit.php +38 -0
  5. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit/Form.php +19 -0
  6. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit/Tab/Current.php +12 -0
  7. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit/Tab/Store.php +12 -0
  8. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit/Tabs.php +45 -0
  9. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Form.php +19 -0
  10. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Tab/Current.php +12 -0
  11. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Tab/Store.php +12 -0
  12. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Tabs.php +45 -0
  13. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging.php +43 -0
  14. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit.php +54 -0
  15. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/Form.php +19 -0
  16. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/Tab/Ticketcreate.php +12 -0
  17. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/Tab/_notes/dwsync.xml +1 -0
  18. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/Tabs.php +39 -0
  19. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/_notes/dwsync.xml +1 -0
  20. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Grid.php +119 -0
  21. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Edit.php +25 -0
  22. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Edit/Form.php +19 -0
  23. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Edit/Tab/Topic.php +13 -0
  24. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Edit/Tabs.php +51 -0
  25. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Versioncheck/Edit.php +42 -0
  26. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Versioncheck/Edit/Form.php +19 -0
  27. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Versioncheck/Edit/Tabs.php +52 -0
  28. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later.php +12 -0
  29. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit.php +36 -0
  30. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Form.php +34 -0
  31. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Tab/Download.php +27 -0
  32. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Tab/Help.php +27 -0
  33. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Tab/Upload.php +27 -0
  34. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Tabs.php +52 -0
  35. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit.php +36 -0
  36. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Form.php +34 -0
  37. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Tab/Download.php +27 -0
  38. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Tab/Help.php +27 -0
  39. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Tab/Upload.php +27 -0
  40. app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Tabs.php +52 -0
  41. app/code/community/Camiloo/Pay4later/Block/P4lpaymentform.php +37 -0
  42. app/code/community/Camiloo/Pay4later/Block/P4lpaymentinfo.php +32 -0
  43. app/code/community/Camiloo/Pay4later/Block/Pay4later.php +27 -0
  44. app/code/community/Camiloo/Pay4later/Helper/Data.php +6 -0
  45. app/code/community/Camiloo/Pay4later/Model/Expresscheckout.php +26 -0
  46. app/code/community/Camiloo/Pay4later/Model/Financeoptions.php +29 -0
  47. app/code/community/Camiloo/Pay4later/Model/Mysql4/Expresscheckout.php +24 -0
  48. app/code/community/Camiloo/Pay4later/Model/Mysql4/Expresscheckout/Collection.php +42 -0
  49. app/code/community/Camiloo/Pay4later/Model/Mysql4/Pay4later.php +10 -0
  50. app/code/community/Camiloo/Pay4later/Model/Mysql4/Pay4later/Collection.php +10 -0
  51. app/code/community/Camiloo/Pay4later/Model/Mysql4/Pay4laterlog.php +24 -0
  52. app/code/community/Camiloo/Pay4later/Model/Mysql4/Pay4laterlog/Collection.php +42 -0
  53. app/code/community/Camiloo/Pay4later/Model/Mysql4/Setup.php +10 -0
  54. app/code/community/Camiloo/Pay4later/Model/Observer.php +44 -0
  55. app/code/community/Camiloo/Pay4later/Model/P4lpayment.php +209 -0
  56. app/code/community/Camiloo/Pay4later/Model/P4lpaymentinfo.php +21 -0
  57. app/code/community/Camiloo/Pay4later/Model/Pay4later.php +51 -0
  58. app/code/community/Camiloo/Pay4later/Model/Pay4laterlink.php +193 -0
  59. app/code/community/Camiloo/Pay4later/Model/Pay4laterlog.php +26 -0
  60. app/code/community/Camiloo/Pay4later/Model/Status.php +15 -0
  61. app/code/community/Camiloo/Pay4later/controllers/Adminhtml/LicensingController.php +44 -0
  62. app/code/community/Camiloo/Pay4later/controllers/Adminhtml/LoggingController.php +112 -0
  63. app/code/community/Camiloo/Pay4later/controllers/Adminhtml/ManualController.php +48 -0
  64. app/code/community/Camiloo/Pay4later/controllers/Adminhtml/Pay4laterController.php +475 -0
  65. app/code/community/Camiloo/Pay4later/controllers/Adminhtml/Pay4latershippingController.php +397 -0
  66. app/code/community/Camiloo/Pay4later/controllers/ApiController.php +305 -0
  67. app/code/community/Camiloo/Pay4later/controllers/IndexController.php +769 -0
  68. app/code/community/Camiloo/Pay4later/etc/config.xml +344 -0
  69. app/code/community/Camiloo/Pay4later/etc/system.xml +440 -0
  70. app/code/community/Camiloo/Pay4later/sql/pay4later_setup/mysql4-install-0.2.1.php +91 -0
  71. app/design/adminhtml/default/default/template/pay4later/bulk/download.phtml +136 -0
  72. app/design/adminhtml/default/default/template/pay4later/bulk/help.phtml +18 -0
  73. app/design/adminhtml/default/default/template/pay4later/bulk/upload.phtml +142 -0
  74. app/design/adminhtml/default/default/template/pay4later/configheader.phtml +42 -0
  75. app/design/adminhtml/default/default/template/pay4later/kbase.phtml +5 -0
  76. app/design/adminhtml/default/default/template/pay4later/licensing/current.phtml +65 -0
  77. app/design/adminhtml/default/default/template/pay4later/licensing/store.phtml +15 -0
  78. app/design/adminhtml/default/default/template/pay4later/logging/ticketcreate.phtml +183 -0
  79. app/design/adminhtml/default/default/template/pay4later/paymentinfo.phtml +13 -0
  80. app/design/adminhtml/default/default/template/pay4later/shippingbulk/download.phtml +136 -0
  81. app/design/adminhtml/default/default/template/pay4later/shippingbulk/help.phtml +39 -0
  82. app/design/adminhtml/default/default/template/pay4later/shippingbulk/upload.phtml +142 -0
  83. app/design/frontend/default/base/layout/pay4later.xml +46 -0
  84. app/design/frontend/default/base/template/pay4later/accept.phtml +11 -0
  85. app/design/frontend/default/base/template/pay4later/creditpromo.phtml +88 -0
  86. app/design/frontend/default/base/template/pay4later/decline.phtml +5 -0
  87. app/design/frontend/default/base/template/pay4later/expressbutton/link.phtml +23 -0
  88. app/design/frontend/default/base/template/pay4later/paymentform.phtml +75 -0
  89. app/design/frontend/default/base/template/pay4later/paymentinfo.phtml +7 -0
  90. app/design/frontend/default/base/template/pay4later/refer.phtml +5 -0
  91. app/design/frontend/default/blank/layout/pay4later.xml +46 -0
  92. app/design/frontend/default/blank/template/pay4later/accept.phtml +11 -0
  93. app/design/frontend/default/blank/template/pay4later/creditpromo.phtml +87 -0
  94. app/design/frontend/default/blank/template/pay4later/decline.phtml +5 -0
  95. app/design/frontend/default/blank/template/pay4later/expressbutton/link.phtml +23 -0
  96. app/design/frontend/default/blank/template/pay4later/paymentform.phtml +75 -0
  97. app/design/frontend/default/blank/template/pay4later/paymentinfo.phtml +7 -0
  98. app/design/frontend/default/blank/template/pay4later/refer.phtml +5 -0
  99. app/design/frontend/default/default/layout/pay4later.xml +46 -0
  100. app/design/frontend/default/default/template/pay4later/accept.phtml +11 -0
  101. app/design/frontend/default/default/template/pay4later/creditpromo.phtml +87 -0
  102. app/design/frontend/default/default/template/pay4later/decline.phtml +5 -0
  103. app/design/frontend/default/default/template/pay4later/expressbutton/link.phtml +23 -0
  104. app/design/frontend/default/default/template/pay4later/paymentform.phtml +75 -0
  105. app/design/frontend/default/default/template/pay4later/paymentinfo.phtml +7 -0
  106. app/design/frontend/default/default/template/pay4later/refer.phtml +5 -0
  107. app/design/frontend/default/enterprise/layout/pay4later.xml +46 -0
  108. app/design/frontend/default/enterprise/template/pay4later/accept.phtml +11 -0
  109. app/design/frontend/default/enterprise/template/pay4later/creditpromo.phtml +87 -0
  110. app/design/frontend/default/enterprise/template/pay4later/decline.phtml +5 -0
  111. app/design/frontend/default/enterprise/template/pay4later/expressbutton/link.phtml +23 -0
  112. app/design/frontend/default/enterprise/template/pay4later/paymentform.phtml +75 -0
  113. app/design/frontend/default/enterprise/template/pay4later/paymentinfo.phtml +7 -0
  114. app/design/frontend/default/enterprise/template/pay4later/refer.phtml +5 -0
  115. app/etc/modules/Camiloo_Pay4later.xml +9 -0
  116. package.xml +22 -0
  117. skin/adminhtml/default/default/images/p4ladmin.gif +0 -0
  118. skin/frontend/default/base/css/pay4later.css +3 -0
  119. skin/frontend/default/base/images/p4lcheckout.gif +0 -0
  120. skin/frontend/default/base/images/p4lcheckoutlogo.gif +0 -0
  121. skin/frontend/default/base/images/p4ldeposithandle.gif +0 -0
  122. skin/frontend/default/base/images/p4ldepositslidebg.gif +0 -0
  123. skin/frontend/default/base/images/p4ldepositslidegripper.png +0 -0
  124. skin/frontend/default/base/images/p4ldepositslideoverlay.png +0 -0
  125. skin/frontend/default/blank/css/pay4later.css +3 -0
  126. skin/frontend/default/blank/images/p4lcheckout.gif +0 -0
  127. skin/frontend/default/blank/images/p4lcheckoutlogo.gif +0 -0
  128. skin/frontend/default/blank/images/p4ldeposithandle.gif +0 -0
  129. skin/frontend/default/blank/images/p4ldepositslidebg.gif +0 -0
  130. skin/frontend/default/blank/images/p4ldepositslidegripper.png +0 -0
  131. skin/frontend/default/blank/images/p4ldepositslideoverlay.png +0 -0
  132. skin/frontend/default/default/css/pay4later.css +3 -0
  133. skin/frontend/default/default/images/p4lcheckout.gif +0 -0
  134. skin/frontend/default/default/images/p4lcheckoutlogo.gif +0 -0
  135. skin/frontend/default/default/images/p4ldeposithandle.gif +0 -0
  136. skin/frontend/default/default/images/p4ldepositslidebg.gif +0 -0
  137. skin/frontend/default/default/images/p4ldepositslidegripper.png +0 -0
  138. skin/frontend/default/default/images/p4ldepositslideoverlay.png +0 -0
  139. skin/frontend/default/enterprise/css/pay4later.css +3 -0
  140. skin/frontend/default/enterprise/images/p4lcheckout.gif +0 -0
  141. skin/frontend/default/enterprise/images/p4lcheckoutlogo.gif +0 -0
  142. skin/frontend/default/enterprise/images/p4ldeposithandle.gif +0 -0
  143. skin/frontend/default/enterprise/images/p4ldepositslidebg.gif +0 -0
  144. skin/frontend/default/enterprise/images/p4ldepositslidegripper.png +0 -0
  145. skin/frontend/default/enterprise/images/p4ldepositslideoverlay.png +0 -0
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Configheader.php ADDED
@@ -0,0 +1,25 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4Later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4Later_Block_Adminhtml_Configheader extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
19
+ {
20
+ protected $_template = 'pay4later/configheader.phtml';
21
+ public function render(Varien_Data_Form_Element_Abstract $element)
22
+ {
23
+ return $this->toHtml();
24
+ }
25
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Kbase/Kbase.php ADDED
@@ -0,0 +1,25 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Textcommerce
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Textcommerce_Block_Adminhtml_Kbase_Kbase extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+ $this->setTemplate('textcommerce/kbase.phtml');
24
+ }
25
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing.php ADDED
@@ -0,0 +1,38 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Licensing extends Mage_Adminhtml_Block_Widget_Form_Container
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+
24
+ $this->_objectId = 'id';
25
+ $this->_blockGroup = 'pay4later';
26
+ $this->_controller = 'adminhtml_licensing';
27
+
28
+
29
+ $this->_removeButton('save');
30
+ $this->_removeButton('delete');
31
+
32
+ }
33
+
34
+ public function getHeaderText()
35
+ {
36
+ return Mage::helper('pay4later')->__('View / Update License');
37
+ }
38
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit.php ADDED
@@ -0,0 +1,38 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Licensing_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+
24
+ $this->_objectId = 'id';
25
+ $this->_blockGroup = 'pay4later';
26
+ $this->_controller = 'adminhtml_licensing';
27
+
28
+
29
+ $this->_removeButton('save');
30
+ $this->_removeButton('delete');
31
+
32
+ }
33
+
34
+ public function getHeaderText()
35
+ {
36
+ return Mage::helper('pay4later')->__('View / Update License');
37
+ }
38
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Adminhtml_Licensing_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit/Tab/Current.php ADDED
@@ -0,0 +1,12 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4Later_Block_Adminhtml_Licensing_Edit_Tab_Current extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('pay4later/licensing/current.phtml');
9
+ }
10
+ }
11
+
12
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit/Tab/Store.php ADDED
@@ -0,0 +1,12 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Licensing_Edit_Tab_Store extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('pay4later/licensing/store.phtml');
9
+ }
10
+ }
11
+
12
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Edit/Tabs.php ADDED
@@ -0,0 +1,45 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Licensing_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
19
+ {
20
+
21
+ public function __construct()
22
+ {
23
+ parent::__construct();
24
+ $this->setId('licensing_tabs');
25
+ $this->setDestElementId('edit_form');
26
+ $this->setTitle(Mage::helper('pay4later')->__('View / Update License'));
27
+ }
28
+
29
+ protected function _beforeToHtml()
30
+ {
31
+ $this->addTab('current', array(
32
+ 'label' => Mage::helper('pay4later')->__('Current License'),
33
+ 'title' => Mage::helper('pay4later')->__('Current License'),
34
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_licensing_tab_current')->toHtml(),
35
+ ));
36
+
37
+ $this->addTab('store', array(
38
+ 'label' => Mage::helper('pay4later')->__('License Store'),
39
+ 'title' => Mage::helper('pay4later')->__('License Store'),
40
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_licensing_tab_store')->toHtml(),
41
+ ));
42
+
43
+ return parent::_beforeToHtml();
44
+ }
45
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Form.php ADDED
@@ -0,0 +1,19 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Licensing_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Tab/Current.php ADDED
@@ -0,0 +1,12 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Adminhtml_Licensing_Tab_Current extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('pay4later/licensing/current.phtml');
9
+ }
10
+ }
11
+
12
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Tab/Store.php ADDED
@@ -0,0 +1,12 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Adminhtml_Licensing_Tab_Store extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('pay4later/licensing/store.phtml');
9
+ }
10
+ }
11
+
12
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Licensing/Tabs.php ADDED
@@ -0,0 +1,45 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Licensing_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
19
+ {
20
+
21
+ public function __construct()
22
+ {
23
+ parent::__construct();
24
+ $this->setId('edit_tabs');
25
+ $this->setDestElementId('edit_form');
26
+ $this->setTitle(Mage::helper('pay4later')->__('View / Update License'));
27
+ }
28
+
29
+ protected function _beforeToHtml()
30
+ {
31
+ $this->addTab('current', array(
32
+ 'label' => Mage::helper('pay4later')->__('Current License'),
33
+ 'title' => Mage::helper('pay4later')->__('Current License'),
34
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_licensing_tab_current')->toHtml(),
35
+ ));
36
+
37
+ $this->addTab('store', array(
38
+ 'label' => Mage::helper('pay4later')->__('License Store'),
39
+ 'title' => Mage::helper('pay4later')->__('License Store'),
40
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_licensing_tab_store')->toHtml(),
41
+ ));
42
+
43
+ return parent::_beforeToHtml();
44
+ }
45
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging.php ADDED
@@ -0,0 +1,43 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Logging extends Mage_Adminhtml_Block_Widget_Grid_Container
19
+ {
20
+ public function __construct()
21
+ {
22
+ $this->_objectId = 'id';
23
+ $this->_blockGroup = 'pay4later';
24
+ $this->_controller = 'adminhtml_logging';
25
+ $this->_headerText = Mage::helper('pay4later')->__('Pay4Later API Communication Log');
26
+ parent::__construct();
27
+
28
+ $this->_removeButton('add');
29
+
30
+ $this->_addButton('savecomplete', array(
31
+ 'label' => Mage::helper('adminhtml')->__('Clear Log'),
32
+ 'onclick' => "window.location.href='".$this->getUrl('*/*/flushlog')."';",
33
+ 'class' => 'scalable delete',
34
+ ), -100);
35
+
36
+
37
+ // $this->_addButton('resetss', array(
38
+ // 'label' => Mage::helper('adminhtml')->__('Restart System'),
39
+ // 'onclick' => "window.location.href='".$this->getUrl('*/*/reset')."';",
40
+ // 'class' => 'scalable delete',
41
+ // ), -100);
42
+ }
43
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit.php ADDED
@@ -0,0 +1,54 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Logging_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+
24
+ $this->_objectId = 'id';
25
+ $this->_blockGroup = 'pay4later';
26
+ $this->_controller = 'adminhtml_Logging';
27
+
28
+ $this->_updateButton('save', 'label', Mage::helper('pay4later')->__('Send Request'));
29
+ $this->_removeButton('delete');
30
+
31
+ $this->_formScripts[] = "
32
+ function toggleEditor() {
33
+ if (tinyMCE.getInstanceById('pay4later_content') == null) {
34
+ tinyMCE.execCommand('mceAddControl', false, 'pay4later_content');
35
+ } else {
36
+ tinyMCE.execCommand('mceRemoveControl', false, 'pay4later_content');
37
+ }
38
+ }
39
+
40
+ function saveAndContinueEdit(){
41
+ editForm.submit($('edit_form').action+'back/edit/');
42
+ }
43
+ ";
44
+ }
45
+
46
+ public function getHeaderText()
47
+ {
48
+ if( Mage::registry('pay4later_data') && Mage::registry('pay4later_data')->getId() ) {
49
+ return Mage::helper('pay4later')->__("Send a support request to Camiloo Support");
50
+ } else {
51
+ return Mage::helper('pay4later')->__('Send a support request to Camiloo Support');
52
+ }
53
+ }
54
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Adminhtml_Logging_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/Tab/Ticketcreate.php ADDED
@@ -0,0 +1,12 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Adminhtml_Logging_Edit_Tab_Ticketcreate extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('pay4later/logging/ticketcreate.phtml');
9
+ }
10
+ }
11
+
12
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/Tab/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/Tabs.php ADDED
@@ -0,0 +1,39 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Logging_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
19
+ {
20
+
21
+ public function __construct()
22
+ {
23
+ parent::__construct();
24
+ $this->setId('Logging_tabs');
25
+ $this->setDestElementId('edit_form');
26
+ $this->setTitle(Mage::helper('pay4later')->__('Support'));
27
+ }
28
+
29
+ protected function _beforeToHtml()
30
+ {
31
+ $this->addTab('ticketcreate', array(
32
+ 'label' => Mage::helper('pay4later')->__('Your Support Request'),
33
+ 'title' => Mage::helper('pay4later')->__('Your Support Request'),
34
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_logging_edit_tab_ticketcreate')->toHtml(),
35
+ ));
36
+
37
+ return parent::_beforeToHtml();
38
+ }
39
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Edit/_notes/dwsync.xml ADDED
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Logging/Grid.php ADDED
@@ -0,0 +1,119 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+
19
+ class Camiloo_Pay4later_Block_Adminhtml_Logging_Grid extends Mage_Adminhtml_Block_Widget_Grid
20
+ {
21
+ public function __construct()
22
+ {
23
+ parent::__construct();
24
+ $this->setId('pay4laterGrid');
25
+ $this->setSaveParametersInSession(true);
26
+ $this->setDefaultSort('message_time');
27
+ }
28
+
29
+ protected function _prepareCollection()
30
+ {
31
+ $collection = Mage::getModel('pay4later/pay4laterlog')->getCollection()
32
+ ->addExpressionToSelect('outgoing2','IF(CHAR_LENGTH(`outgoing`) > 500, "XML Message",`outgoing`)')
33
+ ->addExpressionToSelect('incoming2','IF(CHAR_LENGTH(`incoming`) > 500, "XML Message",`incoming`)');
34
+ $this->setCollection($collection);
35
+ return parent::_prepareCollection();
36
+
37
+ }
38
+
39
+ protected function _prepareColumns()
40
+ {
41
+ $this->addColumn('log_id', array(
42
+ 'header' => Mage::helper('pay4later')->__('ID'),
43
+ 'align' =>'right',
44
+ 'width' => '50px',
45
+ 'index' => 'log_id',
46
+ 'filter' => false,
47
+ 'sortable' => true,
48
+ ));
49
+
50
+ $this->addColumn('message_time', array(
51
+ 'header' => Mage::helper('pay4later')->__('Message Date / Time'),
52
+ 'align' =>'left',
53
+ 'index' => 'message_time',
54
+ 'type' => 'datetime',
55
+ 'filter' => false,
56
+ 'sortable' => true,
57
+ ));
58
+
59
+
60
+ $this->addColumn('outgoing', array(
61
+ 'header' => Mage::helper('pay4later')->__('Outgoing Message'),
62
+ 'align' =>'left',
63
+ 'index' => 'outgoing2',
64
+ 'type' => 'text',
65
+ 'filter' => false,
66
+ 'sortable' => true,
67
+ ));
68
+
69
+ $this->addColumn('incoming', array(
70
+ 'header' => Mage::helper('pay4later')->__('Incoming Message'),
71
+ 'align' =>'left',
72
+ 'index' => 'incoming2',
73
+ 'type' => 'text',
74
+ 'filter' => false,
75
+ 'sortable' => true,
76
+ ));
77
+
78
+ $this->addColumn('error', array(
79
+ 'header' => Mage::helper('pay4later')->__('Error Message'),
80
+ 'align' =>'left',
81
+ 'index' => 'error',
82
+ 'filter' => false,
83
+ 'sortable' => true,
84
+ ));
85
+
86
+
87
+ $this->addColumn('action',
88
+ array(
89
+ 'header' => Mage::helper('pay4later')->__('Action'),
90
+ 'width' => '100',
91
+ 'type' => 'action',
92
+ 'getter' => 'getId',
93
+ 'actions' => array(
94
+ array(
95
+ 'caption' => Mage::helper('pay4later')->__('Send to Support'),
96
+ 'url' => array('base'=> '*/*/edit'),
97
+ 'field' => 'log_id'
98
+ )
99
+ ),
100
+ 'filter' => false,
101
+ 'sortable' => true,
102
+ 'is_system' => true,
103
+ ));
104
+
105
+ return parent::_prepareColumns();
106
+ }
107
+
108
+ protected function _prepareMassaction()
109
+ {
110
+
111
+ return $this;
112
+ }
113
+
114
+ public function getRowUrl($row)
115
+ {
116
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
117
+ }
118
+
119
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Edit.php ADDED
@@ -0,0 +1,25 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4Later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Manual_Edit extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+ $this->setTemplate('pay4later/kbase.phtml');
24
+ }
25
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
1
+ <?php
2
+
3
+ class Camiloo_Amazonimport_Block_Manual_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/clonefrom', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Edit/Tab/Topic.php ADDED
@@ -0,0 +1,13 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Adminhtml_Manual_Edit_Tab_Topic extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('pay4later/manual/topic.phtml');
9
+ }
10
+
11
+ }
12
+
13
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Edit/Tabs.php ADDED
@@ -0,0 +1,51 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Manual_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
19
+ {
20
+
21
+ public function from_camel_case($str) {
22
+ $str[1] = strtolower($str[1]);
23
+ $func = create_function('$c', 'return " " . strtolower($c[1]);');
24
+ return preg_replace_callback('/([A-Z])/', $func, $str);
25
+ }
26
+
27
+ public function __construct()
28
+ {
29
+ parent::__construct();
30
+ $this->setId('mapping_tabs');
31
+ $this->setDestElementId('edit_form');
32
+ $this->setTitle(Mage::helper('pay4later')->__('Manual'));
33
+ }
34
+
35
+ protected function _beforeToHtml()
36
+ {
37
+ $xml = Mage::getModel('amazonimport/amazonlink')->getRemoteXMLFileData("http://www.camiloo.co.uk/help/pay4later/index.xml");
38
+
39
+ foreach($xml->HelpPage as $helptopic){
40
+ $this->addTab("".str_replace(" ","",$helptopic['title'])."", array(
41
+ 'label' => Mage::helper('pay4later')->__((string) $helptopic['title']),
42
+ 'title' => Mage::helper('pay4later')->__((string) $helptopic['title']),
43
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_manual_edit_tab_topic')->setData('pageurl',(string) $helptopic['url'])->toHtml(),
44
+ ));
45
+
46
+ }
47
+
48
+ return parent::_beforeToHtml();
49
+ }
50
+
51
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Versioncheck/Edit.php ADDED
@@ -0,0 +1,42 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Manual_Versioncheck_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+
24
+ $this->_objectId = 'id';
25
+ $this->_blockGroup = 'pay4later';
26
+ $this->_controller = 'adminhtml_mapping';
27
+
28
+ $this->_removeButton('save');
29
+ $this->_removeButton('delete');
30
+ $this->_removeButton('reset');
31
+ $this->_removeButton('back');
32
+
33
+
34
+ }
35
+
36
+ public function getHeaderText()
37
+ {
38
+
39
+ return Mage::helper('pay4later')->__('Check for updates');
40
+
41
+ }
42
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Versioncheck/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Block_Adminhtml_Manual_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/clonefrom', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Manual/Versioncheck/Edit/Tabs.php ADDED
@@ -0,0 +1,52 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Manual_Versioncheck_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
19
+ {
20
+
21
+ public function from_camel_case($str) {
22
+ $str[1] = strtolower($str[1]);
23
+ $func = create_function('$c', 'return " " . strtolower($c[1]);');
24
+ return preg_replace_callback('/([A-Z])/', $func, $str);
25
+ }
26
+
27
+ public function __construct()
28
+ {
29
+ parent::__construct();
30
+ $this->setId('mapping_tabs');
31
+ $this->setDestElementId('edit_form');
32
+ $this->setTitle(Mage::helper('pay4later')->__('Updates'));
33
+ }
34
+
35
+ protected function _beforeToHtml()
36
+ {
37
+
38
+ $xml = Mage::getModel('amazonimport/amazonlink')->getRemoteXMLFileData("http://www.camiloo.co.uk/version/pay4later/versioncheck.php?Version=1.00");
39
+
40
+
41
+
42
+ $this->addTab("Checkforupdates", array(
43
+ 'label' => Mage::helper('pay4later')->__('Check for updates'),
44
+ 'title' => Mage::helper('pay4later')->__('Check for updates'),
45
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_manual_edit_tab_topic')->setData('pageurl',(string) $xml->DisplayMessage[0])->toHtml(),
46
+ ));
47
+
48
+
49
+ return parent::_beforeToHtml();
50
+ }
51
+
52
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later.php ADDED
@@ -0,0 +1,12 @@
1
+ <?php
2
+ class Camiloo_Pay4later_Block_Adminhtml_Pay4later extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_pay4later';
7
+ $this->_blockGroup = 'pay4later';
8
+ $this->_headerText = Mage::helper('pay4later')->__('Item Manager');
9
+ $this->_addButtonLabel = Mage::helper('pay4later')->__('Add Item');
10
+ parent::__construct();
11
+ }
12
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit.php ADDED
@@ -0,0 +1,36 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Pay4later_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+
24
+ $this->_objectId = 'id';
25
+ $this->_blockGroup = 'pay4later';
26
+ $this->_controller = 'adminhtml_pay4later';
27
+
28
+ $this->_removeButton('save');
29
+ $this->_removeButton('delete');
30
+ }
31
+
32
+ public function getHeaderText()
33
+ {
34
+ return Mage::helper('pay4later')->__('Select Finance options for your products');
35
+ }
36
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Form.php ADDED
@@ -0,0 +1,34 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Pay4later_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ protected function _prepareForm()
21
+ {
22
+ $form = new Varien_Data_Form(array(
23
+ 'id' => 'edit_form',
24
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
25
+ 'method' => 'post',
26
+ 'enctype' => 'multipart/form-data'
27
+ )
28
+ );
29
+
30
+ $form->setUseContainer(true);
31
+ $this->setForm($form);
32
+ return parent::_prepareForm();
33
+ }
34
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Tab/Download.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Pay4later_Edit_Tab_Download extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+ $this->setTemplate('pay4later/bulk/download.phtml');
24
+ }
25
+ }
26
+
27
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Tab/Help.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Pay4later_Edit_Tab_Help extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+ $this->setTemplate('pay4later/bulk/help.phtml');
24
+ }
25
+ }
26
+
27
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Tab/Upload.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Pay4later_Edit_Tab_Upload extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+ $this->setTemplate('pay4later/bulk/upload.phtml');
24
+ }
25
+ }
26
+
27
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Pay4later/Edit/Tabs.php ADDED
@@ -0,0 +1,52 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Pay4later_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
19
+ {
20
+
21
+ public function __construct()
22
+ {
23
+ parent::__construct();
24
+ $this->setId('pay4later_tabs');
25
+ $this->setDestElementId('edit_form');
26
+ $this->setTitle(Mage::helper('pay4later')->__('Finance Options Setup'));
27
+ }
28
+
29
+ protected function _beforeToHtml()
30
+ {
31
+ $this->addTab('download', array(
32
+ 'label' => Mage::helper('pay4later')->__('Download Bulk CSV'),
33
+ 'title' => Mage::helper('pay4later')->__('Download Bulk CSV'),
34
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_pay4later_edit_tab_download')->toHtml(),
35
+ ));
36
+
37
+ $this->addTab('help', array(
38
+ 'label' => Mage::helper('pay4later')->__('Help Completing CSV'),
39
+ 'title' => Mage::helper('pay4later')->__('Help Completing CSV'),
40
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_pay4later_edit_tab_help')->toHtml(),
41
+ ));
42
+
43
+
44
+ $this->addTab('upload', array(
45
+ 'label' => Mage::helper('pay4later')->__('Upload Bulk CSV'),
46
+ 'title' => Mage::helper('pay4later')->__('Upload Bulk CSV'),
47
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_pay4later_edit_tab_upload')->toHtml(),
48
+ ));
49
+
50
+ return parent::_beforeToHtml();
51
+ }
52
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit.php ADDED
@@ -0,0 +1,36 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Shipping_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+
24
+ $this->_objectId = 'id';
25
+ $this->_blockGroup = 'pay4later';
26
+ $this->_controller = 'adminhtml_shipping';
27
+
28
+ $this->_removeButton('save');
29
+ $this->_removeButton('delete');
30
+ }
31
+
32
+ public function getHeaderText()
33
+ {
34
+ return Mage::helper('pay4later')->__('Setup Shipping Rates for Express Checkout');
35
+ }
36
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Form.php ADDED
@@ -0,0 +1,34 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Shipping_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ protected function _prepareForm()
21
+ {
22
+ $form = new Varien_Data_Form(array(
23
+ 'id' => 'edit_form',
24
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
25
+ 'method' => 'post',
26
+ 'enctype' => 'multipart/form-data'
27
+ )
28
+ );
29
+
30
+ $form->setUseContainer(true);
31
+ $this->setForm($form);
32
+ return parent::_prepareForm();
33
+ }
34
+ }
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Tab/Download.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Shipping_Edit_Tab_Download extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+ $this->setTemplate('pay4later/shippingbulk/download.phtml');
24
+ }
25
+ }
26
+
27
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Tab/Help.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Shipping_Edit_Tab_Help extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+ $this->setTemplate('pay4later/shippingbulk/help.phtml');
24
+ }
25
+ }
26
+
27
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Tab/Upload.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Shipping_Edit_Tab_Upload extends Mage_Adminhtml_Block_Widget_Form
19
+ {
20
+ public function __construct()
21
+ {
22
+ parent::__construct();
23
+ $this->setTemplate('pay4later/shippingbulk/upload.phtml');
24
+ }
25
+ }
26
+
27
+ ?>
app/code/community/Camiloo/Pay4later/Block/Adminhtml/Shipping/Edit/Tabs.php ADDED
@@ -0,0 +1,52 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Block_Adminhtml_Shipping_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
19
+ {
20
+
21
+ public function __construct()
22
+ {
23
+ parent::__construct();
24
+ $this->setId('pay4later_tabs');
25
+ $this->setDestElementId('edit_form');
26
+ $this->setTitle(Mage::helper('pay4later')->__('Shipping Rates Setup'));
27
+ }
28
+
29
+ protected function _beforeToHtml()
30
+ {
31
+ $this->addTab('download', array(
32
+ 'label' => Mage::helper('pay4later')->__('Download Bulk CSV'),
33
+ 'title' => Mage::helper('pay4later')->__('Download Bulk CSV'),
34
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_shipping_edit_tab_download')->toHtml(),
35
+ ));
36
+
37
+ $this->addTab('help', array(
38
+ 'label' => Mage::helper('pay4later')->__('Help Completing CSV'),
39
+ 'title' => Mage::helper('pay4later')->__('Help Completing CSV'),
40
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_shipping_edit_tab_help')->toHtml(),
41
+ ));
42
+
43
+
44
+ $this->addTab('upload', array(
45
+ 'label' => Mage::helper('pay4later')->__('Upload Bulk CSV'),
46
+ 'title' => Mage::helper('pay4later')->__('Upload Bulk CSV'),
47
+ 'content' => $this->getLayout()->createBlock('pay4later/adminhtml_shipping_edit_tab_upload')->toHtml(),
48
+ ));
49
+
50
+ return parent::_beforeToHtml();
51
+ }
52
+ }
app/code/community/Camiloo/Pay4later/Block/P4lpaymentform.php ADDED
@@ -0,0 +1,37 @@
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Payment
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Camiloo_Pay4later_Block_P4lpaymentform extends Mage_Payment_Block_Form
29
+ {
30
+
31
+ protected function _construct()
32
+ {
33
+ parent::_construct();
34
+ $this->setTemplate('pay4later/paymentform.phtml');
35
+ }
36
+
37
+ }
app/code/community/Camiloo/Pay4later/Block/P4lpaymentinfo.php ADDED
@@ -0,0 +1,32 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+ class Camiloo_Pay4later_Block_P4lpaymentinfo extends Mage_Payment_Block_Info_Cc
18
+ {
19
+ /**
20
+ * Internal constructor
21
+ *
22
+ * @return void
23
+ */
24
+ protected function _construct()
25
+ {
26
+ parent::_construct();
27
+
28
+ // Set default template
29
+ $this->setTemplate('pay4later/paymentinfo.phtml');
30
+ }
31
+
32
+ }
app/code/community/Camiloo/Pay4later/Block/Pay4later.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+ class Camiloo_Pay4later_Block_Pay4later extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getPay4later()
10
+ {
11
+ if (!$this->hasData('pay4later')) {
12
+ $this->setData('pay4later', Mage::registry('pay4later'));
13
+ }
14
+ return $this->getData('pay4later');
15
+
16
+ }
17
+
18
+ public function getProduct()
19
+ {
20
+ if (!Mage::registry('product') && $this->getProductId()) {
21
+ $product = Mage::getModel('catalog/product')->load($this->getProductId());
22
+ Mage::register('product', $product);
23
+ }
24
+ return Mage::registry('product');
25
+ }
26
+
27
+ }
app/code/community/Camiloo/Pay4later/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/community/Camiloo/Pay4later/Model/Expresscheckout.php ADDED
@@ -0,0 +1,26 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+
19
+ class Camiloo_Pay4later_Model_Expresscheckout extends Mage_Core_Model_Abstract
20
+ {
21
+ public function _construct()
22
+ {
23
+ parent::_construct();
24
+ $this->_init('expresscheckout/expresscheckout');
25
+ }
26
+ }
app/code/community/Camiloo/Pay4later/Model/Financeoptions.php ADDED
@@ -0,0 +1,29 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Model_Financeoptions extends Varien_Object
4
+ {
5
+ static public function toOptionArray()
6
+ {
7
+ return array(
8
+ 'ONIF6' => Mage::helper('pay4later')->__('Interest Free Credit (0% APR) 6 Months'),
9
+ 'ONIF10' => Mage::helper('pay4later')->__('Interest Free Credit (0% APR) 10 Months'),
10
+ 'ONIF12' => Mage::helper('pay4later')->__('Interest Free Credit (0% APR) 12 Months'),
11
+ 'ONIF18' => Mage::helper('pay4later')->__('Interest Free Credit (0% APR) 18 Months'),
12
+ 'ONIF24' => Mage::helper('pay4later')->__('Interest Free Credit (0% APR) 24 Months'),
13
+ 'ONIF36' => Mage::helper('pay4later')->__('Interest Free Credit (0% APR) 36 Months'),
14
+ 'ONIB12-19.5' => Mage::helper('pay4later')->__('Classic Credit (19.5% APR) 12 Months'),
15
+ 'ONIB24-19.5' => Mage::helper('pay4later')->__('Classic Credit (19.5% APR) 24 Months'),
16
+ 'ONIB36-19.5' => Mage::helper('pay4later')->__('Classic Credit (19.5% APR) 36 Months'),
17
+ 'ONIB12-2.9' => Mage::helper('pay4later')->__('Promotional Credit (2.9% APR) 12 Months'),
18
+ 'ONIB24-2.9' => Mage::helper('pay4later')->__('Promotional Credit (2.9% APR) 24 Months'),
19
+ 'ONIB36-2.9' => Mage::helper('pay4later')->__('Promotional Credit (2.9% APR) 36 Months'),
20
+ 'ONIB12-3.9' => Mage::helper('pay4later')->__('Promotional Credit (3.9% APR) 12 Months'),
21
+ 'ONIB24-3.9' => Mage::helper('pay4later')->__('Promotional Credit (3.9% APR) 24 Months'),
22
+ 'ONIB36-3.9' => Mage::helper('pay4later')->__('Promotional Credit (3.9% APR) 36 Months'),
23
+ 'ONIB12-4.9' => Mage::helper('pay4later')->__('Promotional Credit (4.9% APR) 12 Months'),
24
+ 'ONIB24-4.9' => Mage::helper('pay4later')->__('Promotional Credit (4.9% APR) 24 Months'),
25
+ 'ONIB36-4.9' => Mage::helper('pay4later')->__('Promotional Credit (4.9% APR) 36 Months'),
26
+ );
27
+ }
28
+ }
29
+
app/code/community/Camiloo/Pay4later/Model/Mysql4/Expresscheckout.php ADDED
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Model_Mysql4_Expresscheckout extends Mage_Core_Model_Mysql4_Abstract
19
+ {
20
+ public function _construct()
21
+ {
22
+ $this->_init('expresscheckout/expresscheckout', 'ec_id');
23
+ }
24
+ }
app/code/community/Camiloo/Pay4later/Model/Mysql4/Expresscheckout/Collection.php ADDED
@@ -0,0 +1,42 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Model_Mysql4_Expresscheckout_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
19
+ {
20
+ public function _construct()
21
+ {
22
+ parent::_construct();
23
+ $this->_init('expresscheckout/expresscheckout');
24
+ }
25
+
26
+ public function addExpressionToSelect($alias, $expression)
27
+ {
28
+ // validate alias
29
+ if (isset($this->_joinFields[$alias])) {
30
+ throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Joined field or attribute expression with this alias is already declared'));
31
+ }
32
+ $this->getSelect()->from(null, array($alias=>$expression));
33
+
34
+ $this->_joinFields[$alias] = array(
35
+ 'table' => false,
36
+ 'field' => $expression
37
+ );
38
+
39
+ return $this;
40
+ }
41
+
42
+ }
app/code/community/Camiloo/Pay4later/Model/Mysql4/Pay4later.php ADDED
@@ -0,0 +1,10 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Model_Mysql4_Pay4later extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the pay4later_id refers to the key field in your database table.
8
+ $this->_init('pay4later/pay4later', 'pay4later_id');
9
+ }
10
+ }
app/code/community/Camiloo/Pay4later/Model/Mysql4/Pay4later/Collection.php ADDED
@@ -0,0 +1,10 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Model_Mysql4_Pay4later_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('pay4later/pay4later');
9
+ }
10
+ }
app/code/community/Camiloo/Pay4later/Model/Mysql4/Pay4laterlog.php ADDED
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Model_Mysql4_Pay4laterlog extends Mage_Core_Model_Mysql4_Abstract
19
+ {
20
+ public function _construct()
21
+ {
22
+ $this->_init('pay4laterlog/pay4laterlog', 'log_id');
23
+ }
24
+ }
app/code/community/Camiloo/Pay4later/Model/Mysql4/Pay4laterlog/Collection.php ADDED
@@ -0,0 +1,42 @@
1
+ <?php
2
+ /**
3
+ * Camiloo Limited
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://www.camiloo.co.uk/license.txt
11
+ *
12
+ * @category Camiloo
13
+ * @package Camiloo_Pay4later
14
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
15
+ * @license http://www.camiloo.co.uk/license.txt
16
+ */
17
+
18
+ class Camiloo_Pay4later_Model_Mysql4_Pay4laterlog_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
19
+ {
20
+ public function _construct()
21
+ {
22
+ parent::_construct();
23
+ $this->_init('pay4laterlog/pay4laterlog');
24
+ }
25
+
26
+ public function addExpressionToSelect($alias, $expression)
27
+ {
28
+ // validate alias
29
+ if (isset($this->_joinFields[$alias])) {
30
+ throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Joined field or attribute expression with this alias is already declared'));
31
+ }
32
+ $this->getSelect()->from(null, array($alias=>$expression));
33
+
34
+ $this->_joinFields[$alias] = array(
35
+ 'table' => false,
36
+ 'field' => $expression
37
+ );
38
+
39
+ return $this;
40
+ }
41
+
42
+ }
app/code/community/Camiloo/Pay4later/Model/Mysql4/Setup.php ADDED
@@ -0,0 +1,10 @@
1
+ <?php
2
+
3
+ // we create this so that we can access the addAttribute on installer.
4
+ class Camiloo_Pay4later_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup
5
+ {
6
+
7
+ }
8
+
9
+
10
+ ?>
app/code/community/Camiloo/Pay4later/Model/Observer.php ADDED
@@ -0,0 +1,44 @@
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Model_Observer {
4
+
5
+ public function shipPay4later(Varien_Event_Observer $observer)
6
+ {
7
+
8
+ $shiponcomplete = Mage::getStoreConfig('pay4later/apisettings/shiponcomplete');
9
+
10
+ if ($shiponcomplete)
11
+ {
12
+ $shipment = $observer->getEvent()->getShipment();
13
+ $order = $shipment->getOrder();
14
+ $crid = $order->getPayment()->getData('pay4later_crid');
15
+
16
+ if(isset($crid)){
17
+ Mage::getModel('pay4later/pay4laterlink')->sendShipment($crid);
18
+ }
19
+
20
+ }
21
+ }
22
+
23
+
24
+ public function saveTrackingToPay4later(Varien_Event_Observer $observer)
25
+ {
26
+ $shiponcomplete = Mage::getStoreConfig('pay4later/apisettings/shiponcomplete');
27
+
28
+ if (!$shiponcomplete)
29
+ {
30
+ $track = $observer->getEvent()->getTrack();
31
+ $order = $track->getShipment()->getOrder();
32
+ $crid = $order->getPayment()->getData('pay4later_crid');
33
+
34
+ if(isset($crid)){
35
+ Mage::getModel('pay4later/pay4laterlink')->sendShipment($crid,$track->getNumber());
36
+ }
37
+ }
38
+
39
+ }
40
+
41
+
42
+ }
43
+
44
+ ?>
app/code/community/Camiloo/Pay4later/Model/P4lpayment.php ADDED
@@ -0,0 +1,209 @@