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 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //003ab
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
3
+ ?>
4
+ 4+oV5CMKIbdV5K+ViddVUkHZiFyJWIw/lo2YfgEix/TAuYpAc9pOeYNpbAGx1qeRjcVUOBQbA8ih
5
+ 01ai9/MJiyTGLGbTxAUv8wfXsY/YwKRhyuH4FwOCuryv1+ro7VQhrZzitzI16f9ToqTMnf+v8b8a
6
+ pneB/CqMYTMJj5G0l6hguIFkjkcLNnVg0++za1Ir0zju1Mj5VyU/xABMWoLVpkJiS9NkJkpZfko4
7
+ n+LV2GD1U2prLj2E7ECwkQxcdUGu4aB8vTnZ4YOAX5DekfCfMaXklr6vsWUeBbvxLmwwTzcWh88d
8
+ UWXyEkKjnGX2wU4hX/JLTdnjmtPHTABP6YZPG0hbat+VmDXzKdgK42qW7fVTpa4hSphioYm0Nk3V
9
+ risooxNZRNLofB8dxeUxGiIGN5OtO9kjCKES0mSOT0eFlVoU9kz+klpvFxisV/YymawC+V7opcQt
10
+ HgqLk8vkS1QVVZWDQ07rJkrDaB2MjDp5cRk1X51nLUQzhz9xaRCN4qsSbyFbALG2xs/lNJbQe/49
11
+ 8AIN7r8iY189pubZBHZCsf+Og3QYJ5VfnHMVqizAyA5CUbP3EJVLiwUbchtzjXQGJYwIktKYoFIv
12
+ VpX6zgSiua363aXY8lCPUjeP2vgZJzTHBH9n5baEUaKU+E8LrcUWA2csDZr8aEJqZE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1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_P4lpaymentinfo extends Mage_Payment_Model_Info
19
+ {
20
+
21
+ }
app/code/community/Camiloo/Pay4later/Model/Pay4later.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Model_Pay4later extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('pay4later/pay4later');
9
+ }
10
+
11
+ public function browserCheckForReloader($form){
12
+
13
+ // firefox form reload compatability fix
14
+ if(strpos($_SERVER['HTTP_USER_AGENT'],"Firefox") > 0){
15
+ return "setTimeout(\"$('".$form."').submit()\",250);";
16
+ }else{
17
+ return "$('".$form."').submit();";
18
+ }
19
+
20
+ }
21
+
22
+ public function getRootUrl(){
23
+
24
+ if((!empty($_SERVER['HTTPS']))&&($_SERVER['HTTPS'] == "on")){
25
+ return Mage::getUrl('',array('_secure'=>true));
26
+ }else{
27
+ return Mage::getUrl('');
28
+ }
29
+
30
+ }
31
+
32
+ public function getSkinUrl(){
33
+
34
+ if((!empty($_SERVER['HTTPS']))&&($_SERVER['HTTPS'] == "on")){
35
+ return str_replace("index.php/","",Mage::getUrl('',array('_secure'=>true)));
36
+ }else{
37
+ return str_replace("index.php/","",Mage::getUrl(''));
38
+ }
39
+
40
+ }
41
+
42
+ public function saveSessionValue($value,$key){
43
+ Mage::getSingleton('adminhtml/session')->setData($key,$value);
44
+ }
45
+
46
+ public function loadSessionValue($key){
47
+ $value = Mage::getSingleton('adminhtml/session')->getData($key);
48
+ return $value;
49
+ }
50
+
51
+ }
app/code/community/Camiloo/Pay4later/Model/Pay4laterlink.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //003ab
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
3
+ ?>
4
+ 4+oV5FO/eOmgeHcZ9+qqhx/CanLrTaneBCtFL8giRL4s7LlziTzUOjMJd1L9H5w19zjWv+I5zkwR
5
+ Z+ak3TCuNBdQKsM+Zdhobvo6HOaRJX3Gro5IkcD1E+tNAkvoCLL4NfK8HCbiU01+2uHSsejMoNR1
6
+ +iwGUMdlnObyX3MNRvevp5K+4ompOxjr/miOg3te1rwEOBFTL4zovG349K/GYXF6e1sRoeFE+0G6
7
+ bOVeb+8B4CDjruJtbP40HACmhI4bl+hQtfWQ4RHwLWDYrbyxQYTO90GFH1IuF5uLlDMq3AqGWMUQ
8
+ OLK6VeMxDnYzniKt4PcQHH5+7lwhQ+o36hz6oDglbYN9YQ64pQ/a40qZ9KT1BXALC+u+UUG+ognA
9
+ 8iE/Y6xW5UrADPm4AILCRR8mluftPXRCUO0odLaKWoB9zpVsA50RuMdY6J6249eAKJ3JTjUdIfyn
10
+ 1wl/dwKFp4p+xPSaRnppW+i5Me4HItaiiStyI3rWS93hhsbM6CYqR8RSnFNnWmoZhnTpdHJZO1Q4
11
+ DiitJcJEnf6RrNjaGgyupGDsNwVTrBQb/Q2Ked+wo20h806I0LpAqPUn+JX4PKmUUHB3g1G0t0LB
12
+ 8EYSA5aNlnbMKA7TiW0ttTDEbfW9+G1/KxjnOXwIg1kW5tjeJZfFEEYCsO8OWcjbhoH7yAgiPy7s
13
+ hFnGeBOikAJb5kJ4x03iuE9QPuN49A2UctLU6fzH4IaIbg4HYEPVoVCJaJLqqSYPmMJ4YeF42Mt5
14
+ d5tOmoY5rIC44dvxpZI9ySY0snmcLBNa59Z3nz4HKBEyOMuMKO2jBnclpJBsyWb4TRBvTmXVcwC8
15
+ VvLt4oESi2TZZmm0PNP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j9xZjb3KvLHUGhX6GnJj1j4c84jWOL9llbZbxfltsdXaEGgZdAPShYrz2
188
+ e+QSMDQHVFRI0NnFjuDvw5663KDsGkm0kyBm4Cn+DOPSr9QhDMcvAqq3gH/Zq1HBxnaC48wTWlo2
189
+ hJsI6jJ7xjzNhNVz4aLpXMkSejl8UIrJMu7PoNcB3dIeJbcsDqT/7NqqlaVplKnGN3jWu/lgDTwI
190
+ 5rONn7RFLXni+IURybuGGw3sfzDF+LnHWGcMh6rTkUR4Eb5Hvw1Lc9qRFMGa+mutajpIlsg+J+i1
191
+ qbIExDgH0OMBN2KFgO/C4GgfoJ+Zvr4D3lGzjb8Qd612coqrzkXQw59aAaEJ7jEFroKVQCwX3tLs
192
+ 6+qbGDGzh2HZl5fHJaPJsWjlzpaBZilE5tEKGmnnVwk3D9LHJuO6SqpGXxN/ib5ezdT7eJjtdB/B
193
+ f1oDxfs4YPqO6viHCa/r0esbFxwxSrYbxWcpSIE9Igwm/lllgh+EL9L6
app/code/community/Camiloo/Pay4later/Model/Pay4laterlog.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_Pay4laterlog extends Mage_Core_Model_Abstract
20
+ {
21
+ public function _construct()
22
+ {
23
+ parent::_construct();
24
+ $this->_init('pay4laterlog/pay4laterlog');
25
+ }
26
+ }
app/code/community/Camiloo/Pay4later/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Model_Status extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 2;
7
+
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ENABLED => Mage::helper('pay4later')->__('Enabled'),
12
+ self::STATUS_DISABLED => Mage::helper('pay4later')->__('Disabled')
13
+ );
14
+ }
15
+ }
app/code/community/Camiloo/Pay4later/controllers/Adminhtml/LicensingController.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml_LicensingController extends Mage_Adminhtml_Controller_action
19
+ {
20
+
21
+
22
+ protected function _initAction() {
23
+ $this->loadLayout()
24
+ ->_setActiveMenu('system/pay4later')
25
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('pay4later'), Mage::helper('adminhtml')->__('Pay4Later Licensing'));
26
+
27
+ return $this;
28
+ }
29
+
30
+ public function indexAction() {
31
+ $this->_initAction();
32
+ $this->_addContent($this->getLayout()->createBlock('pay4later/adminhtml_licensing_edit'));
33
+ $this->_addLeft($this->getLayout()->createBlock('pay4later/adminhtml_licensing_edit_tabs'));
34
+ $this->renderLayout();
35
+ }
36
+
37
+ public function refreshLicenseAction(){
38
+
39
+ echo Mage::getModel('pay4later/pay4laterlink')->refreshLicensedisplay();
40
+
41
+ }
42
+
43
+ }
44
+ ?>
app/code/community/Camiloo/Pay4later/controllers/Adminhtml/LoggingController.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml_LoggingController extends Mage_Adminhtml_Controller_action
19
+ {
20
+
21
+ protected function _initAction() {
22
+ $this->loadLayout();
23
+ return $this;
24
+ }
25
+
26
+ public function indexAction() {
27
+
28
+ $this->loadLayout();
29
+ $this->_addContent($this->getLayout()->createBlock('pay4later/adminhtml_logging'));
30
+ $this->renderLayout();
31
+
32
+
33
+ }
34
+
35
+ public function supportAction() {
36
+ $this->loadLayout();
37
+ $this->_addContent($this->getLayout()->createBlock('pay4later/adminhtml_logging_edit'));
38
+ $this->_addLeft($this->getLayout()->createBlock('pay4later/adminhtml_logging_edit_tabs'));
39
+ $this->renderLayout();
40
+ }
41
+
42
+ public function editAction() {
43
+ $this->loadLayout();
44
+ $this->_addContent($this->getLayout()->createBlock('pay4later/adminhtml_logging_edit'));
45
+ $this->_addLeft($this->getLayout()->createBlock('pay4later/adminhtml_logging_edit_tabs'));
46
+ $this->renderLayout();
47
+ }
48
+
49
+ public function flushlogAction(){
50
+
51
+ foreach(Mage::getModel('pay4later/pay4laterlog')->getCollection() as $log){
52
+ $log->delete();
53
+ }
54
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('pay4later')->__('The log has been cleared.'));
55
+ $this->_redirect('*/*/');
56
+ }
57
+
58
+ public function saveAction() {
59
+
60
+ $data = $this->getRequest()->getPost();
61
+
62
+ $message = "Support Request from ".$data['customer_name'].":\n\r";
63
+ $message .= "===============================================\n\r\n\r";
64
+ $message .= $data['support_query']."\n\r\n\r";
65
+
66
+ $message .= "Access Credentials:\n\r";
67
+ $message .= "===============================================\n\r\n\r";
68
+ $message .= "FTP is at: ".$data['ftp_address']."\n\r";
69
+ $message .= "FTP username: ".$data['ftp_username']."\n\r";
70
+ $message .= "FTP password: ".$data['ftp_password']."\n\r";
71
+ $message .= "Magento Admin is at: ".$data['admin_url']."\n\r";
72
+ $message .= "Magento Username: ".$data['admin_username']."\n\r";
73
+ $message .= "Magento Password: ".$data['admin_password']."\n\r\n\r";
74
+
75
+ $message .= "Module Version\n\r";
76
+ $message .= "===============================================\n\r\n\r";
77
+ $message .= "1.00\n\r\n\r";
78
+
79
+ $message .= "Surestream States\n\r";
80
+ $message .= "===============================================\n\r\n\r";
81
+
82
+ $message .= "\n\r";
83
+
84
+
85
+ if(isset($data['outgoing'])){
86
+
87
+ $message .= "Attached Log Message\n\r";
88
+ $message .= "===============================================\n\r\n\r";
89
+ $message .= "Outgoing Message:\n\r ".$data['outgoing']."\n\r";
90
+ $message .= "Incoming Message:\n\r ".$data['incoming']."\n\r";
91
+ $message .= "Error Reported:\n\r ".$data['error']."\n\r";
92
+ $message .= "Message Timestamp:\n\r ".$data['message_time']."\n\r\n\r";
93
+
94
+ }
95
+
96
+ $message .= "Server Variable Output\n\r";
97
+ $message .= "===============================================\n\r\n\r";
98
+
99
+
100
+ foreach($_SERVER as $svkey=>$svval){
101
+ $message .= "$svkey: $svval\n\r";
102
+ }
103
+
104
+ mail("support@camiloo.co.uk","Support Request - CAMPAY4100",$message,"From: ".$data['customer_name']." <".$data['customer_email'].">");
105
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('pay4later')->__('Thank you - your request has been sent to Camiloo Support. A member of our support team will respond within 2 business days.'));
106
+ $this->_redirect('*/*/');
107
+
108
+ }
109
+
110
+ }
111
+
112
+ ?>
app/code/community/Camiloo/Pay4later/controllers/Adminhtml/ManualController.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml_ManualController extends Mage_Adminhtml_Controller_action
19
+ {
20
+
21
+ protected function _initAction() {
22
+ $this->loadLayout()
23
+ ->_setActiveMenu('system/pay4later')
24
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Pay4Later'), Mage::helper('adminhtml')->__('Pay4Later KB'));
25
+
26
+ return $this;
27
+ }
28
+
29
+
30
+ public function indexAction() {
31
+
32
+ $this->_initAction();
33
+ $this->_addContent($this->getLayout()->createBlock('pay4later/adminhtml_manual_edit'));
34
+ $this->renderLayout();
35
+ }
36
+
37
+
38
+ public function versioncheckAction(){
39
+
40
+ $this->loadLayout();
41
+ $this->_addContent($this->getLayout()->createBlock('pay4later/adminhtml_manual_versioncheck_edit'));
42
+ $this->_addLeft($this->getLayout()->createBlock('pay4later/adminhtml_manual_versioncheck_edit_tabs'));
43
+ $this->renderLayout();
44
+
45
+ }
46
+
47
+
48
+ }
app/code/community/Camiloo/Pay4later/controllers/Adminhtml/Pay4laterController.php ADDED
@@ -0,0 +1,475 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Adminhtml_Pay4laterController extends Mage_Adminhtml_Controller_action
4
+ {
5
+
6
+ protected function _initAction() {
7
+ $this->loadLayout()
8
+ ->_setActiveMenu('system/pay4later')
9
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Pay4Later Integration'), Mage::helper('adminhtml')->__('Select Finance Options'));
10
+
11
+ return $this;
12
+ }
13
+
14
+ public function indexAction() {
15
+
16
+ if(Mage::getModel('pay4later/pay4laterlink')->initiateview($this)){
17
+ $this->_initAction();
18
+ $this->_addContent($this->getLayout()->createBlock('pay4later/adminhtml_pay4later_edit'))
19
+ ->_addLeft($this->getLayout()->createBlock('pay4later/adminhtml_pay4later_edit_tabs'));
20
+ }else{
21
+ $this->_initAction();
22
+ }
23
+ $this->renderLayout();
24
+
25
+ }
26
+
27
+ public function downloadhelperAction()
28
+ {
29
+ $_inprogress = 'camiloo_pay4laterbulkdownload_selection_inprogress';
30
+ $_flatcatalogKey = 'camiloo_pay4laterbulkdownload_selection_flatcatalog';
31
+ $_totalsizeKey = 'camiloo_pay4laterbulkdownload_selection_totalsize';
32
+ $_currPageCountKey = 'camiloo_pay4laterbulkdownload_selection_currentpagecount';
33
+
34
+ $_pageSizeKey = 'camiloo_pay4laterbulkdownload_selection_pagesize';
35
+ $_timeKey = 'camiloo_pay4laterbulkdownload_selection_timecsv';
36
+ $_csvFile = 'bulkdownload-finance.csv';
37
+
38
+ $_csvFirstLine = "Product ID,Product SKU and Name,|||,ONIF6,ONIF10,ONIF12,ONIF18,ONIF24,ONIF36,ONIB12-19.5,ONIB24-19.5,ONIB36-19.5,ONIB12-2.9,ONIB24-2.9,ONIB36-2.9,ONIB12-3.9,ONIB24-3.9,ONIB36-3.9,ONIB12-4.9,ONIB24-4.9,ONIB36-4.9\r\n";
39
+ $_fieldListForCsv = '`ONIF6`, `ONIF10`, `ONIF12`, `ONIF18`, `ONIF24`, `ONIF36`, `ONIB12195`, `ONIB24195`, `ONIB36195`, `ONIB1229`, `ONIB2429`, `ONIB3629`, `ONIB1239`, `ONIB2439`, `ONIB3639`, `ONIB1249`, `ONIB2449`, `ONIB3649`';
40
+ $_tableNameForCsv = 'options';
41
+
42
+
43
+ error_reporting(E_ALL);
44
+ ini_set("display_errors","on");
45
+ ini_set('max_execution_time', 30000); //300 seconds = 5 minutes
46
+
47
+ if($_POST['regenerate'] == 1)
48
+ {
49
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(0, $_inprogress);
50
+ }
51
+
52
+ if(Mage::getModel('pay4later/pay4later')->loadSessionValue($_inprogress) < 1)
53
+ {
54
+ $totalsize = 0;
55
+ $currentpagecount = 0;
56
+
57
+ $productsAll = Mage::getModel('catalog/product')->getCollection();
58
+ $totalsize = $productsAll->getSize();
59
+ $currentpagecount = 0;
60
+ // NB Page size is always 100
61
+
62
+ echo "Total Size $totalsize\n";
63
+ echo "Current Page Count $currentpagecount\n";
64
+
65
+ // Instantiate the download
66
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(1, $_inprogress);
67
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($totalsize, $_totalsizeKey);
68
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($currentpagecount, $_currPageCountKey);
69
+ Mage::getModel('pay4later/pay4later')->saveSessionValue("", $_timeKey);
70
+
71
+ // check the file is clear
72
+ $file = fopen("/tmp/".$_csvFile, "w+");
73
+ fwrite($file, $_csvFirstLine);
74
+ fclose($file);
75
+
76
+
77
+ echo '<script type="text/javascript">parent.updatestatus("0%","0 out of '.$totalsize.' products processed","");
78
+ </script>';
79
+
80
+ }
81
+ else if(Mage::getModel('pay4later/pay4later')->loadSessionValue($_inprogress) < 2)
82
+ {
83
+ // Run a 'job' from the download.
84
+ $start = microtime();
85
+
86
+ $totalsize = Mage::getModel('pay4later/pay4later')->loadSessionValue($_totalsizeKey);
87
+ $currentpagecount = Mage::getModel('pay4later/pay4later')->loadSessionValue($_currPageCountKey);
88
+
89
+ echo "Total Size $totalsize\n"; //119
90
+ echo "Current Page Count $currentpagecount\n"; //1.. [with the ++ below]
91
+
92
+ // Move to the next page (block of 100)
93
+ $currentpagecount++;
94
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($currentpagecount, $_currPageCountKey);
95
+
96
+
97
+ // $_limitFrom = ($currentpagecount-1)*100;
98
+ $_limitTo = ($currentpagecount*100)-1;
99
+ $percent = "".min(floor($_limitTo / $totalsize * 100), 100)."%";
100
+
101
+ $file = fopen("/tmp/".$_csvFile, "a+");
102
+
103
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
104
+ $table_prefix = Mage::getConfig()->getTablePrefix();
105
+
106
+ $collection = Mage::getModel('catalog/product')->getCollection()
107
+ ->addAttributeToSelect('sku')->addAttributeToSelect('name')
108
+ ->setPageSize(100)
109
+ ->setCurPage($currentpagecount);
110
+
111
+ foreach ($collection as $product)
112
+ {
113
+
114
+ $sqlTemp = "SELECT $_fieldListForCsv FROM {$table_prefix}pay4later WHERE product_id = '".$product['entity_id']."'";
115
+
116
+ $result = $db->query($sqlTemp);
117
+ $financeOptions = $result->fetch(PDO::FETCH_ASSOC);
118
+ $this->writeCsvRowFinance($file, $financeOptions, $product);
119
+
120
+ }
121
+
122
+ fclose($file);
123
+
124
+ $end = microtime();
125
+ $timetaken = $this->microtime_diff($start,$end);
126
+ $timetaken = $timetaken + (1/4);
127
+
128
+ $times = Mage::getModel('pay4later/pay4later')->loadSessionValue($_timeKey);
129
+ if($percent != "100%"){
130
+ $times .= $timetaken.",";
131
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($times,$_timeKey);
132
+ }else{
133
+ $times .= $timetaken;
134
+ Mage::getModel('pay4later/pay4later')->saveSessionValue("",$_timeKey);
135
+ }
136
+
137
+ $times = explode(",",$times);
138
+ $totaltime = 0;
139
+
140
+ foreach($times as $time){
141
+ $totaltime = $totaltime + $time;
142
+ }
143
+
144
+ $timecount = sizeof($times);
145
+
146
+ $timeleft = floor(abs(($totaltime / $timecount) * (ceil($totalsize/100) - $currentpagecount) ));
147
+
148
+ if($percent != "100%" && $totalsize > 0){
149
+ // we are not complete yet.
150
+ echo '<script type="text/javascript">
151
+ parent.updatestatus("'.$percent.'","'.(100 * $currentpagecount).' out of '.$totalsize.' products processed","'.$timeleft.' seconds remaining");
152
+ </script>';
153
+ }else{
154
+ // we are complete - display the download div.
155
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(2, $_inprogress);
156
+ echo '<script type="text/javascript">
157
+ parent.godownload();
158
+ </script>';
159
+ }
160
+ }
161
+ else
162
+ {
163
+ // this is a special status sent to serve downloads
164
+ header('Content-Description: File Transfer');
165
+ header('Content-Type: text/csv');
166
+ header('Content-Length: ' . filesize("/tmp/".$_csvFile));
167
+ header('Content-Disposition: attachment; filename='.$_csvFile);
168
+ $this->readfile_chunked("/tmp/".$_csvFile);
169
+ }
170
+ }
171
+
172
+ public function writeCsvRowFinance($file, $financeOptions, $product)
173
+ {
174
+ $pattern = '/[^A-Za-z0-9 ]/i';
175
+ $replacement = '_';
176
+ $nameToUse = preg_replace($pattern, $replacement, $product['name']);
177
+
178
+ if (sizeof($financeOptions) > 0)
179
+ {
180
+ fwrite($file, $product['entity_id'].",".'"('.$this->safeOutput($product['sku']).') '.
181
+ $nameToUse.'",|||,'.$financeOptions['ONIF6'].",".$financeOptions['ONIF10'].",".$financeOptions['ONIF12'].",".$financeOptions['ONIF18'].",".$financeOptions['ONIF24'].",".$financeOptions['ONIF36'].",".$financeOptions['ONIB12195'].",".$financeOptions['ONIB24195'].",".$financeOptions['ONIB36195'].",".$financeOptions['ONIB1229'].",".$financeOptions['ONIB2429'].",".$financeOptions['ONIB3629'].",".$financeOptions['ONIB1239'].",".$financeOptions['ONIB2439'].",".$financeOptions['ONIB3639'].",".$financeOptions['ONIB1249'].",".$financeOptions['ONIB2449'].",".$financeOptions['ONIB3649']."\r\n");
182
+
183
+ }
184
+ else
185
+ {
186
+ fwrite($file, $product['entity_id'].",".'"('.$this->safeOutput($product['sku']).') '.
187
+ $nameToUse.'",|||,,,,,,,,,,,,,,,,,,\r\n');
188
+ }
189
+ }
190
+
191
+ private function safeOutput($input) {
192
+
193
+ $pattern = '/[^A-Za-z0-9 ]/i';
194
+ $replacement = '_';
195
+ $nameToUse = preg_replace($pattern, $replacement, $input);
196
+ return $nameToUse;
197
+ }
198
+
199
+ public function microtime_diff($start, $end=NULL)
200
+ {
201
+ if( !$end ) {
202
+ $end = microtime();
203
+ }
204
+ list($start_usec, $start_sec) = explode(" ", $start);
205
+ list($end_usec, $end_sec) = explode(" ", $end);
206
+ $diff_sec= intval($end_sec) - intval($start_sec);
207
+ $diff_usec= floatval($end_usec) - floatval($start_usec);
208
+ return floatval( $diff_sec ) + $diff_usec;
209
+ }
210
+
211
+ public function readfile_chunked($filename, $retbytes = TRUE) {
212
+ error_reporting(0);
213
+ $buffer = '';
214
+ $cnt = 0;
215
+
216
+ $handle = fopen($filename, 'rb');
217
+ if ($handle === false) {
218
+ return false;
219
+ }
220
+ while (!feof($handle)) {
221
+ $buffer = fread($handle,1024*1024);
222
+ echo $buffer;
223
+ ob_flush();
224
+ flush();
225
+ if ($retbytes) {
226
+ $cnt += strlen($buffer);
227
+ }
228
+ }
229
+ $status = fclose($handle);
230
+ if ($retbytes && $status) {
231
+ return $cnt; // return num. bytes delivered like readfile() does.
232
+ }
233
+ return $status;
234
+ }
235
+
236
+ public function uploadhelperAction(){
237
+
238
+ $output = array();
239
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
240
+ $table_prefix = Mage::getConfig()->getTablePrefix();
241
+
242
+ ini_set('max_execution_time', 30000); //300 seconds = 5 minutes
243
+
244
+ if($_POST['regenerate'] == 1){
245
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(0,'camiloo_pay4later_bulkupload_finance_inprogress');
246
+ }
247
+
248
+ if(Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_finance_inprogress') < 1){
249
+
250
+ $filename = $_FILES['csvfile']['tmp_name'];
251
+
252
+ // Create a secure name for the temp file
253
+ $country = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_selection_marketplace');
254
+ $name = time()."_bulkupload_finance_";
255
+ $tempFileName = "/tmp/".$name.".csv";
256
+
257
+ //
258
+ // Copy filename to tempFileName, discarding the first line
259
+ //
260
+ $totalsize = $this->deleteFirstNLines($filename, $tempFileName, 1);
261
+ $currentpagecount = 0;
262
+ $pagesize = ceil($totalsize / 100);
263
+
264
+ // Instantiate the upload
265
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(1,'camiloo_pay4later_bulkupload_finance_inprogress');
266
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($totalsize,'camiloo_pay4later_bulkupload_finance_totalsize');
267
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($currentpagecount,'camiloo_pay4later_bulkupload_finance_currentpagecount');
268
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($pagesize,'camiloo_pay4later_bulkupload_finance_pagesize');
269
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($name,'camiloo_pay4later_bulkupload_finance_filename');
270
+ Mage::getModel('pay4later/pay4later')->saveSessionValue("",'camiloo_pay4later_bulkupload_finance_timecsv');
271
+
272
+ echo '<script type="text/javascript">parent.processfileupload();parent.updatestatusupload("0%","0 out of $totalsize products processed","");
273
+ </script>';
274
+ }
275
+ else if (Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_finance_inprogress') < 2)
276
+ {
277
+ // run a 'job' from the upload.
278
+ $totalsize = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_finance_totalsize');
279
+ $currentpagecount = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_finance_currentpagecount');
280
+ $pagesize = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_finance_pagesize');
281
+ $name = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_finance_filename');
282
+
283
+ // move to the next page
284
+ $currentpagecount++;
285
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($currentpagecount,'camiloo_pay4later_bulkupload_finance_currentpagecount');
286
+
287
+ // calculate the amount of results output so far, and the amount to output this time.
288
+ if(($pagesize * $currentpagecount) < $totalsize){
289
+ $currentcount = $pagesize * $currentpagecount;
290
+ $thistime = $pagesize;
291
+ $percent = "".floor($currentcount / $totalsize * 100)."%";
292
+ $pagesleft = floor(($totalsize - $currentcount) / $pagesize);
293
+ }else{
294
+ $currentcount = $totalsize;
295
+ $thistime = $totalsize - ($pagesize * ($currentpagecount - 1));
296
+ $percent = "100%";
297
+ $pagesleft = 0;
298
+ }
299
+
300
+ $tempFileName = "/tmp/".$name.".csv";
301
+
302
+ $handle = fopen($tempFileName, "r");
303
+ $start = microtime();
304
+
305
+ for ($i = 1; $i <= $thistime; $i++){
306
+
307
+ $value = fgets($handle);
308
+
309
+ if(!$value){
310
+ break;
311
+ }
312
+
313
+ $value = explode(",",$value);
314
+
315
+ echo "Printing value<br>";
316
+ print_r($value);
317
+
318
+ if(count($value) < 9) {
319
+ echo '<script type="text/javascript">alert("Error: Expected 9 columns, '.count($value).' found.");</script>';
320
+ exit;
321
+ }
322
+
323
+ foreach($value as $keyv=>$value2){
324
+ $value[$keyv] = str_replace("|",",",$value2);
325
+ }
326
+
327
+
328
+ $model = Mage::getModel('pay4later/pay4later')->getCollection()->addFieldToFilter('product_id',array($value[0]));
329
+ if(sizeof($model) > 0){
330
+ foreach($model as $mdl){
331
+ $mdl->delete();
332
+ }
333
+ }
334
+
335
+ $model = Mage::getModel('pay4later/pay4later');
336
+ $model->setData('product_id',$value[0]);
337
+
338
+
339
+ if (isset($value[3])) {
340
+ $model->setData('ONIF6', $value[3]);
341
+ }
342
+ if (isset($value[4])) {
343
+ $model->setData('ONIF10', $value[4]);
344
+ }
345
+ if (isset($value[5])) {
346
+ $model->setData('ONIF12', $value[5]);
347
+ }
348
+ if (isset($value[6])) {
349
+ $model->setData('ONIF18', $value[6]);
350
+ }
351
+ if (isset($value[7])) {
352
+ $model->setData('ONIF24', $value[7]);
353
+ }
354
+ if (isset($value[8])) {
355
+ $model->setData('ONIF36', $value[8]);
356
+ }
357
+ if (isset($value[9])) {
358
+ $model->setData('ONIB12195', $value[9]);
359
+ }
360
+ if (isset($value[10])) {
361
+ $model->setData('ONIB24195', $value[10]);
362
+ }
363
+ if (isset($value[11])) {
364
+ $model->setData('ONIB36195', $value[11]);
365
+ }
366
+ if (isset($value[12])) {
367
+ $model->setData('ONIB1229', $value[12]);
368
+ }
369
+ if (isset($value[13])) {
370
+ $model->setData('ONIB2429', $value[13]);
371
+ }
372
+ if (isset($value[14])) {
373
+ $model->setData('ONIB3629', $value[14]);
374
+ }
375
+ if (isset($value[15])) {
376
+ $model->setData('ONIB1239', $value[15]);
377
+ }
378
+ if (isset($value[16])) {
379
+ $model->setData('ONIB2439', $value[16]);
380
+ }
381
+ if (isset($value[17])) {
382
+ $model->setData('ONIB3639', $value[17]);
383
+ }
384
+ if (isset($value[18])) {
385
+ $model->setData('ONIB1249', $value[18]);
386
+ }
387
+ if (isset($value[19])) {
388
+ $model->setData('ONIB2449', $value[19]);
389
+ }
390
+ if (isset($value[20])) {
391
+ $model->setData('ONIB3649', $value[20]);
392
+ }
393
+
394
+
395
+ $model->save();
396
+
397
+ }
398
+
399
+ copy($tempFileName, $tempFileName."TMP");
400
+ $this->deleteFirstNLines($tempFileName."TMP", $tempFileName, $thistime);
401
+
402
+ $end = microtime();
403
+ $timetaken = $this->microtime_diff($start,$end);
404
+ $timetaken = $timetaken + (1/5);
405
+
406
+
407
+ $times = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_finance_timecsv');
408
+ if($percent != "100%"){
409
+ $times .= $timetaken.",";
410
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($times,'camiloo_pay4later_bulkupload_finance_timecsv');
411
+ }else{
412
+ $times .= $timetaken;
413
+ Mage::getModel('pay4later/pay4later')->saveSessionValue("",'camiloo_pay4later_bulkupload_finance_timecsv');
414
+ }
415
+
416
+ $times = explode(",",$times);
417
+ $totaltime = 0;
418
+
419
+ foreach($times as $time){
420
+ $totaltime = $totaltime + $time;
421
+ }
422
+
423
+ $timecount = sizeof($times);
424
+
425
+ $timeleft = floor(abs(($totaltime / $timecount) * $pagesleft));
426
+
427
+
428
+
429
+
430
+
431
+ if($percent != "100%"){
432
+ // we are not complete yet.
433
+ echo '<script type="text/javascript">
434
+ parent.updatestatusupload("'.$percent.'","'.$currentcount.' out of '.$totalsize.' products processed","'.$timeleft.' seconds remaining");
435
+ </script>';
436
+ }else{
437
+ echo '<script type="text/javascript">
438
+ parent.gouploadcomplete();
439
+ </script>';
440
+ }
441
+
442
+ }
443
+
444
+
445
+
446
+ }
447
+
448
+ /**
449
+ * Deletes the first $numLinesToDelete lines from the $src file and outputs the result to $dest.
450
+ * The file $src isn't modified. $dest is overwritten if it already exists.
451
+ * Returns the number of lines in the file $src.
452
+ */
453
+ private function deleteFirstNLines($src, $dest, $numLinesToDelete)
454
+ {
455
+ $handle = fopen($src, "r");
456
+ $handleDest = fopen($dest, "w");
457
+
458
+ $currCount = 0;
459
+
460
+ while ($nextLine = fgets($handle))
461
+ {
462
+ $currCount++;
463
+
464
+ if ($currCount > $numLinesToDelete) {
465
+ fwrite($handleDest, $nextLine);
466
+ }
467
+ }
468
+ fclose($handle);
469
+ fclose($handleDest);
470
+
471
+ return $currCount;
472
+ }
473
+
474
+
475
+ }
app/code/community/Camiloo/Pay4later/controllers/Adminhtml/Pay4latershippingController.php ADDED
@@ -0,0 +1,397 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Camiloo_Pay4later_Adminhtml_Pay4latershippingController extends Mage_Adminhtml_Controller_action
4
+ {
5
+
6
+ protected function _initAction() {
7
+ $this->loadLayout()
8
+ ->_setActiveMenu('system/pay4later')
9
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Pay4Later Integration'), Mage::helper('adminhtml')->__('Set Express Checkout Shipping Options'));
10
+
11
+ return $this;
12
+ }
13
+
14
+ public function indexAction() {
15
+
16
+ if(Mage::getModel('pay4later/pay4laterlink')->initiateview($this)){
17
+ $this->_initAction();
18
+ $this->_addContent($this->getLayout()->createBlock('pay4later/adminhtml_shipping_edit'))
19
+ ->_addLeft($this->getLayout()->createBlock('pay4later/adminhtml_shipping_edit_tabs'));
20
+ }else{
21
+ $this->_initAction();
22
+ }
23
+ $this->renderLayout();
24
+
25
+ }
26
+
27
+ public function downloadhelperAction()
28
+ {
29
+ $_inprogress = 'camiloo_pay4latershippingbulkdownload_selection_inprogress';
30
+ $_flatcatalogKey = 'camiloo_pay4latershippingbulkdownload_selection_flatcatalog';
31
+ $_totalsizeKey = 'camiloo_pay4latershippingbulkdownload_selection_totalsize';
32
+ $_currPageCountKey = 'camiloo_pay4latershippingbulkdownload_selection_currentpagecount';
33
+
34
+ $_pageSizeKey = 'camiloo_pay4latershippingbulkdownload_selection_pagesize';
35
+ $_timeKey = 'camiloo_pay4latershippingbulkdownload_selection_timecsv';
36
+ $_csvFile = 'bulkdownload-shipping.csv';
37
+
38
+ $_csvFirstLine = "Weight From, Weight To, Price From, Price To, Shipping Name, Shipping Price Excluding Tax\r\n";
39
+ $_tableNameForCsv = 'shipping';
40
+
41
+
42
+ error_reporting(E_ALL);
43
+ ini_set("display_errors","on");
44
+ ini_set('max_execution_time', 30000); //300 seconds = 5 minutes
45
+
46
+ if($_POST['regenerate'] == 1)
47
+ {
48
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(0, $_inprogress);
49
+ }
50
+
51
+ if(Mage::getModel('pay4later/pay4later')->loadSessionValue($_inprogress) < 1)
52
+ {
53
+ $totalsize = 0;
54
+ $currentpagecount = 0;
55
+
56
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
57
+ $table_prefix = Mage::getConfig()->getTablePrefix();
58
+ $sqlTemp = "SELECT count(*) as count FROM {$table_prefix}pay4later_shipping";
59
+ $result = $db->query($sqlTemp);
60
+ $row = $result->fetch(PDO::FETCH_ASSOC);
61
+
62
+ $totalsize = $row['count'];
63
+ $currentpagecount = 0;
64
+ // NB Page size is always 100
65
+
66
+ echo "Total Size $totalsize\n";
67
+ echo "Current Page Count $currentpagecount\n";
68
+
69
+ // Instantiate the download
70
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(1, $_inprogress);
71
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($totalsize, $_totalsizeKey);
72
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($currentpagecount, $_currPageCountKey);
73
+ Mage::getModel('pay4later/pay4later')->saveSessionValue("", $_timeKey);
74
+
75
+ // check the file is clear
76
+ $file = fopen("/tmp/".$_csvFile, "w+");
77
+ fwrite($file, $_csvFirstLine);
78
+ fclose($file);
79
+
80
+
81
+ echo '<script type="text/javascript">parent.updatestatus("0%","0 out of '.$totalsize.' shipping rates processed","");
82
+ </script>';
83
+
84
+ }
85
+ else if(Mage::getModel('pay4later/pay4later')->loadSessionValue($_inprogress) < 2)
86
+ {
87
+ // Run a 'job' from the download.
88
+ $start = microtime();
89
+
90
+ $totalsize = Mage::getModel('pay4later/pay4later')->loadSessionValue($_totalsizeKey);
91
+ $currentpagecount = Mage::getModel('pay4later/pay4later')->loadSessionValue($_currPageCountKey);
92
+
93
+ echo "Total Size $totalsize\n"; //119
94
+ echo "Current Page Count $currentpagecount\n"; //1.. [with the ++ below]
95
+
96
+ // Move to the next page (block of 100)
97
+ $currentpagecount++;
98
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($currentpagecount, $_currPageCountKey);
99
+
100
+
101
+ // $_limitFrom = ($currentpagecount-1)*100;
102
+ $_limitTo = ($currentpagecount*100)-1;
103
+ if($totalsize != 0){
104
+ $percent = "".min(floor($_limitTo / $totalsize * 100), 100)."%";
105
+ }else{
106
+ $percent = "100%";
107
+ }
108
+ $file = fopen("/tmp/".$_csvFile, "a+");
109
+
110
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
111
+ $table_prefix = Mage::getConfig()->getTablePrefix();
112
+ $sqlTemp = "SELECT * FROM {$table_prefix}pay4later_shipping LIMIT $currentpagecount,100";
113
+ $result = $db->query($sqlTemp);
114
+ while($row = $result->fetch(PDO::FETCH_ASSOC)){
115
+
116
+ $this->writeCsvRowShipping($file, $row);
117
+
118
+ }
119
+
120
+ fclose($file);
121
+
122
+ $end = microtime();
123
+ $timetaken = $this->microtime_diff($start,$end);
124
+ $timetaken = $timetaken + (1/4);
125
+
126
+ $times = Mage::getModel('pay4later/pay4later')->loadSessionValue($_timeKey);
127
+ if($percent != "100%"){
128
+ $times .= $timetaken.",";
129
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($times,$_timeKey);
130
+ }else{
131
+ $times .= $timetaken;
132
+ Mage::getModel('pay4later/pay4later')->saveSessionValue("",$_timeKey);
133
+ }
134
+
135
+ $times = explode(",",$times);
136
+ $totaltime = 0;
137
+
138
+ foreach($times as $time){
139
+ $totaltime = $totaltime + $time;
140
+ }
141
+
142
+ $timecount = sizeof($times);
143
+
144
+ $timeleft = floor(abs(($totaltime / $timecount) * (ceil($totalsize/100) - $currentpagecount) ));
145
+
146
+ if($percent != "100%" && $totalsize > 0){
147
+ // we are not complete yet.
148
+ echo '<script type="text/javascript">
149
+ parent.updatestatus("'.$percent.'","'.(100 * $currentpagecount).' out of '.$totalsize.' products processed","'.$timeleft.' seconds remaining");
150
+ </script>';
151
+ }else{
152
+ // we are complete - display the download div.
153
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(2, $_inprogress);
154
+ echo '<script type="text/javascript">
155
+ parent.godownload();
156
+ </script>';
157
+ }
158
+ }
159
+ else
160
+ {
161
+ // this is a special status sent to serve downloads
162
+ header('Content-Description: File Transfer');
163
+ header('Content-Type: text/csv');
164
+ header('Content-Length: ' . filesize("/tmp/".$_csvFile));
165
+ header('Content-Disposition: attachment; filename='.$_csvFile);
166
+ $this->readfile_chunked("/tmp/".$_csvFile);
167
+ }
168
+ }
169
+
170
+ public function writeCsvRowShipping($file, $shipping)
171
+ {
172
+ if (sizeof($shipping) > 0)
173
+ {
174
+ fwrite($file, $shipping['WeightFrom'].','.$shipping['WeightTo'].','.$shipping['PriceFrom'].','.$shipping['PriceTo'].','.$shipping['ShippingName'].','.$shipping['ShippingPrice']."\r\n");
175
+
176
+ }
177
+ else
178
+ {
179
+ fwrite($file, ",,,,,\r\n");
180
+ }
181
+ }
182
+
183
+ private function safeOutput($input) {
184
+
185
+ $pattern = '/[^A-Za-z0-9 ]/i';
186
+ $replacement = '_';
187
+ $nameToUse = preg_replace($pattern, $replacement, $input);
188
+ return $nameToUse;
189
+ }
190
+
191
+ public function microtime_diff($start, $end=NULL)
192
+ {
193
+ if( !$end ) {
194
+ $end = microtime();
195
+ }
196
+ list($start_usec, $start_sec) = explode(" ", $start);
197
+ list($end_usec, $end_sec) = explode(" ", $end);
198
+ $diff_sec= intval($end_sec) - intval($start_sec);
199
+ $diff_usec= floatval($end_usec) - floatval($start_usec);
200
+ return floatval( $diff_sec ) + $diff_usec;
201
+ }
202
+
203
+ public function readfile_chunked($filename, $retbytes = TRUE) {
204
+ error_reporting(0);
205
+ $buffer = '';
206
+ $cnt = 0;
207
+
208
+ $handle = fopen($filename, 'rb');
209
+ if ($handle === false) {
210
+ return false;
211
+ }
212
+ while (!feof($handle)) {
213
+ $buffer = fread($handle,1024*1024);
214
+ echo $buffer;
215
+ ob_flush();
216
+ flush();
217
+ if ($retbytes) {
218
+ $cnt += strlen($buffer);
219
+ }
220
+ }
221
+ $status = fclose($handle);
222
+ if ($retbytes && $status) {
223
+ return $cnt; // return num. bytes delivered like readfile() does.
224
+ }
225
+ return $status;
226
+ }
227
+
228
+ public function uploadhelperAction(){
229
+
230
+ $output = array();
231
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
232
+ $table_prefix = Mage::getConfig()->getTablePrefix();
233
+
234
+ ini_set('max_execution_time', 30000); //300 seconds = 5 minutes
235
+
236
+ if($_POST['regenerate'] == 1){
237
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(0,'camiloo_pay4later_bulkupload_shipping_inprogress');
238
+ }
239
+
240
+ if(Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_shipping_inprogress') < 1){
241
+
242
+ $filename = $_FILES['csvfile']['tmp_name'];
243
+
244
+ // Create a secure name for the temp file
245
+ $country = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_selection_marketplace');
246
+ $name = time()."_bulkupload_shipping_";
247
+ $tempFileName = "/tmp/".$name.".csv";
248
+
249
+ //
250
+ // Copy filename to tempFileName, discarding the first line
251
+ //
252
+ $totalsize = $this->deleteFirstNLines($filename, $tempFileName, 1);
253
+ $currentpagecount = 0;
254
+ $pagesize = ceil($totalsize / 100);
255
+
256
+ // Instantiate the upload
257
+ Mage::getModel('pay4later/pay4later')->saveSessionValue(1,'camiloo_pay4later_bulkupload_shipping_inprogress');
258
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($totalsize,'camiloo_pay4later_bulkupload_shipping_totalsize');
259
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($currentpagecount,'camiloo_pay4later_bulkupload_shipping_currentpagecount');
260
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($pagesize,'camiloo_pay4later_bulkupload_shipping_pagesize');
261
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($name,'camiloo_pay4later_bulkupload_shipping_filename');
262
+ Mage::getModel('pay4later/pay4later')->saveSessionValue("",'camiloo_pay4later_bulkupload_shipping_timecsv');
263
+
264
+ // truncate the table; we'll be importing new rows then.
265
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
266
+ $table_prefix = Mage::getConfig()->getTablePrefix();
267
+ $sqlTemp = "TRUNCATE TABLE {$table_prefix}pay4later_shipping";
268
+ $result = $db->query($sqlTemp);
269
+
270
+ echo '<script type="text/javascript">parent.processfileupload();parent.updatestatusupload("0%","0 out of $totalsize shipping rates processed","");
271
+ </script>';
272
+ }
273
+ else if (Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_shipping_inprogress') < 2)
274
+ {
275
+ // run a 'job' from the upload.
276
+ $totalsize = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_shipping_totalsize');
277
+ $currentpagecount = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_shipping_currentpagecount');
278
+ $pagesize = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_shipping_pagesize');
279
+ $name = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_shipping_filename');
280
+
281
+ // move to the next page
282
+ $currentpagecount++;
283
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($currentpagecount,'camiloo_pay4later_bulkupload_shipping_currentpagecount');
284
+
285
+ // calculate the amount of results output so far, and the amount to output this time.
286
+ if(($pagesize * $currentpagecount) < $totalsize){
287
+ $currentcount = $pagesize * $currentpagecount;
288
+ $thistime = $pagesize;
289
+ $percent = "".floor($currentcount / $totalsize * 100)."%";
290
+ $pagesleft = floor(($totalsize - $currentcount) / $pagesize);
291
+ }else{
292
+ $currentcount = $totalsize;
293
+ $thistime = $totalsize - ($pagesize * ($currentpagecount - 1));
294
+ $percent = "100%";
295
+ $pagesleft = 0;
296
+ }
297
+
298
+ $tempFileName = "/tmp/".$name.".csv";
299
+
300
+ $handle = fopen($tempFileName, "r");
301
+ $start = microtime();
302
+
303
+ for ($i = 1; $i <= $thistime; $i++){
304
+
305
+ $value = fgets($handle);
306
+
307
+ if(!$value){
308
+ break;
309
+ }
310
+
311
+ $value = str_replace(",","','","'".$value."'");
312
+
313
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
314
+ $table_prefix = Mage::getConfig()->getTablePrefix();
315
+ $sqlTemp = "INSERT INTO {$table_prefix}pay4later_shipping (`WeightFrom`,`WeightTo`,`PriceFrom`,`PriceTo`,`ShippingName`,`ShippingPrice`) VALUES ($value)";
316
+ $result = $db->query($sqlTemp);
317
+
318
+
319
+ }
320
+
321
+ copy($tempFileName, $tempFileName."TMP");
322
+ $this->deleteFirstNLines($tempFileName."TMP", $tempFileName, $thistime);
323
+
324
+ $end = microtime();
325
+ $timetaken = $this->microtime_diff($start,$end);
326
+ $timetaken = $timetaken + (1/5);
327
+
328
+
329
+ $times = Mage::getModel('pay4later/pay4later')->loadSessionValue('camiloo_pay4later_bulkupload_shipping_timecsv');
330
+ if($percent != "100%"){
331
+ $times .= $timetaken.",";
332
+ Mage::getModel('pay4later/pay4later')->saveSessionValue($times,'camiloo_pay4later_bulkupload_shipping_timecsv');
333
+ }else{
334
+ $times .= $timetaken;
335
+ Mage::getModel('pay4later/pay4later')->saveSessionValue("",'camiloo_pay4later_bulkupload_shipping_timecsv');
336
+ }
337
+
338
+ $times = explode(",",$times);
339
+ $totaltime = 0;
340
+
341
+ foreach($times as $time){
342
+ $totaltime = $totaltime + $time;
343
+ }
344
+
345
+ $timecount = sizeof($times);
346
+
347
+ $timeleft = floor(abs(($totaltime / $timecount) * $pagesleft));
348
+
349
+
350
+
351
+
352
+
353
+ if($percent != "100%"){
354
+ // we are not complete yet.
355
+ echo '<script type="text/javascript">
356
+ parent.updatestatusupload("'.$percent.'","'.$currentcount.' out of '.$totalsize.' shipping rates processed","'.$timeleft.' seconds remaining");
357
+ </script>';
358
+ }else{
359
+ echo '<script type="text/javascript">
360
+ parent.gouploadcomplete();
361
+ </script>';
362
+ }
363
+
364
+ }
365
+
366
+
367
+
368
+ }
369
+
370
+ /**
371
+ * Deletes the first $numLinesToDelete lines from the $src file and outputs the result to $dest.
372
+ * The file $src isn't modified. $dest is overwritten if it already exists.
373
+ * Returns the number of lines in the file $src.
374
+ */
375
+ private function deleteFirstNLines($src, $dest, $numLinesToDelete)
376
+ {
377
+ $handle = fopen($src, "r");
378
+ $handleDest = fopen($dest, "w");
379
+
380
+ $currCount = 0;
381
+
382
+ while ($nextLine = fgets($handle))
383
+ {
384
+ $currCount++;
385
+
386
+ if ($currCount > $numLinesToDelete) {
387
+ fwrite($handleDest, $nextLine);
388
+ }
389
+ }
390
+ fclose($handle);
391
+ fclose($handleDest);
392
+
393
+ return $currCount;
394
+ }
395
+
396
+
397
+ }
app/code/community/Camiloo/Pay4later/controllers/ApiController.php ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* This class handles backcommunication from Pay4Later including [but not limited to] the CSN */
4
+
5
+ class Camiloo_Pay4later_ApiController extends Mage_Core_Controller_Front_Action
6
+ {
7
+ public function acceptAction(){
8
+ // customer has been returned to the website after a credit application was accepted.
9
+ // if the customer was returned from an EC then they won't be able to access the success page. Hm.
10
+ if(strpos("a".$this->getRequest()->getParam('retaileruniqueref'),"EC") > 0){
11
+
12
+ $this->loadLayout();
13
+ $this->renderLayout();
14
+
15
+ }else{
16
+ $this->_redirect('checkout/onepage/success');
17
+ }
18
+ }
19
+
20
+ public function declineAction(){
21
+ // customer has been returned to the website after a credit application was declined.
22
+ // explain the decline to the customer.
23
+
24
+ $this->loadLayout();
25
+ $this->renderLayout();
26
+
27
+
28
+ }
29
+
30
+ public function referAction(){
31
+ // customer has been returned to the website after a credit application was referred for manual inspection.
32
+ // explain the referral to the customer.
33
+
34
+ $this->loadLayout();
35
+ $this->renderLayout();
36
+
37
+ }
38
+
39
+ public function cancelAction(){
40
+ // customer has been returned to the website after a credit application was cancelled.
41
+ $this->_redirect('checkout/cart');
42
+ }
43
+
44
+ public function csnAction(){
45
+ // this is the callback used by the p4l system itself; we need to secure it at this end.
46
+ // for extra security, we won't just take the CSN [forgeable] at face value; instead we'll compare it to the response from the status API.
47
+
48
+ // okay, we have received a callback. we need to get this data, so lets use magento to convert it into an object...
49
+ $data = $this->getRequest()->getPost();
50
+ $retref = $data['Identification']['RetailerUniqueRef'];
51
+ if(strpos($retref,"-")){
52
+ $retref = explode("-",$retref);
53
+ $retref = $retref[1];
54
+ }
55
+
56
+ // SECURITY SCREENING: Is this pay4later calling, or someone pretending to be them?
57
+ $ip = $_SERVER['REMOTE_ADDR'];
58
+ if($ip == "94.236.48.10"){
59
+ // continue; the IP calling is Pay4Later HQ.
60
+ }else{
61
+ mail('hello@camiloo.co.uk','Pay4Later Using different IP?','IP check failed - received IP was '.$ip);
62
+ }
63
+
64
+
65
+ if(strpos("a".$retref,"EC") > 0){
66
+ // this is an express checkout request; we don't yet have an order on the system as until now we didn't have the data needed [shipping info!]
67
+
68
+ $quote = Mage::getSingleton('sales/quote');
69
+ // Quote should be assigned to a store to ensure correct order ID incrementation
70
+ $quote->setStoreId(Mage::app()->getStore()->getStoreId());
71
+ $quote->reserveOrderId();
72
+
73
+ $shipping_address = Mage::getModel('sales/quote_address');
74
+ $shipping_address->setFirstname($data['Consumer']['Forename']);
75
+ $shipping_address->setLastname($data['Consumer']['Surname']);
76
+
77
+ $shipping_address->setStreet($data['Consumer']['HouseNumber']." ".$data['Consumer']['Street']);
78
+ $shipping_address->setCity($data['Consumer']['Town']);
79
+ $shipping_address->setPostcode($data['Consumer']['Postcode']);
80
+ $shipping_address->setCountryId("GB");
81
+ $shipping_address->setTelephone($data['Consumer']['PhoneNumber']);
82
+ $billing_address = clone $shipping_address;
83
+ $quote->setShippingAddress($shipping_address);
84
+ $quote->setBillingAddress($billing_address);
85
+ $quote->setCustomerFirstname($data['Consumer']['Forename']);
86
+ $quote->setCustomerLastname($data['Consumer']['Surname']);
87
+ $quote->setCustomerEmail($data['Consumer']['EmailAddress']);
88
+ $quote->save();
89
+
90
+ // we need to load the EC request.
91
+ $retref = str_replace("EC","",$retref);
92
+
93
+ $expresscheckout = Mage::getModel('pay4later/expresscheckout')->load($retref);
94
+
95
+ if($expresscheckout->getOrderEntityId() != ""){
96
+
97
+ $retref = $expresscheckout->getOrderEntityId();
98
+
99
+ }else{
100
+
101
+ $product = Mage::getModel('catalog/product')->load($expresscheckout->getProductId());
102
+ $req['super_attribute'] = unserialize($expresscheckout->getSuperAttribute());
103
+ $req['options'] = unserialize($expresscheckout->getOptions());
104
+
105
+ if($product->getTypeId() == "configurable"){
106
+ $req['qty'] = $expresscheckout->getQty();
107
+ }
108
+
109
+
110
+ $request = new Varien_Object($req);
111
+ $item = $quote->addProduct($product,$request);
112
+
113
+ $quote->collectTotals();
114
+ $taxtotal = 0;
115
+ foreach($quote->getAllItems() as $item){
116
+ $taxtotal = $taxtotal + $item->getTaxAmount();
117
+ }
118
+ $table_prefix = Mage::getConfig()->getTablePrefix();
119
+
120
+ $totalpriceofitems = $product->getPrice() * $expresscheckout->getQty();
121
+ $totalweightofitems = $product->getWeight() * $expresscheckout->getQty();
122
+ $getShipping = "SELECT * FROM {$table_prefix}pay4later_shipping WHERE ((`PriceFrom` <= $totalpriceofitems) OR (`PriceFrom`= '')) AND ((`PriceTo` >= $totalpriceofitems) OR (`PriceTo`= '')) AND ((`WeightFrom` <= $totalweightofitems) OR (`WeightFrom`= '')) AND ((`WeightTo` >= $totalweightofitems) OR (`WeightTo`= '')) LIMIT 0,1";
123
+
124
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
125
+ $result = $db->query($getShipping);
126
+ $row = $result->fetch(PDO::FETCH_ASSOC);
127
+
128
+ $quote->setShippingDescription($row['ShippingName']);
129
+ $includingtax = Mage::helper('tax')->getShippingPrice($row['ShippingPrice'], true, $quote->getShippingAddress(), $quote->getCustomerTaxClassId());
130
+ $shippingtax = $includingtax - $row['ShippingPrice'];
131
+
132
+ $quote->setShippingAmount($row['ShippingPrice']);
133
+ $quote->setBaseShippingAmount($row['ShippingPrice']);
134
+ $quote->setTaxAmount($taxtotal + $shippingtax);
135
+ $quote->setBaseTaxAmount($taxtotal + $shippingtax);
136
+ $quote->collectTotals();
137
+ $quote->setGrandTotal($quote->getGrandTotal() + $row['ShippingPrice'] + $shippingtax);
138
+ $quote->setBaseGrandTotal($quote->getGrandTotal() + $row['ShippingPrice'] + $shippingtax);
139
+
140
+ $weight = 0;
141
+ foreach($quote->getAllItems() as $item){
142
+ $weight = $weight + ($item->getWeight() * $item->getQty());
143
+ }
144
+
145
+ $quote->setOverallWeight($weight);
146
+
147
+
148
+ // this function takes a quote and converts it into an order.
149
+ $quotePaymentObj = $quote->getPayment();
150
+ $quotePaymentObj->setMethod('p4lpayment');
151
+ $quote->setPayment($quotePaymentObj);
152
+
153
+ $convertquote = Mage::getModel('sales/convert_quote');
154
+ $order = $convertquote->addressToOrder($quote->getShippingAddress());
155
+ $orderPaymentObj = $convertquote->paymentToOrderPayment($quotePaymentObj);
156
+
157
+ $order->setBillingAddress($convertquote->addressToOrderAddress($quote->getBillingAddress()));
158
+ $order->setPayment($convertquote->paymentToOrderPayment($quote->getPayment()));
159
+ $order->setShippingAddress($convertquote->addressToOrderAddress($quote->getShippingAddress()));
160
+ $order->setCustomerIsGuest(1);
161
+
162
+ foreach ($quote->getAllItems() as $item) {
163
+ $orderItem = $convertquote->itemToOrderItem($item);
164
+ if ($item->getParentItem()) {
165
+ $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId()));
166
+ }
167
+
168
+ $order->addItem($orderItem);
169
+ }
170
+
171
+ $order->setCanShipPartiallyItem(false);
172
+ $order->save();
173
+ $orderPayment = $order->getPayment();
174
+
175
+ $financeProducts['ONIF6'] = "6 Months Interest Free Credit (0% APR)";
176
+ $financeProducts['ONIF10'] = "10 Months Interest Free Credit (0% APR)";
177
+ $financeProducts['ONIF12'] = "12 Months Interest Free Credit (0% APR)";
178
+ $financeProducts['ONIF18'] = "18 Months Interest Free Credit (0% APR)";
179
+ $financeProducts['ONIF24'] = "24 Months Interest Free Credit (0% APR)";
180
+ $financeProducts['ONIF36'] = "36 Months Interest Free Credit (0% APR)";
181
+ $financeProducts['ONIB12195'] = "12 Months Classic Credit (19.5% APR)";
182
+ $financeProducts['ONIB24195'] = "24 Months Classic Credit (19.5% APR)";
183
+ $financeProducts['ONIB36195'] = "36 Months Classic Credit (19.5% APR)";
184
+ $financeProducts['ONIB1229'] = "12 Months Promotional Credit (2.9% APR)";
185
+ $financeProducts['ONIB2429'] = "24 Months Promotional Credit (2.9% APR)";
186
+ $financeProducts['ONIB3629'] = "36 Months Promotional Credit (2.9% APR)";
187
+ $financeProducts['ONIB1239'] = "12 Months Promotional Credit (3.9% APR)";
188
+ $financeProducts['ONIB2439'] = "24 Months Promotional Credit (3.9% APR)";
189
+ $financeProducts['ONIB3639'] = "36 Months Promotional Credit (3.9% APR)";
190
+ $financeProducts['ONIB1249'] = "12 Months Promotional Credit (4.9% APR)";
191
+ $financeProducts['ONIB2449'] = "24 Months Promotional Credit (4.9% APR)";
192
+ $financeProducts['ONIB3649'] = "36 Months Promotional Credit (4.9% APR)";
193
+
194
+ // to get the right data for this section we'll have to do a little hunting
195
+ $depositpercent = ($data['Finance']['Deposit'] / 100) / ($data['Goods'][0]['Price'] / 100) * 100;
196
+
197
+ $financeProductCode = str_replace(".","",$data['Finance']['Code']);
198
+ $financeProductName = $financeProducts[$code];
199
+ $orderPayment->setData('pay4later_depositpercent',$depositpercent);
200
+ $orderPayment->setData('pay4later_productid',$data['Finance']['Code']);
201
+ $orderPayment->setData('pay4later_productname',$financeProductName);
202
+ $orderPayment->setData('pay4later_crid',$data['CreditRequestID']);
203
+ $orderPayment->save();
204
+
205
+ $taxtotal = 0;
206
+ foreach($order->getAllItems() as $item){
207
+ $taxtotal = $taxtotal + $item->getTaxAmount();
208
+ }
209
+
210
+ $totalpriceofitems = $product->getPrice() * $item->getQtyOrdered();
211
+ $totalweightofitems = $product->getWeight() * $item->getQtyOrdered();
212
+
213
+ $table_prefix = Mage::getConfig()->getTablePrefix();
214
+ $getShipping = "SELECT * FROM {$table_prefix}pay4later_shipping WHERE ((`PriceFrom` <= $totalpriceofitems) OR (`PriceFrom`= '')) AND ((`PriceTo` >= $totalpriceofitems) OR (`PriceTo`= '')) AND ((`WeightFrom` <= $totalweightofitems) OR (`WeightFrom`= '')) AND ((`WeightTo` >= $totalweightofitems) OR (`WeightTo`= '')) LIMIT 0,1";
215
+
216
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
217
+ $result = $db->query($getShipping);
218
+ $row = $result->fetch(PDO::FETCH_ASSOC);
219
+
220
+ $order->setShippingDescription($row['ShippingName']);
221
+ $includingtax = Mage::helper('tax')->getShippingPrice($row['ShippingPrice'], true, $quote->getShippingAddress(), $quote->getCustomerTaxClassId());
222
+ $shippingtax = $includingtax - $row['ShippingPrice'];
223
+
224
+ $order->setShippingAmount($row['ShippingPrice']);
225
+ $order->setBaseShippingAmount($row['ShippingPrice']);
226
+ $order->setTaxAmount($taxtotal + $shippingtax);
227
+ $order->setBaseTaxAmount($taxtotal + $shippingtax);
228
+ $order->setGrandTotal($quote->getGrandTotal());
229
+ $order->setBaseGrandTotal($quote->getGrandTotal());
230
+ $order->save();
231
+ $order->place();
232
+ $order->save();
233
+
234
+ $expresscheckout->setOrderEntityId($order->getId());
235
+ $expresscheckout->save();
236
+ $retref = $order->getId();
237
+
238
+ }
239
+
240
+
241
+ }
242
+
243
+ // this is the normal checkout method; the checkout request ID is the order entity id from magento, so updating this as necessary is easypeasy.
244
+ // lets focus on this method for the time being; we'll worry about express checkouts again soon though.
245
+
246
+ $order = Mage::getModel('sales/order')->load($retref);
247
+
248
+ // action to take varies based on the state given.
249
+ if($data['Status'] == "PRE-DECLINE"){
250
+ $order->setState('declinedfinance', true);
251
+ }else if($data['Status'] == "ACCEPT"){
252
+ $order->setState('acceptedfinance', true);
253
+ }else if($data['Status'] == "DECLINE"){
254
+ $order->setState('declinedfinance', true);
255
+ }else if($data['Status'] == "REFER"){
256
+ $order->setState('referredfinance', true);
257
+ }else if($data['Status'] == "VERIFIED"){
258
+
259
+ $invoice = $order->prepareInvoice();
260
+
261
+ if (version_compare(Mage::getVersion(), "1.4.1.1", "="))
262
+ {
263
+ $invoice->setSubtotalInclTax($order->getSubtotal());
264
+ $invoice->setBaseSubtotalInclTax($order->getBaseSubtotal());
265
+ }
266
+
267
+ $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
268
+
269
+ if (in_array("Netz98_Picklist", $modules))
270
+ {
271
+ $invoice->save();
272
+ }
273
+ else
274
+ {
275
+ $invoice->register();
276
+ }
277
+
278
+ Mage::getModel('core/resource_transaction')
279
+ ->addObject($invoice)
280
+ ->addObject($invoice->getOrder())
281
+ ->save();
282
+ $order->sendNewOrderEmail();
283
+ $order->setState('processing', true);
284
+ }else if($data['Status'] == "FULFILLED"){
285
+ $order->setState('complete', true);
286
+ }else if($data['Status'] == "COMPLETE"){
287
+ $order->setState('complete', true);
288
+ }else if($data['Status'] == "CANCELLED"){
289
+ $order->setState('canceled', true);
290
+ // the page URL will determine which page to load.
291
+ }
292
+
293
+ $orderPayment = $order->getPayment();
294
+ $orderPayment->setData('pay4later_crid',$data['CreditRequestID']);
295
+ $orderPayment->save();
296
+ $order->save();
297
+
298
+ }
299
+
300
+
301
+
302
+ }
303
+
304
+
305
+ ?>
app/code/community/Camiloo/Pay4later/controllers/IndexController.php ADDED
@@ -0,0 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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Camiloo_Pay4later_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+
5
+ public function redirectAction(){
6
+
7
+ // this function will pass the customer on to the pay4later application process.
8
+ $quote_id = Mage::getSingleton('checkout/session')->getQuoteId();
9
+ $order_id = Mage::getSingleton('checkout/session')->getLastOrderId();
10
+ $quote = Mage::getModel('sales/quote')->load($quote_id);
11
+ $order = Mage::getModel('sales/order')->load($order_id);
12
+ $orderPayment = $order->getPayment();
13
+
14
+ $depositPercent = $quote->getPayment()->getData('pay4later_depositpercent');
15
+ $financeProductId = $quote->getPayment()->getData('pay4later_productid');
16
+ $financeProductName = $quote->getPayment()->getData('pay4later_productname');
17
+
18
+ // copy the payment data from the quote to the order payment model.
19
+ $orderPayment->setData('pay4later_depositpercent',$depositPercent);
20
+ $orderPayment->setData('pay4later_productid',$financeProductId);
21
+ $orderPayment->setData('pay4later_productname',$financeProductName);
22
+ $orderPayment->save();
23
+
24
+ $valueofitems = $quote->getGrandTotal();
25
+
26
+ $apikey = Mage::getStoreConfig('pay4later/apisettings/apikey');
27
+ if(Mage::getStoreConfig('pay4later/apisettings/testmode')){
28
+ $applicationurl = 'https://test.pay4later.com/credit_app/';
29
+ }else{
30
+ $applicationurl = 'https://secure.pay4later.com/credit_app/';
31
+ }
32
+
33
+ $depositAmount = $valueofitems * ($depositPercent / 100);
34
+
35
+ // at this point we should log the communication....
36
+ Mage::getModel('pay4later/pay4laterlink')->getApplicationForm($applicationurl, $apikey, $order_id, $valueofitems, $depositAmount, $financeProductId);
37
+
38
+
39
+ }
40
+
41
+ public function expresscheckoutAction(){
42
+ $data = $this->getRequest()->getPost();
43
+
44
+ $product = Mage::getModel('catalog/product')->load($this->getRequest()->getPost('product'));
45
+
46
+ $price = $product->getPrice();
47
+ $weight = $product->getWeight();
48
+
49
+ $shipping_address = Mage::getModel('sales/quote_address');
50
+ $shipping_address->setFirstname("Temporary");
51
+ $shipping_address->setLastname("Customer");
52
+
53
+ $shipping_address->setStreet("Address");
54
+ $shipping_address->setCity("Manchester");
55
+ $shipping_address->setPostcode("M3 1NP");
56
+ $shipping_address->setCountryId("GB");
57
+
58
+ $simplePricesTax = (Mage::helper('tax')->displayPriceIncludingTax() || Mage::helper('tax')->displayBothPrices());
59
+ $_minimalPriceValue = $product->getMinimalPrice();
60
+ $_minimalPrice = Mage::helper('tax')->getPrice($product, $_minimalPriceValue, $simplePricesTax, $shipping_address, $shipping_address);
61
+ $_price = Mage::helper('tax')->getPrice($product, $product->getPrice(), null, $shipping_address, $shipping_address);
62
+ $_regularPrice = Mage::helper('tax')->getPrice($product, $product->getPrice(), $simplePricesTax, $shipping_address, $shipping_address);
63
+ $_finalPrice = Mage::helper('tax')->getPrice($product, $product->getFinalPrice(), null, $shipping_address, $shipping_address);
64
+ $_finalPriceInclTax = Mage::helper('tax')->getPrice($product, $product->getFinalPrice(), true, $shipping_address, $shipping_address);
65
+
66
+ $depositPercent = Mage::getStoreConfig('pay4later/productpage/ecdeposit');
67
+
68
+ $financeProduct = Mage::getStoreConfig('pay4later/productpage/financeoption');
69
+ $qty = $this->getRequest()->getPost('qty');
70
+
71
+ $apikey = Mage::getStoreConfig('pay4later/apisettings/apikey');
72
+ if(Mage::getStoreConfig('pay4later/apisettings/testmode')){
73
+ $applicationurl = 'https://test.pay4later.com/credit_app/';
74
+ }else{
75
+ $applicationurl = 'https://secure.pay4later.com/credit_app/';
76
+ }
77
+
78
+ $valueofitems = $_finalPriceInclTax * $qty;
79
+ $weight = $weight * $qty;
80
+
81
+ // before continuing, we need to add delivery to the order.
82
+ $table_prefix = Mage::getConfig()->getTablePrefix();
83
+ $getShipping = "SELECT * FROM {$table_prefix}pay4later_shipping WHERE ((`PriceFrom` <= $valueofitems) OR (`PriceFrom`= '')) AND ((`PriceTo` >= $valueofitems) OR (`PriceTo`= '')) AND ((`WeightFrom` <= $weight) OR (`WeightFrom`= '')) AND ((`WeightTo` >= $weight) OR (`WeightTo`= '')) LIMIT 0,1";
84
+
85
+ $db = Mage::getSingleton("core/resource")->getConnection("core_write");
86
+ $result = $db->query($getShipping);
87
+ $row = $result->fetch(PDO::FETCH_ASSOC);
88
+ $deliverycost = $row['ShippingPrice'];
89
+ $shippingIncludingtax = Mage::helper('tax')->getShippingPrice($row['ShippingPrice'], true, $shipping_address, $shipping_address);
90
+ $valueofitems = $valueofitems + $shippingIncludingtax;
91
+ $depositAmount = $valueofitems * ($depositPercent / 100);
92
+
93
+
94
+ $expresscheckout = Mage::getModel('pay4later/expresscheckout');
95
+ $expresscheckout->setProductId($data['product']);
96
+ $expresscheckout->setQty($data['qty']);
97
+
98
+ if(isset($data['options'])){
99
+ $data['options'] = serialize($data['options']);
100
+ $expresscheckout->setOptions($data['options']);
101
+ }
102
+ if(isset($data['confoptions'])){
103
+ $data['super_attribute'] = serialize($data['confoptions']);
104
+ $expresscheckout->setSuperAttribute($data['super_attribute']);
105
+ }
106
+
107
+ $expresscheckout->save();
108
+ Mage::getModel('pay4later/pay4laterlink')->getExpressCheckoutForm($applicationurl, $apikey, $expresscheckout->getId(), $product->getName(), $qty, $valueofitems, $depositAmount, $financeProduct, $shippingIncludingtax);
109
+
110
+
111
+ }
112
+
113
+ public function loadjsapiAction(){
114
+
115
+ // this function loads the JSAPI, then adds additional logic to get the object for the products price
116
+ // passed variable ID is the product ID, we can apply our logic from there forward.
117
+
118
+
119
+ $productid = $this->getRequest()->getParam('id');
120
+ $product = Mage::getModel('catalog/product')->load($productid);
121
+ $price = $product->getPrice();
122
+
123
+ $simplePricesTax = (Mage::helper('tax')->displayPriceIncludingTax() || Mage::helper('tax')->displayBothPrices());
124
+ $_minimalPriceValue = $product->getMinimalPrice();
125
+ $_minimalPrice = Mage::helper('tax')->getPrice($product, $_minimalPriceValue, $simplePricesTax);
126
+ $_price = Mage::helper('tax')->getPrice($product, $product->getPrice());
127
+ $_regularPrice = Mage::helper('tax')->getPrice($product, $product->getPrice(), $simplePricesTax);
128
+ $_finalPrice = Mage::helper('tax')->getPrice($product, $product->getFinalPrice());
129
+ $_finalPriceInclTax = Mage::helper('tax')->getPrice($product, $product->getFinalPrice(), true);
130
+ $valueofitems = $_finalPriceInclTax;
131
+
132
+ // we can offer finance on this product.
133
+
134
+ // load our JSAPI
135
+
136
+ $apikey = Mage::getStoreConfig('pay4later/apisettings/apikey');
137
+ $js = file_get_contents("https://secure.pay4later.com/js_api/FinanceDetails.js.php?api_key=".$apikey);
138
+ echo $js."\n\n";
139
+
140
+ $financeProduct = Mage::getStoreConfig('pay4later/productpage/financeoption');
141
+ $totalCost = number_format($valueofitems,2,".","");
142
+ $depositPercent = Mage::getStoreConfig('pay4later/productpage/ecdeposit');
143
+
144
+ $monthlylabel = explode("#PRICE#",Mage::getStoreConfig('pay4later/productpage/financepricelabel'));
145
+ $buynowlabel = explode("#PRICE#",Mage::getStoreConfig('pay4later/productpage/fullpricelabel'));
146
+ if(!isset($monthlylabel[1])){
147
+ $monthlylabel[1] = "";
148
+ }
149
+ if(!isset($buynowlabel[1])){
150
+ $buynowlabel[1] = "";
151
+ }
152
+
153
+
154
+ echo "var my_fd_obj = new FinanceDetails('$financeProduct',parseFloat($totalCost),parseFloat($depositPercent),parseFloat(0));";
155
+
156
+ // in part 2 we need to output this to the parent window, but for now, the following will do:
157
+ echo "$$('.price-box').each(function(atb) {
158
+ atb.innerHTML = '<p class=\"special-price\"><span class=\"price-label\">".$monthlylabel[0]."</span><span class=\"price\" id=\"product-price-".$productid."\">&pound; '+my_fd_obj.m_inst+' ".$monthlylabel[1]."</span></p><p class=\"old-price\"><span class=\"price-label\">".$buynowlabel[0]."&pound;".$totalCost."".$buynowlabel[1]."</p>';});";
159
+ ?>
160
+ Object.extend(optionsPrice, {
161
+ reload: function() {
162
+ var price;
163
+ var formattedPrice;
164
+ var optionPrices = this.getOptionPrices();
165
+ var nonTaxable = optionPrices[1];
166
+ optionPrices = optionPrices[0];
167
+ $H(this.containers).each(function(pair) {
168
+ var _productPrice;
169
+ var _plusDisposition;
170
+ var _minusDisposition;
171
+ if ($(pair.value)) {
172
+ if (pair.value == 'old-price-'+this.productId && this.productOldPrice != this.productPrice) {
173
+ _productPrice = this.productOldPrice;
174
+ _plusDisposition = this.oldPlusDisposition;
175
+ _minusDisposition = this.oldMinusDisposition;
176
+ } else {
177
+ _productPrice = this.productPrice;
178
+ _plusDisposition = this.plusDisposition;
179
+ _minusDisposition = this.minusDisposition;
180
+ }
181
+
182
+ var price = optionPrices+parseFloat(_productPrice)
183
+ if (this.includeTax == 'true') {
184
+ // tax = tax included into product price by admin
185
+ var tax = price / (100 + this.defaultTax) * this.defaultTax;
186
+ var excl = price - tax;
187
+ var incl = excl*(1+(this.currentTax/100));
188
+ } else {
189
+ var tax = price * (this.currentTax / 100);
190
+ var excl = price;
191
+ var incl = excl + tax;
192
+ }
193
+
194
+ excl += parseFloat(_plusDisposition);
195
+ incl += parseFloat(_plusDisposition);
196
+ excl -= parseFloat(_minusDisposition);
197
+ incl -= parseFloat(_minusDisposition);
198
+
199
+ //adding nontaxlable part of options
200
+ excl += parseFloat(nonTaxable);
201
+ incl += parseFloat(nonTaxable);
202
+
203
+ if (pair.value == 'price-including-tax-'+this.productId) {
204
+ price = incl;
205
+ } else if (pair.value == 'old-price-'+this.productId) {
206
+ if (this.showIncludeTax || this.showBothPrices) {
207
+ price = incl;
208
+ } else {
209
+ price = excl;
210
+ }
211
+ } else {
212
+ if (this.showIncludeTax) {
213
+ price = incl;
214
+ } else {
215
+ if (!this.skipCalculate || _productPrice == 0) {
216
+ price = excl;
217
+ } else {
218
+ price = optionPrices+parseFloat(_productPrice);
219
+ }
220
+ }
221
+ }
222
+
223
+ if (price < 0) price = 0;
224
+
225
+ var my_fd_obj = new FinanceDetails('<?php echo $financeProduct; ?>',parseFloat(price),parseFloat(<?php echo $depositPercent; ?>),parseFloat(0));
226
+
227
+ $$('.product-options-bottom .price-box').each(function(atb) {
228
+ atb.innerHTML = '<p class="special-price"><span class="price-label"><?php echo $monthlylabel[0]; ?></span><span class="price" id="product-price-<?php echo $productid; ?>">&pound; '+my_fd_obj.m_inst+' <?php echo $monthlylabel[1]; ?></span></p><p class="old-price"><span class="price-label"><?php echo $buynowlabel[0]; ?> &pound;'+(price).toFixed(2)+'<?php echo $buynowlabel[1]; ?></p>';});
229
+ $$('.product-view .product-shop .price-box').each(function(atb) {
230
+ atb.innerHTML = '<p class="special-price"><span class="price-label"><?php echo $monthlylabel[0]; ?></span><span class="price" id="product-price-<?php echo $productid; ?>">&pound; '+my_fd_obj.m_inst+' <?php echo $monthlylabel[1]; ?></span></p><p class="old-price"><span class="price-label"><?php echo $buynowlabel[0]; ?> &pound;'+(price).toFixed(2)+'<?php echo $buynowlabel[1]; ?></p>';});
231
+
232
+
233
+ };
234
+ }.bind(this));
235
+ }
236
+ });
237
+ <?php
238
+
239
+ }
240
+
241
+ public function checkoutjsapiAction(){
242
+
243
+ // load our JSAPI
244
+
245
+ $apikey = Mage::getStoreConfig('pay4later/apisettings/apikey');
246
+ $js = file_get_contents("https://secure.pay4later.com/js_api/FinanceDetails.js.php?api_key=".$apikey);
247
+ echo $js."\n\n";
248
+
249
+ // load the quote
250
+ $quote = Mage::getSingleton('checkout/session')->getQuote();
251
+
252
+ $availableoptions = array('ONIF6', 'ONIF10', 'ONIF12', 'ONIF18', 'ONIF24', 'ONIF36', 'ONIB12195', 'ONIB24195', 'ONIB36195', 'ONIB1229', 'ONIB2429', 'ONIB3629', 'ONIB1239', 'ONIB2439', 'ONIB3639', 'ONIB1249', 'ONIB2449', 'ONIB3649');
253
+
254
+
255
+ // we now need to cycle through the quote items and determine which finance options are available to the customer.
256
+ $depositInflation = 0;
257
+
258
+ foreach($quote->getAllItems() as $item){
259
+
260
+ $p4l = "";
261
+ $p4lmodel = Mage::getModel('pay4later/pay4later')->getCollection()->addFieldToFilter('product_id',array('eq'=>$item->getProductId()));
262
+ foreach($p4lmodel as $p4l){
263
+ break;
264
+ }
265
+
266
+ // this will make the below process ignore any items which cannot have finance.
267
+ // meaning that the total amount for this product plus tax will be added to the
268
+ // deposit instead of being added to the finance.
269
+
270
+ if(is_object($p4l)){
271
+ $allzero = true;
272
+ foreach($availableoptions as $key=>$option){
273
+ if($p4l->getData($option) == 1){
274
+ $allzero = false;
275
+ }
276
+ }
277
+ }else{
278
+ $allzero = true;
279
+ // no config; assume no finance.
280
+ }
281
+
282
+ if($allzero == false){
283
+
284
+ // we should be here if there is a finance option available on this product.
285
+ if(is_object($p4l)){
286
+ foreach($availableoptions as $key=>$option){
287
+ if($p4l->getData($option) < 1){
288
+ unset($availableoptions[$key]);
289
+ }
290
+ }
291
+ }
292
+
293
+ }else{
294
+
295
+ $depositInflation = $depositInflation + $item->getRowTotal();
296
+
297
+ }
298
+
299
+ }
300
+
301
+ $_SESSION['p4ltmpinflator'] = $depositInflation;
302
+
303
+ // $availableoptions is now an array of only the available finance options for the products within the customers basket
304
+ // we now need to build up our json array, as this will determine the options available to the customer during the calcualtor usage
305
+
306
+ $outputarray = array();
307
+ foreach($availableoptions as $availableoption){
308
+
309
+
310
+ if($availableoption == "ONIF6"){
311
+ $outputarray['products']['ONIF6']['term'] = 6;
312
+ $outputarray['products']['ONIF6']['productname'] = "6 Months Interest Free Credit (0% APR)";
313
+ $outputarray['products']['ONIF6']['productid'] = "ONIF6";
314
+ }
315
+
316
+ if($availableoption == "ONIF10"){
317
+ $outputarray['products']['ONIF10']['term'] = 10;
318
+ $outputarray['products']['ONIF10']['productname'] = "10 Months Interest Free Credit (0% APR)";
319
+ $outputarray['products']['ONIF10']['productid'] = "ONIF10";
320
+ }
321
+
322
+
323
+ if($availableoption == "ONIF12"){
324
+ $outputarray['products']['ONIF12']['term'] = 12;
325
+ $outputarray['products']['ONIF12']['productname'] = "12 Months Interest Free Credit (0% APR)";
326
+ $outputarray['products']['ONIF12']['productid'] = "ONIF12";
327
+ }
328
+
329
+ if($availableoption == "ONIF18"){
330
+ $outputarray['products']['ONIF18']['term'] = 18;
331
+ $outputarray['products']['ONIF18']['productname'] = "18 Months Interest Free Credit (0% APR)";
332
+ $outputarray['products']['ONIF18']['productid'] = "ONIF18";
333
+ }
334
+
335
+ if($availableoption == "ONIF24"){
336
+ $outputarray['products']['ONIF24']['term'] = 24;
337
+ $outputarray['products']['ONIF24']['productname'] = "24 Months Interest Free Credit (0% APR)";
338
+ $outputarray['products']['ONIF24']['productid'] = "ONIF24";
339
+ }
340
+
341
+ if($availableoption == "ONIF36"){
342
+ $outputarray['products']['ONIF36']['term'] = 36;
343
+ $outputarray['products']['ONIF36']['productname'] = "36 Months Interest Free Credit (0% APR)";
344
+ $outputarray['products']['ONIF36']['productid'] = "ONIF36";
345
+ }
346
+
347
+
348
+ // classic credit @ 19.5% APR
349
+ if($availableoption == "ONIB12195"){
350
+ $outputarray['products']['ONIB12195']['term'] = 12;
351
+ $outputarray['products']['ONIB12195']['productname'] = "12 Months Classic Credit (19.5% APR)";
352
+ $outputarray['products']['ONIB12195']['productid'] = "ONIB12-19.5";
353
+ }
354
+ if($availableoption == "ONIB24195"){
355
+ $outputarray['products']['ONIB24195']['term'] = 24;
356
+ $outputarray['products']['ONIB24195']['productname'] = "24 Months Classic Credit (19.5% APR)";
357
+ $outputarray['products']['ONIB24195']['productid'] = "ONIB24-19.5";
358
+ }
359
+ if($availableoption == "ONIB36195"){
360
+ $outputarray['products']['ONIB36195']['term'] = 36;
361
+ $outputarray['products']['ONIB36195']['productname'] = "36 Months Classic Credit (19.5% APR)";
362
+ $outputarray['products']['ONIB36195']['productid'] = "ONIB36-19.5";
363
+ }
364
+
365
+ // promotional credit @ 2.9% APR
366
+ if($availableoption == "ONIB1229"){
367
+ $outputarray['products']['ONIB1229']['term'] = 12;
368
+ $outputarray['products']['ONIB1229']['productname'] = "12 Months Promotional Credit (2.9% APR)";
369
+ $outputarray['products']['ONIB1229']['productid'] = "ONIB12-2.9";
370
+ }
371
+ if($availableoption == "ONIB2429"){
372
+ $outputarray['products']['ONIB2429']['term'] = 24;
373
+ $outputarray['products']['ONIB2429']['productname'] = "24 Months Promotional Credit (2.9% APR)";
374
+ $outputarray['products']['ONIB2429']['productid'] = "ONIB24-2.9";
375
+ }
376
+ if($availableoption == "ONIB3629"){
377
+ $outputarray['products']['ONIB3629']['term'] = 36;
378
+ $outputarray['products']['ONIB3629']['productname'] = "36 Months Promotional Credit (2.9% APR)";
379
+ $outputarray['products']['ONIB3629']['productid'] = "ONIB36-2.9";
380
+ }
381
+
382
+
383
+ // promotional credit @ 3.9% APR
384
+ if($availableoption == "ONIB1239"){
385
+ $outputarray['products']['ONIB1239']['term'] = 12;
386
+ $outputarray['products']['ONIB1239']['productname'] = "12 Months Promotional Credit (3.9% APR)";
387
+ $outputarray['products']['ONIB1239']['productid'] = "ONIB12-3.9";
388
+ }
389
+ if($availableoption == "ONIB2439"){
390
+ $outputarray['products']['ONIB2439']['term'] = 24;
391
+ $outputarray['products']['ONIB2439']['productname'] = "24 Months Promotional Credit (3.9% APR)";
392
+ $outputarray['products']['ONIB2439']['productid'] = "ONIB24-3.9";
393
+ }
394
+ if($availableoption == "ONIB3639"){
395
+ $outputarray['products']['ONIB3639']['term'] = 36;
396
+ $outputarray['products']['ONIB3639']['productname'] = "36 Months Promotional Credit (3.9% APR)";
397
+ $outputarray['products']['ONIB3639']['productid'] = "ONIB36-3.9";
398
+ }
399
+
400
+ // promotional credit @ 4.9% APR
401
+ if($availableoption == "ONIB1249"){
402
+ $outputarray['products']['ONIB1249']['term'] = 12;
403
+ $outputarray['products']['ONIB1249']['productname'] = "12 Months Promotional Credit (4.9% APR)";
404
+ $outputarray['products']['ONIB1249']['productid'] = "ONIB12-4.9";
405
+ }
406
+ if($availableoption == "ONIB2449"){
407
+ $outputarray['products']['ONIB2449']['term'] = 24;
408
+ $outputarray['products']['ONIB2449']['productname'] = "24 Months Promotional Credit (4.9% APR)";
409
+ $outputarray['products']['ONIB2449']['productid'] = "ONIB24-4.9";
410
+ }
411
+ if($availableoption == "ONIB3649"){
412
+ $outputarray['products']['ONIB3649']['term'] = 36;
413
+ $outputarray['products']['ONIB3649']['productname'] = "36 Months Promotional Credit (4.9% APR)";
414
+ $outputarray['products']['ONIB3649']['productid'] = "ONIB36-4.9";
415
+ }
416
+
417
+ }
418
+
419
+ // final bit of data needed from the quote is grand total inc vat. This will be our working figure for all that follows.
420
+ $totalValueOfGoods = $quote->getGrandTotal();
421
+
422
+ // okay great; outputarray now contains all products in their available terms.
423
+ // next up, we need to calculate the deposit range allowed.
424
+ // this is based on three things; the first of which is the global account settings
425
+ $globalMinDeposit = Mage::getStoreConfig('pay4later/accountsettings/mindeposit');
426
+ $globalMaxDeposit = Mage::getStoreConfig('pay4later/accountsettings/maxdeposit');
427
+ $globalMinLoan = Mage::getStoreConfig('pay4later/accountsettings/minloan');
428
+ $globalMaxLoan = Mage::getStoreConfig('pay4later/accountsettings/maxloan');
429
+
430
+
431
+ if(Mage::getStoreConfig('pay4later/checkoutpage/maxloan') != ""){
432
+ $globalMaxLoan = min($maxloan,Mage::getStoreConfig('pay4later/checkoutpage/maxloan'));
433
+ }
434
+ if(Mage::getStoreConfig('pay4later/checkoutpage/minloan') != ""){
435
+ $globalMinLoan = max($minloan,Mage::getStoreConfig('pay4later/checkoutpage/minloan'));
436
+ }
437
+
438
+ // second of which is the checkout deposit override in the config (min and max)
439
+ $localMinDeposit = Mage::getStoreConfig('pay4later/checkoutpage/mindeposit');
440
+ $localMaxDeposit = Mage::getStoreConfig('pay4later/checkoutpage/maxdeposit');
441
+
442
+ // E
443
+ if($globalMinDeposit > $localMinDeposit){
444
+ $workingMinDeposit = $globalMinDeposit;
445
+ }else{
446
+ $workingMinDeposit = $localMinDeposit;
447
+ }
448
+
449
+ // F
450
+ if($globalMaxDeposit < $localMaxDeposit){
451
+ $workingMaxDeposit = $globalMaxDeposit;
452
+ }else{
453
+ $workingMaxDeposit = $localMaxDeposit;
454
+ }
455
+
456
+ // depositInflation = ineligable item total
457
+
458
+ $minAllowedDepositAmount = $totalValueOfGoods * ($workingMinDeposit / 100);
459
+ $maxAllowedDepositAmount = $totalValueOfGoods * ($workingMaxDeposit / 100);
460
+
461
+ $totalFailure = false;
462
+
463
+ if($depositInflation > 0){
464
+
465
+ $minimumPercentage = ($depositInflation / $totalValueOfGoods) * 100;
466
+ $minAllowedDepositAmount = max($depositInflation,$minAllowedDepositAmount);
467
+
468
+ if($depositInflation < $minAllowedDepositAmount){
469
+ $totalFailure = true;
470
+ }
471
+ }
472
+
473
+ if($depositInflation > 0){
474
+
475
+ if($minimumPercentage > $workingMaxDeposit){
476
+ $totalFailure = true;
477
+ }
478
+
479
+ }
480
+
481
+
482
+ if(sizeof($availableoptions) == 0){
483
+ $totalFailure = true;
484
+ }
485
+
486
+ // we may need to decrease $maxAllowedDepositAmount.
487
+ while(($globalMinLoan > ($totalValueOfGoods - $maxAllowedDepositAmount)) && ($maxAllowedDepositAmount >= $minAllowedDepositAmount)){
488
+ $maxAllowedDepositAmount = $maxAllowedDepositAmount - (1/100);
489
+ }
490
+ if($maxAllowedDepositAmount < $minAllowedDepositAmount){
491
+ $totalFailure = true;
492
+ }
493
+
494
+ // we may need to increase $minAllowedDepositAmount.
495
+ while(($globalMaxLoan < ($totalValueOfGoods - $minAllowedDepositAmount)) && ($minAllowedDepositAmount <= $maxAllowedDepositAmount)){
496
+ $minAllowedDepositAmount = $minAllowedDepositAmount + (1/100);
497
+ }
498
+ if($minAllowedDepositAmount > $maxAllowedDepositAmount){
499
+ $totalFailure = true;
500
+ }
501
+
502
+ $minimumPercentage = ($minAllowedDepositAmount / $totalValueOfGoods) * 100;
503
+ $maximumPercentage = ($maxAllowedDepositAmount / $totalValueOfGoods) * 100;
504
+
505
+ if($totalFailure == true){
506
+
507
+ ?>
508
+ var firsttime = '';
509
+ Object.extend(payment, {
510
+ switchMethod: function(method){
511
+ if(method == "p4lpayment"){
512
+ alert('Sorry, Finance is not available on this order');
513
+ $('p_method_p4lpayment').checked = '';
514
+ }else{
515
+ this.__proto__.switchMethod(method);
516
+ }
517
+ }});
518
+ <?php
519
+ }else{
520
+
521
+ $minimumPercentage = ceil($minimumPercentage);
522
+ // therefore min and max deposit is....
523
+ // $workingMaxDeposit and $workingMinDeposit
524
+ $outputarray['deposit']['max'] = $maximumPercentage;
525
+ $outputarray['deposit']['min'] = ceil($minimumPercentage);
526
+
527
+ // there are some configuration settings to get which are relevant to how this will work
528
+ $outputarray['settings']['cancustomerchoosedeposit'] = Mage::getStoreConfig('pay4later/checkoutpage/cancustomerchoosedeposit');
529
+ $outputarray['settings']['cancustomerchoosefinanceproduct'] = Mage::getStoreConfig('pay4later/checkoutpage/cancustomerchoosefinanceproduct');
530
+
531
+
532
+ // we still need to handle the deposit inflator, but we'll come back to that tomorrow.
533
+
534
+ // right, we're ready to start preparing our javascript now.
535
+ // remember: this is a script file include, so we're in javascript land outside of PHP tags :)
536
+
537
+ // first off, lets output our JSON into a variable. With that in place, our configuration is available.
538
+ echo 'var p4lsettings = '.json_encode($outputarray).';';
539
+
540
+ ?>
541
+ var firsttime = '';
542
+ Object.extend(payment, {
543
+ switchMethod: function(method){
544
+ if(method == "p4lpayment"){
545
+ initialiseFinanceCalculator();
546
+ if(firsttime == ''){
547
+ setTimeout("setupFinanceQuoteClone()",2000);
548
+ firsttime = 'set';
549
+ }
550
+ setTimeout("$('p4l_repeat').appear();",3000);
551
+ }else{
552
+ $('p4l_repeat').hide();
553
+ }
554
+ this.__proto__.switchMethod(method);
555
+ }});
556
+
557
+ var depositslide;
558
+ var termslide;
559
+ var hasBeenPopulated = '';
560
+ function setupFinanceQuoteClone(){
561
+ $('checkout-review-submit').innerHTML = "<div id='p4l_repeat' style='display:none;'></div>" + $('checkout-review-submit').innerHTML
562
+ }
563
+ function initialiseFinanceCalculator(){
564
+ var numberofproductscounter = 0;
565
+ <?php
566
+
567
+
568
+ echo "depositslide = new Control.Slider('deposithandle', 'deposittrack', {
569
+ range: ".'$'."R($workingMinDeposit, $workingMaxDeposit),
570
+ values: [".implode(",",range($minimumPercentage,$maximumPercentage))."],
571
+ sliderValue: ".$minimumPercentage.",
572
+ onSlide: function(v){ ".'$'."('depositdisplay').innerHTML = v + '%'; ".'$'."('p4l_calcElements_deposit').value = v; recalculate(); },
573
+ onChange: function(v){ ".'$'."('depositdisplay').innerHTML = v + '%'; ".'$'."('p4l_calcElements_deposit').value = v; recalculate(); }
574
+ });
575
+
576
+ ".'$'."('depositdisplay').innerHTML = '$minimumPercentage%';";
577
+
578
+ if($minimumPercentage == $maximumPercentage){
579
+ ?>
580
+ $('p4l_calcElements_deposit').value = '<?php echo $minimumPercentage; ?>'
581
+ $('p4l_hasdepositoptions').innerHTML = '<?php echo $minimumPercentage; ?>';
582
+ $('p4l_hasdepositoptions').hide();
583
+ <?php
584
+ }else{
585
+ ?>
586
+ $('p4l_calcElements_deposit').value = '<?php echo $minimumPercentage; ?>'
587
+ $('p4l_hasfixeddeposit').hide();
588
+ <?php
589
+ }
590
+
591
+ ?>
592
+ if(p4lsettings.settings.cancustomerchoosefinanceproduct == 0){
593
+ $('p4l_hasonefinanceoption').appear();
594
+ }else{
595
+
596
+ for (var pdcts in p4lsettings.products) {
597
+ numberofproductscounter++;
598
+ }
599
+
600
+
601
+
602
+ // populate the drop down of finance products.
603
+ var objSelect = $('p4l_financeproduct');
604
+ if(objSelect.options.length == 0){
605
+ for (var x in p4lsettings.products)
606
+ {
607
+
608
+ var product = p4lsettings.products[x];
609
+ var objOption=document.createElement("option");
610
+
611
+ objOption.value = product.productid;
612
+ objOption.innerHTML = product.productname;
613
+ if(document.all && !window.opera){
614
+ objSelect.add(objOption);
615
+ } else {
616
+ objSelect.add(objOption, null);
617
+ }
618
+
619
+ }
620
+ }
621
+
622
+ if(numberofproductscounter > 1){
623
+
624
+ $('p4l_hasonefinanceoption').hide();
625
+
626
+ }else{
627
+
628
+ $('p4l_hasmultiplefinanceoptions').hide();
629
+
630
+ }
631
+ }
632
+
633
+ updateFinanceOptionSelection();
634
+ }
635
+
636
+
637
+ function updateFinanceOptionSelection(){
638
+
639
+ var numberofproductscounter = 0;
640
+ for (var pdcts in p4lsettings.products) {
641
+ numberofproductscounter++;
642
+ }
643
+
644
+ if(numberofproductscounter > 1){
645
+
646
+ // we need to look through our JSON object for the given product.
647
+ var selected = $('p4l_financeproduct').options[$('p4l_financeproduct').selectedIndex].value;
648
+ for (var x in p4lsettings.products){
649
+ var product = p4lsettings.products[x];
650
+ if(product.productid == selected){
651
+ $('p4l_calcElements_term').value = product.term;
652
+ $('p4l_calcElements_productname').value = product.productname;
653
+ }
654
+ }
655
+ }else{
656
+ for (var x in p4lsettings.products){
657
+ var product = p4lsettings.products[x];
658
+ $('p4l_calcElements_term').value = product.term;
659
+ $('p4l_calcElements_productname').value = product.productname;
660
+ }
661
+
662
+ }
663
+
664
+ recalculate();
665
+ }
666
+
667
+ function updateTermOfLoan(){
668
+ recalculate();
669
+ }
670
+
671
+ function updateDepositPercent(){
672
+ recalculate();
673
+ }
674
+
675
+ function recalculate(){
676
+
677
+ var numberofproductscounter = 0;
678
+ for (var pdcts in p4lsettings.products) {
679
+ numberofproductscounter++;
680
+ }
681
+
682
+ if(numberofproductscounter > 1){
683
+
684
+ var producttype = $('p4l_financeproduct').options[$('p4l_financeproduct').selectedIndex].value;
685
+ }else{
686
+
687
+ for (var x in p4lsettings.products){
688
+ var product = p4lsettings.products[x];
689
+ var producttype = product.productid;
690
+ }
691
+
692
+ }
693
+ var my_fd_obj = new FinanceDetails(producttype, parseFloat($('p4l_ordertotal').value), parseFloat($('p4l_calcElements_deposit').value),
694
+ parseFloat(0));
695
+ $('p4l_monthlies').innerHTML = my_fd_obj.m_inst;
696
+ $('p4l_depositpayable').innerHTML = my_fd_obj.d_amount;
697
+ $('p4l_totalpayable').innerHTML = my_fd_obj.total;
698
+ $('p4l_monthcount').innerHTML = $('p4l_calcElements_term').value;
699
+
700
+ if(parseFloat(<?php echo $depositInflation;?>) > 0){
701
+ $('depositInflation').innerHTML = roundNumber(parseFloat(<?php echo $depositInflation;?>),2);
702
+ $('depositInflator').appear();
703
+ }else{
704
+ $('depositInflator').hide();
705
+ }
706
+
707
+ if(firsttime != ''){
708
+ $('p4l_repeat').innerHTML = $('p4l_financequote').innerHTML;
709
+ }
710
+ }
711
+ function roundNumber(num, dec) {
712
+ var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
713
+ return result;
714
+ }
715
+ function strpos (haystack, needle, offset) {
716
+ var i = (haystack+'').indexOf(needle, (offset || 0));
717
+ return i === -1 ? false : i;
718
+ }
719
+
720
+ function explode(delimiter, string, limit) {
721
+ var emptyArray = { 0: '' };
722
+
723
+ // third argument is not required
724
+ if ( arguments.length < 2 ||
725
+ typeof arguments[0] == 'undefined' ||
726
+ typeof arguments[1] == 'undefined' ) {
727
+ return null;
728
+ }
729
+
730
+ if ( delimiter === '' ||
731
+ delimiter === false ||
732
+ delimiter === null ) {
733
+ return false;
734
+ }
735
+
736
+ if ( typeof delimiter == 'function' ||
737
+ typeof delimiter == 'object' ||
738
+ typeof string == 'function' ||
739
+ typeof string == 'object' ) {
740
+ return emptyArray;
741
+ }
742
+
743
+ if ( delimiter === true ) {
744
+ delimiter = '1';
745
+ }
746
+
747
+ if (!limit) {
748
+ return string.toString().split(delimiter.toString());
749
+ } else {
750
+ // support for limit argument
751
+ var splitted = string.toString().split(delimiter.toString());
752
+ var partA = splitted.splice(0, limit - 1);
753
+ var partB = splitted.join(delimiter.toString());
754
+ partA.push(partB);
755
+ return partA;
756
+ }
757
+ }
758
+
759
+ function strrev (string) {
760
+ string = string+'';
761
+ return string.split('').reverse().join('');
762
+ }
763
+
764
+ <?php
765
+ }
766
+ }
767
+
768
+
769
+ }
app/code/community/Camiloo/Pay4later/etc/config.xml ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category Camiloo
5
+ * @package Camiloo_Pay4later
6
+ * @author Camiloo Limited
7
+ * @license http://www.camiloo.co.uk/license.txt
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Camiloo_Pay4later>
13
+ <version>0.2.1</version>
14
+ </Camiloo_Pay4later>
15
+ </modules>
16
+ <frontend>
17
+ <routers>
18
+ <pay4later>
19
+ <use>standard</use>
20
+ <args>
21
+ <module>Camiloo_Pay4later</module>
22
+ <frontName>pay4later</frontName>
23
+ </args>
24
+ </pay4later>
25
+ </routers>
26
+ <layout>
27
+ <updates>
28
+ <pay4later>
29
+ <file>pay4later.xml</file>
30
+ </pay4later>
31
+ </updates>
32
+ </layout>
33
+ </frontend>
34
+ <admin>
35
+ <routers>
36
+ <pay4later>
37
+ <use>admin</use>
38
+ <args>
39
+ <module>Camiloo_Pay4later</module>
40
+ <frontName>pay4later</frontName>
41
+ </args>
42
+ </pay4later>
43
+ </routers>
44
+ </admin>
45
+ <adminhtml>
46
+ <menu>
47
+ <system>
48
+ <children>
49
+ <pay4later module="pay4later">
50
+ <title>Pay4Later Integration</title>
51
+ <sort_order>71</sort_order>
52
+ <children>
53
+ <financeoptions module="pay4later">
54
+ <title>Select Finance Options</title>
55
+ <sort_order>0</sort_order>
56
+ <action>pay4later/adminhtml_pay4later</action>
57
+ </financeoptions>
58
+ <shippingrates module="pay4later">
59
+ <title>Set Shipping Rates for Express Checkout</title>
60
+ <sort_order>1</sort_order>
61
+ <action>pay4later/adminhtml_pay4latershipping</action>
62
+ </shippingrates>
63
+ <supportreq module="pay4later">
64
+ <title>Submit Support Request</title>
65
+ <sort_order>2</sort_order>
66
+ <action>pay4later/adminhtml_logging/support</action>
67
+ </supportreq>
68
+ <commslog module="pay4later">
69
+ <title>Communication Log</title>
70
+ <sort_order>3</sort_order>
71
+ <action>pay4later/adminhtml_logging/index</action>
72
+ </commslog>
73
+ <kbase module="pay4later">
74
+ <title>Knowledgebase</title>
75
+ <sort_order>4</sort_order>
76
+ <action>pay4later/adminhtml_manual</action>
77
+ </kbase>
78
+ <license module="pay4later">
79
+ <title>View / Update License</title>
80
+ <sort_order>5</sort_order>
81
+ <action>pay4later/adminhtml_licensing</action>
82
+ </license>
83
+ </children>
84
+ </pay4later>
85
+ </children>
86
+ </system>
87
+ </menu>
88
+ <acl>
89
+ <resources>
90
+ <all>
91
+ <title>Allow Everything</title>
92
+ </all>
93
+ <admin>
94
+ <children>
95
+ <system>
96
+ <children>
97
+ <pay4later module="pay4later">
98
+ <title>Pay4Later Integration</title>
99
+ <sort_order>71</sort_order>
100
+ <children>
101
+ <financeoptions module="pay4later">
102
+ <title>Select Finance Options</title>
103
+ <sort_order>0</sort_order>
104
+ <action>pay4later/adminhtml_pay4later</action>
105
+ </financeoptions>
106
+ <supportreq module="pay4later">
107
+ <title>Submit Support Request</title>
108
+ <sort_order>1</sort_order>
109
+ <action>pay4later/adminhtml_logging/support</action>
110
+ </supportreq>
111
+ <commslog module="pay4later">
112
+ <title>Communication Log</title>
113
+ <sort_order>2</sort_order>
114
+ <action>pay4later/adminhtml_logging/index</action>
115
+ </commslog>
116
+ <kbase module="pay4later">
117
+ <title>Knowledgebase</title>
118
+ <sort_order>3</sort_order>
119
+ <action>pay4later/adminhtml_manual</action>
120
+ </kbase>
121
+ <license module="pay4later">
122
+ <title>View / Update License</title>
123
+ <sort_order>4</sort_order>
124
+ <action>pay4later/adminhtml_licensing</action>
125
+ </license>
126
+ </children>
127
+ </pay4later>
128
+ </children>
129
+ </system>
130
+ </children>
131
+ </admin>
132
+ </resources>
133
+ <resources>
134
+ <all>
135
+ <title>Allow Everything</title>
136
+ </all>
137
+ <admin>
138
+ <children>
139
+ <system>
140
+ <children>
141
+ <config>
142
+ <children>
143
+ <pay4later>
144
+ <title>Pay4Later Integration</title>
145
+ </pay4later>
146
+ </children>
147
+ </config>
148
+ </children>
149
+ </system>
150
+ </children>
151
+ </admin>
152
+ </resources>
153
+ </acl>
154
+ <layout>
155
+ <updates>
156
+ <pay4later>
157
+ <file>pay4later.xml</file>
158
+ </pay4later>
159
+ </updates>
160
+ </layout>
161
+ </adminhtml>
162
+ <global>
163
+ <events>
164
+ <sales_order_shipment_track_save_after>
165
+ <observers>
166
+ <pay4later>
167
+ <type>model</type>
168
+ <class>pay4later/observer</class>
169
+ <method>saveTrackingToPay4later</method>
170
+ </pay4later>
171
+ </observers>
172
+ </sales_order_shipment_track_save_after>
173
+ <sales_order_shipment_save_after>
174
+ <observers>
175
+ <pay4later>
176
+ <type>model</type>
177
+ <class>pay4later/observer</class>
178
+ <method>shipPay4later</method>
179
+ </pay4later>
180
+ </observers>
181
+ </sales_order_shipment_save_after>
182
+ </events>
183
+ <models>
184
+ <pay4later>
185
+ <class>Camiloo_Pay4later_Model</class>
186
+ <resourceModel>pay4later_mysql4</resourceModel>
187
+ </pay4later>
188
+ <pay4later_mysql4>
189
+ <class>Camiloo_Pay4later_Model_Mysql4</class>
190
+ <entities>
191
+ <pay4later>
192
+ <table>pay4later</table>
193
+ </pay4later>
194
+ </entities>
195
+ </pay4later_mysql4>
196
+ <pay4laterlog>
197
+ <class>Camiloo_Pay4later_Model</class>
198
+ <resourceModel>pay4laterlog_mysql4</resourceModel>
199
+ </pay4laterlog>
200
+ <pay4laterlog_mysql4>
201
+ <class>Camiloo_Pay4later_Model_Mysql4</class>
202
+ <entities>
203
+ <pay4laterlog>
204
+ <table>pay4later_log</table>
205
+ </pay4laterlog>
206
+ </entities>
207
+ </pay4laterlog_mysql4>
208
+ <expresscheckout>
209
+ <class>Camiloo_Pay4later_Model</class>
210
+ <resourceModel>expresscheckout_mysql4</resourceModel>
211
+ </expresscheckout>
212
+ <expresscheckout_mysql4>
213
+ <class>Camiloo_Pay4later_Model_Mysql4</class>
214
+ <entities>
215
+ <expresscheckout>
216
+ <table>pay4later_expresscheckouts</table>
217
+ </expresscheckout>
218
+ </entities>
219
+ </expresscheckout_mysql4>
220
+ </models>
221
+ <resources>
222
+ <pay4later_setup>
223
+ <setup>
224
+ <module>Camiloo_Pay4later</module>
225
+ <class>Camiloo_Pay4later_Model_Mysql4_Setup</class>
226
+ </setup>
227
+ <connection>
228
+ <use>core_setup</use>
229
+ </connection>
230
+ </pay4later_setup>
231
+ <pay4later_write>
232
+ <connection>
233
+ <use>core_write</use>
234
+ </connection>
235
+ </pay4later_write>
236
+ <pay4later_read>
237
+ <connection>
238
+ <use>core_read</use>
239
+ </connection>
240
+ </pay4later_read>
241
+ <pay4laterlog_write><connection><use>core_write</use></connection></pay4laterlog_write>
242
+ <pay4laterlog_read><connection><use>core_read</use></connection></pay4laterlog_read>
243
+ <expresscheckout_write><connection><use>core_write</use></connection></expresscheckout_write>
244
+ <expresscheckout_read><connection><use>core_read</use></connection></expresscheckout_read>
245
+ </resources>
246
+ <blocks>
247
+ <pay4later>
248
+ <class>Camiloo_Pay4later_Block</class>
249
+ </pay4later>
250
+ </blocks>
251
+ <helpers>
252
+ <pay4later>
253
+ <class>Camiloo_Pay4later_Helper</class>
254
+ </pay4later>
255
+ </helpers>
256
+ <sales>
257
+ <order>
258
+ <statuses>
259
+ <declinedfinance translate="label"><label>Finance Declined</label></declinedfinance>
260
+ <referredfinance translate="label"><label>Finance Decision Referred</label></referredfinance>
261
+ <initiatedfinance translate="label"><label>Finance Application Initiated</label></initiatedfinance>
262
+ <acceptedfinance translate="label"><label>Finance Application Accepted - Awaiting deposit</label></acceptedfinance>
263
+ </statuses>
264
+ <states>
265
+ <declinedfinance translate="label">
266
+ <label>Finance Declined</label>
267
+ <statuses>
268
+ <declinedfinance default="1"/>
269
+ </statuses>
270
+ <visible_on_front/>
271
+ </declinedfinance>
272
+ <referredfinance translate="label">
273
+ <label>Finance Decision Referred</label>
274
+ <statuses>
275
+ <referredfinance default="1"/>
276
+ </statuses>
277
+ <visible_on_front/>
278
+ </referredfinance>
279
+ <initiatedfinance translate="label">
280
+ <label>Finance Application Initiated</label>
281
+ <statuses>
282
+ <initiatedfinance default="1"/>
283
+ </statuses>
284
+ <visible_on_front/>
285
+ </initiatedfinance>
286
+ <acceptedfinance translate="label">
287
+ <label>Finance Application Accepted - Awaiting Deposit</label>
288
+ <statuses>
289
+ <acceptedfinance default="1"/>
290
+ </statuses>
291
+ <visible_on_front/>
292
+ </acceptedfinance>
293
+ </states>
294
+ </order>
295
+ </sales>
296
+ </global>
297
+ <default>
298
+ <pay4later>
299
+ <apisettings>
300
+ <testmode>1</testmode>
301
+ </apisettings>
302
+ <accountsettings>
303
+ <mindeposit>10</mindeposit>
304
+ <maxdeposit>50</maxdeposit>
305
+ <minloan>250</minloan>
306
+ <maxloan>5000</maxloan>
307
+ </accountsettings>
308
+ <productpage>
309
+ <expresscheckout>0</expresscheckout>
310
+ <showmonthlyprice>0</showmonthlyprice>
311
+ <financeoption>ONIF12</financeoption>
312
+ <ecdeposit>50</ecdeposit>
313
+ <financepricelabel><![CDATA[From just #PRICE# per month]]></financepricelabel>
314
+ <fullpricelabel><![CDATA[Pay Now Price: #PRICE#]]></fullpricelabel>
315
+ </productpage>
316
+ <checkoutpage>
317
+ <enablec>1</enablec>
318
+ <depositinflator>1</depositinflator>
319
+ <cancustomerchoosedeposit>1</cancustomerchoosedeposit>
320
+ <cancustomerchoosefinanceproduct>1</cancustomerchoosefinanceproduct>
321
+ <mindeposit>10</mindeposit>
322
+ <maxdeposit>50</maxdeposit>
323
+ </checkoutpage>
324
+ <adminform>
325
+ <enablee2c>1</enablee2c>
326
+ <canadministratorchoosedeposit>1</canadministratorchoosedeposit>
327
+ <canadministratorchoosefinanceproduct>1</canadministratorchoosefinanceproduct>
328
+ <canadministratoroverrideoptions>0</canadministratoroverrideoptions>
329
+ <mindeposit>10</mindeposit>
330
+ <maxdeposit>50</maxdeposit>
331
+ </adminform>
332
+ </pay4later>
333
+ <payment>
334
+ <p4lpayment>
335
+ <active>1</active>
336
+ <model>pay4later/p4lpayment</model>
337
+ <order_status>initiatedfinance</order_status>
338
+ <title>Apply for Finance</title>
339
+ <allowspecific>0</allowspecific>
340
+ <group>offline</group>
341
+ </p4lpayment>
342
+ </payment>
343
+ </default>
344
+ </config>
app/code/community/Camiloo/Pay4later/etc/system.xml ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Camiloo Limited
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the EULA
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://www.camiloo.co.uk/license.txt
12
+ *
13
+ * @category Camiloo
14
+ * @package Camiloo_Pay4Later
15
+ * @copyright Copyright (c) 2010 Camiloo Limited (http://www.camiloo.co.uk)
16
+ * @license http://www.camiloo.co.uk/license.txt
17
+ */
18
+ -->
19
+ <config>
20
+ <tabs>
21
+ <camiloo translate="label" module="core">
22
+ <label>The Camiloo Toolbox</label>
23
+ <sort_order>120</sort_order>
24
+ </camiloo>
25
+ </tabs>
26
+ <sections>
27
+ <pay4later translate="label">
28
+ <label>Pay4Later Integration</label>
29
+ <tab>camiloo</tab>
30
+ <frontend_type>text</frontend_type>
31
+ <sort_order>50</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>0</show_in_store>
35
+ <groups>
36
+ <configheader>
37
+ <frontend_model>pay4later/adminhtml_configheader</frontend_model>
38
+ <sort_order>0</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>1</show_in_store>
42
+ </configheader>
43
+ <apisettings translate="label">
44
+ <label>Pay4Later API Settings</label>
45
+ <frontend_type>text</frontend_type>
46
+ <sort_order>1</sort_order>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>0</show_in_store>
50
+ <comment><![CDATA[<div class="custom-options">
51
+ <p class="grand-total"><b>Pay4Later API Settings</b></p>
52
+ <p>Please enter your API Key and Installation ID below</p>
53
+ </div>
54
+ ]]></comment>
55
+ <fields>
56
+ <testmode>
57
+ <label>TEST Server Mode:</label>
58
+ <frontend_type>select</frontend_type>
59
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
60
+ <sort_order>1</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>1</show_in_website>
63
+ <show_in_store>0</show_in_store>
64
+ </testmode>
65
+ <myipaddress>
66
+ <label>IP address for testing:</label>
67
+ <frontend_type>text</frontend_type>
68
+ <sort_order>2</sort_order>
69
+ <comment><![CDATA[Enter your IP address here and only you will be able to view the frontend features of this module such as the payment method and the express checkout]]></comment>
70
+ <show_in_default>1</show_in_default>
71
+ <show_in_website>1</show_in_website>
72
+ <show_in_store>0</show_in_store>
73
+ </myipaddress>
74
+ <apikey>
75
+ <label>API Key:</label>
76
+ <frontend_type>text</frontend_type>
77
+ <sort_order>3</sort_order>
78
+ <show_in_default>1</show_in_default>
79
+ <show_in_website>1</show_in_website>
80
+ <show_in_store>0</show_in_store>
81
+ </apikey>
82
+ <installationid>
83
+ <label>Installation ID:</label>
84
+ <frontend_type>text</frontend_type>
85
+ <sort_order>4</sort_order>
86
+ <show_in_default>1</show_in_default>
87
+ <show_in_website>1</show_in_website>
88
+ <show_in_store>0</show_in_store>
89
+ </installationid>
90
+ <shiponcomplete translate="label">
91
+ <label>Send Fulfillment Request to Pay4Later when shipment is first made?</label>
92
+ <frontend_type>select</frontend_type>
93
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
94
+ <comment><![CDATA[Set to 'Disable' if you enter tracking information for your shipments as message]]></comment>
95
+ <sort_order>5</sort_order>
96
+ <show_in_default>1</show_in_default>
97
+ <show_in_website>0</show_in_website>
98
+ <show_in_store>0</show_in_store>
99
+ </shiponcomplete>
100
+ </fields>
101
+ </apisettings>
102
+ <accountsettings translate="label">
103
+ <label>Account Settings</label>
104
+ <frontend_type>text</frontend_type>
105
+ <sort_order>2</sort_order>
106
+ <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
+ <show_in_store>0</show_in_store>
109
+ <comment><![CDATA[<div class="custom-options">
110
+ <p class="grand-total"><b>Account Settings</b></p>
111
+ <p>If you have been agreed an adjusted minimum / maximum loan amount, or an adjusted minimum / maximum loan amount by Pay4Later Support, please enter these thresholds below without currency symbols and / or punctuation. <b>Please do not edit the values below if you do not have an adjusted threshold</b></p>
112
+ </div>
113
+ ]]></comment>
114
+ <fields>
115
+ <mindeposit>
116
+ <label>Minimum Deposit Percentage:</label>
117
+ <frontend_type>text</frontend_type>
118
+ <sort_order>1</sort_order>
119
+ <show_in_default>1</show_in_default>
120
+ <show_in_website>1</show_in_website>
121
+ <show_in_store>0</show_in_store>
122
+ </mindeposit>
123
+ <maxdeposit>
124
+ <label>Maximum Deposit Percentage:</label>
125
+ <frontend_type>text</frontend_type>
126
+ <sort_order>2</sort_order>
127
+ <show_in_default>1</show_in_default>
128
+ <show_in_website>1</show_in_website>
129
+ <show_in_store>0</show_in_store>
130
+ </maxdeposit>
131
+ <minloan>
132
+ <label>Minimum Loan Value:</label>
133
+ <frontend_type>text</frontend_type>
134
+ <sort_order>3</sort_order>
135
+ <show_in_default>1</show_in_default>
136
+ <show_in_website>1</show_in_website>
137
+ <show_in_store>0</show_in_store>
138
+ </minloan>
139
+ <maxloan>
140
+ <label>Maximum Loan Value:</label>
141
+ <frontend_type>text</frontend_type>
142
+ <sort_order>4</sort_order>
143
+ <show_in_default>1</show_in_default>
144
+ <show_in_website>1</show_in_website>
145
+ <show_in_store>0</show_in_store>
146
+ </maxloan>
147
+ </fields>
148
+ </accountsettings>
149
+ <productpage translate="label">
150
+ <label>Product Page / Express Checkout Settings</label>
151
+ <frontend_type>text</frontend_type>
152
+ <sort_order>3</sort_order>
153
+ <show_in_default>1</show_in_default>
154
+ <show_in_website>1</show_in_website>
155
+ <show_in_store>0</show_in_store>
156
+ <comment><![CDATA[<div class="custom-options">
157
+ <p class="grand-total"><b>Product Page and Express Checkout Settings</b></p>
158
+ <p>The settings below control the appearance of the product pages on Magento. If you wish, the integration can display an Express checkout button on your product pages and can even display an estimated monthly cost to the customer alongside the full price for items which would qualify for pricing.</p>
159
+ </div>
160
+ ]]></comment>
161
+ <fields>
162
+ <expresscheckout>
163
+ <label>Enable Express Checkout:</label>
164
+ <frontend_type>select</frontend_type>
165
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
166
+ <sort_order>1</sort_order>
167
+ <show_in_default>1</show_in_default>
168
+ <show_in_website>1</show_in_website>
169
+ <show_in_store>0</show_in_store>
170
+ </expresscheckout>
171
+ <showmonthlyprice>
172
+ <label>Show 'per month' price on Product Page:</label>
173
+ <frontend_type>select</frontend_type>
174
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
175
+ <sort_order>2</sort_order>
176
+ <show_in_default>1</show_in_default>
177
+ <show_in_website>1</show_in_website>
178
+ <show_in_store>0</show_in_store>
179
+ </showmonthlyprice>
180
+ <financeoption>
181
+ <label>Finance Option for Express Checkout:</label>
182
+ <frontend_type>select</frontend_type>
183
+ <source_model>pay4later/financeoptions</source_model>
184
+ <comment><![CDATA[Note that express checkout will only be displayed if this finance option is available for the product]]></comment>
185
+ <sort_order>3</sort_order>
186
+ <show_in_default>1</show_in_default>
187
+ <show_in_website>1</show_in_website>
188
+ <show_in_store>0</show_in_store>
189
+ </financeoption>
190
+ <ecdeposit>
191
+ <label>Express checkout deposit percentage:</label>
192
+ <frontend_type>text</frontend_type>
193
+ <comment><![CDATA[To make this express checkout possible, you must pre-set the deposit percentage payable]]></comment>
194
+ <sort_order>4</sort_order>
195
+ <show_in_default>1</show_in_default>
196
+ <show_in_website>1</show_in_website>
197
+ <show_in_store>0</show_in_store>
198
+ </ecdeposit>
199
+ <financepricelabel>
200
+ <label>Label for Pay Monthly Price:</label>
201
+ <frontend_type>text</frontend_type>
202
+ <comment><![CDATA[Please enter #PRICE# at the point in this text where you wish price to be inserted.]]></comment>
203
+ <sort_order>5</sort_order>
204
+ <show_in_default>1</show_in_default>
205
+ <show_in_website>1</show_in_website>
206
+ <show_in_store>0</show_in_store>
207
+ </financepricelabel>
208
+ <fullpricelabel>
209
+ <label>Label for Full Price:</label>
210
+ <frontend_type>text</frontend_type>
211
+ <comment><![CDATA[Please enter #PRICE# at the point in this text where you wish price to be inserted.]]></comment>
212
+ <sort_order>6</sort_order>
213
+ <show_in_default>1</show_in_default>
214
+ <show_in_website>1</show_in_website>
215
+ <show_in_store>0</show_in_store>
216
+ </fullpricelabel>
217
+ <minvalue>
218
+ <label>Minimum Order Value for Express Checkout:</label>
219
+ <frontend_type>text</frontend_type>
220
+ <sort_order>7</sort_order>
221
+ <show_in_default>1</show_in_default>
222
+ <show_in_website>1</show_in_website>
223
+ <show_in_store>0</show_in_store>
224
+ </minvalue>
225
+ <maxvalue>
226
+ <label>Maximum Order Value for Express Checkout:</label>
227
+ <frontend_type>text</frontend_type>
228
+ <sort_order>8</sort_order>
229
+ <show_in_default>1</show_in_default>
230
+ <show_in_website>1</show_in_website>
231
+ <show_in_store>0</show_in_store>
232
+ </maxvalue>
233
+ </fields>
234
+ </productpage>
235
+ <checkoutpage>
236
+ <label>Standard Checkout Page Settings</label>
237
+ <frontend_type>text</frontend_type>
238
+ <sort_order>4</sort_order>
239
+ <show_in_default>1</show_in_default>
240
+ <show_in_website>1</show_in_website>
241
+ <show_in_store>0</show_in_store>
242
+ <comment><![CDATA[<div class="custom-options">
243
+ <p class="grand-total"><b>Standard Checkout Settings</b></p>
244
+ <p>Using the settings below, you can control the options which are made available to the user when they choose to pay via Pay4Later.</p>
245
+ </div>
246
+ ]]></comment>
247
+ <fields>
248
+ <enablec>
249
+ <label>Enable Payment Method?:</label>
250
+ <frontend_type>select</frontend_type>
251
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
252
+ <sort_order>0</sort_order>
253
+ <show_in_default>1</show_in_default>
254
+ <show_in_website>1</show_in_website>
255
+ <show_in_store>0</show_in_store>
256
+ </enablec>
257
+ <depositinflator>
258
+ <label>Allow non-finance items via inflated deposit:</label>
259
+ <frontend_type>select</frontend_type>
260
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
261
+ <comment><![CDATA[If the customer has items which are not eligible for their selected finance option, allow the customer to pay for these items using an inflated deposit? If set to disable customer will be unable to complete checkout]]></comment>
262
+ <sort_order>1</sort_order>
263
+ <show_in_default>1</show_in_default>
264
+ <show_in_website>1</show_in_website>
265
+ <show_in_store>0</show_in_store>
266
+ </depositinflator>
267
+ <cancustomerchoosedeposit>
268
+ <label>Can customer choose deposit amount?</label>
269
+ <frontend_type>select</frontend_type>
270
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
271
+ <comment><![CDATA[If disabled, please set minimum and maximum deposit percentage below to the same value]]></comment>
272
+ <sort_order>2</sort_order>
273
+ <show_in_default>1</show_in_default>
274
+ <show_in_website>1</show_in_website>
275
+ <show_in_store>0</show_in_store>
276
+ </cancustomerchoosedeposit>
277
+ <cancustomerchoosefinanceproduct>
278
+ <label>Can customer choose finance product?</label>
279
+ <frontend_type>select</frontend_type>
280
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
281
+ <comment><![CDATA[If more than one finance product is available for the products which the customer is purchasing, would you like the customer to be able to choose from the available methods? If not, ranking will be used (see Select Finance Options for Products tool)]]></comment>
282
+ <sort_order>3</sort_order>
283
+ <show_in_default>1</show_in_default>
284
+ <show_in_website>1</show_in_website>
285
+ <show_in_store>0</show_in_store>
286
+ </cancustomerchoosefinanceproduct>
287
+ <mindeposit>
288
+ <label>Minimum Deposit Percentage:</label>
289
+ <frontend_type>text</frontend_type>
290
+ <sort_order>4</sort_order>
291
+ <show_in_default>1</show_in_default>
292
+ <show_in_website>1</show_in_website>
293
+ <show_in_store>0</show_in_store>
294
+ </mindeposit>
295
+ <maxdeposit>
296
+ <label>Maximum Deposit Percentage:</label>
297
+ <frontend_type>text</frontend_type>
298
+ <sort_order>5</sort_order>
299
+ <show_in_default>1</show_in_default>
300
+ <show_in_website>1</show_in_website>
301
+ <show_in_store>0</show_in_store>
302
+ </maxdeposit>
303
+ <minvalue>
304
+ <label>Minimum Order Value:</label>
305
+ <frontend_type>text</frontend_type>
306
+ <sort_order>6</sort_order>
307
+ <show_in_default>1</show_in_default>
308
+ <show_in_website>1</show_in_website>
309
+ <show_in_store>0</show_in_store>
310
+ </minvalue>
311
+ <maxvalue>
312
+ <label>Maximum Order Value:</label>
313
+ <frontend_type>text</frontend_type>
314
+ <sort_order>7</sort_order>
315
+ <show_in_default>1</show_in_default>
316
+ <show_in_website>1</show_in_website>
317
+ <show_in_store>0</show_in_store>
318
+ </maxvalue>
319
+ </fields>
320
+ </checkoutpage>
321
+ <!--<adminform>
322
+ <label>Email-to-Customer Credit Application Creator Settings</label>
323
+ <frontend_type>text</frontend_type>
324
+ <sort_order>5</sort_order>
325
+ <show_in_default>1</show_in_default>
326
+ <show_in_website>1</show_in_website>
327
+ <show_in_store>0</show_in_store>
328
+ <comment><![CDATA[<div class="custom-options">
329
+ <p class="grand-total"><b>Email-to-Customer Credit Application Creator</b></p>
330
+ <p>If enabled you will be given the option to select Pay4Later as a payment method during the creation of an order within the admin area. The order, once created will be placed into a credit application initialised state and a link to a credit application process will be sent to the customer.</p>
331
+ </div>
332
+ ]]></comment>
333
+ <fields>
334
+ <enablee2c>
335
+ <label>Allow non-finance items via inflated deposit:</label>
336
+ <frontend_type>select</frontend_type>
337
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
338
+ <comment><![CDATA[Enable Email-To-Customer checkout method within administration area?]]></comment>
339
+ <sort_order>1</sort_order>
340
+ <show_in_default>1</show_in_default>
341
+ <show_in_website>1</show_in_website>
342
+ <show_in_store>0</show_in_store>
343
+ </enablee2c>
344
+ <canadministratorchoosedeposit>
345
+ <label>Can administrator choose deposit amount?</label>
346
+ <frontend_type>select</frontend_type>
347
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
348
+ <comment><![CDATA[If disabled, please set minimum and maximum deposit percentage below to the same value]]></comment>
349
+ <sort_order>2</sort_order>
350
+ <show_in_default>1</show_in_default>
351
+ <show_in_website>1</show_in_website>
352
+ <show_in_store>0</show_in_store>
353
+ </canadministratorchoosedeposit>
354
+ <canadministratorchoosefinanceproduct>
355
+ <label>Can administrator choose finance product?</label>
356
+ <frontend_type>select</frontend_type>
357
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
358
+ <comment><![CDATA[If more than one finance product is available for the products which the customer is purchasing, would you like the customer to be able to choose from the available methods? If not, ranking will be used (see Select Finance Options for Products tool)]]></comment>
359
+ <sort_order>3</sort_order>
360
+ <show_in_default>1</show_in_default>
361
+ <show_in_website>1</show_in_website>
362
+ <show_in_store>0</show_in_store>
363
+ </canadministratorchoosefinanceproduct>
364
+ <canadministratoroverrideoptions>
365
+ <label>Can administrator override 'Select Finance Options' settings?</label>
366
+ <frontend_type>select</frontend_type>
367
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
368
+ <comment><![CDATA[If enabled, administrator will be able to select from all possible finance products regardless of the settings under System &gt; Pay4Layer Integration &gt; Select Finance Options ]]></comment>
369
+ <sort_order>4</sort_order>
370
+ <show_in_default>1</show_in_default>
371
+ <show_in_website>1</show_in_website>
372
+ <show_in_store>0</show_in_store>
373
+ </canadministratoroverrideoptions>
374
+ <mindeposit>
375
+ <label>Minimum Deposit Percentage:</label>
376
+ <frontend_type>text</frontend_type>
377
+ <sort_order>5</sort_order>
378
+ <show_in_default>1</show_in_default>
379
+ <show_in_website>1</show_in_website>
380
+ <show_in_store>0</show_in_store>
381
+ </mindeposit>
382
+ <maxdeposit>
383
+ <label>Maximum Deposit Percentage:</label>
384
+ <frontend_type>text</frontend_type>
385
+ <sort_order>6</sort_order>
386
+ <show_in_default>1</show_in_default>
387
+ <show_in_website>1</show_in_website>
388
+ <show_in_store>0</show_in_store>
389
+ </maxdeposit>
390
+ <identity translate="label">
391
+ <label>Email Sender</label>
392
+ <frontend_type>select</frontend_type>
393
+ <source_model>adminhtml/system_config_source_email_identity</source_model>
394
+ <sort_order>7</sort_order>
395
+ <show_in_default>1</show_in_default>
396
+ <show_in_website>1</show_in_website>
397
+ <show_in_store>1</show_in_store>
398
+ </identity>
399
+ <template translate="label">
400
+ <label>Email Template</label>
401
+ <frontend_type>select</frontend_type>
402
+ <source_model>adminhtml/system_config_source_email_template</source_model>
403
+ <sort_order>8</sort_order>
404
+ <show_in_default>1</show_in_default>
405
+ <show_in_website>1</show_in_website>
406
+ <show_in_store>1</show_in_store>
407
+ </template>
408
+ </fields>
409
+ </adminform> -->
410
+ </groups>
411
+ </pay4later>
412
+ <!-- we need to use the following to allow magento to use the checkout method - we then back control this hence it is hidden -->
413
+ <payment>
414
+ <groups>
415
+ <p4lpayment translate="label">
416
+ <label>Pay4Later</label>
417
+ <frontend_type>text</frontend_type>
418
+ <sort_order>1</sort_order>
419
+ <show_in_default>0</show_in_default>
420
+ <show_in_website>0</show_in_website>
421
+ <show_in_store>0</show_in_store>
422
+ <fields>
423
+ <active translate="label">
424
+ <label>Enabled</label>
425
+ <frontend_type>select</frontend_type>
426
+ <source_model>adminhtml/system_config_source_yesno</source_model>
427
+ <sort_order>1</sort_order>
428
+ <show_in_default>0</show_in_default>
429
+ <show_in_website>0</show_in_website>
430
+ <show_in_store>0</show_in_store>
431
+ </active>
432
+ <model>
433
+ </model>
434
+ </fields>
435
+ </p4lpayment>
436
+ </groups>
437
+ </payment>
438
+
439
+ </sections>
440
+ </config>
app/code/community/Camiloo/Pay4later/sql/pay4later_setup/mysql4-install-0.2.1.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+
6
+
7
+ $installer->addAttribute('quote_payment', 'pay4later_depositpercent', array());
8
+ $installer->addAttribute('quote_payment', 'pay4later_productid', array());
9
+ $installer->addAttribute('quote_payment', 'pay4later_productname', array());
10
+ $installer->addAttribute('order_payment', 'pay4later_crid', array());
11
+ $installer->addAttribute('order_payment', 'pay4later_depositpercent', array());
12
+ $installer->addAttribute('order_payment', 'pay4later_productid', array());
13
+ $installer->addAttribute('order_payment', 'pay4later_productname', array());
14
+
15
+
16
+ $installer->run("
17
+
18
+ DROP TABLE IF EXISTS {$this->getTable('pay4later')};
19
+ CREATE TABLE {$this->getTable('pay4later')} (
20
+ `pay4later_id` int(11) unsigned NOT NULL auto_increment,
21
+ `product_id` int(11) NOT NULL default '0',
22
+ `ONIF6` smallint(6) NOT NULL default '0',
23
+ `ONIF10` smallint(6) NOT NULL default '0',
24
+ `ONIF12` smallint(6) NOT NULL default '0',
25
+ `ONIF18` smallint(6) NOT NULL default '0',
26
+ `ONIF24` smallint(6) NOT NULL default '0',
27
+ `ONIF36` smallint(6) NOT NULL default '0',
28
+ `ONIB12195` smallint(6) NOT NULL default '0',
29
+ `ONIB24195` smallint(6) NOT NULL default '0',
30
+ `ONIB36195` smallint(6) NOT NULL default '0',
31
+ `ONIB1229` smallint(6) NOT NULL default '0',
32
+ `ONIB2429` smallint(6) NOT NULL default '0',
33
+ `ONIB3629` smallint(6) NOT NULL default '0',
34
+ `ONIB1239` smallint(6) NOT NULL default '0',
35
+ `ONIB2439` smallint(6) NOT NULL default '0',
36
+ `ONIB3639` smallint(6) NOT NULL default '0',
37
+ `ONIB1249` smallint(6) NOT NULL default '0',
38
+ `ONIB2449` smallint(6) NOT NULL default '0',
39
+ `ONIB3649` smallint(6) NOT NULL default '0',
40
+ PRIMARY KEY (`pay4later_id`)
41
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
42
+
43
+ ");
44
+
45
+
46
+ $installer->run("DROP TABLE IF EXISTS {$this->getTable('pay4later_log')};
47
+ CREATE TABLE {$this->getTable('pay4later_log')} (
48
+ `log_id` int(11) unsigned NOT NULL auto_increment,
49
+ `outgoing` text NOT NULL default '',
50
+ `incoming` text NOT NULL default '',
51
+ `error` text NOT NULL default '',
52
+ `message_time` datetime NULL,
53
+ `sent_to_support` int(1) default 0,
54
+ PRIMARY KEY (`log_id`)
55
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
56
+
57
+ $installer->run("
58
+
59
+ DROP TABLE IF EXISTS {$this->getTable('pay4later_expresscheckouts')};
60
+ CREATE TABLE {$this->getTable('pay4later_expresscheckouts')} (
61
+ `ec_id` int(11) unsigned NOT NULL auto_increment,
62
+ `product_id` int(11) NOT NULL default '0',
63
+ `qty` smallint(6) NOT NULL default '0',
64
+ `options` text NOT NULL,
65
+ `super_attribute` text NOT NULL,
66
+ PRIMARY KEY (`ec_id`)
67
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
68
+
69
+ ");
70
+
71
+ $installer->run("
72
+
73
+ DROP TABLE IF EXISTS {$this->getTable('pay4later_shipping')};
74
+ CREATE TABLE {$this->getTable('pay4later_shipping')} (
75
+ `shipping_id` int(11) unsigned NOT NULL auto_increment,
76
+ `WeightFrom` text,
77
+ `WeightTo` text,
78
+ `PriceFrom` text,
79
+ `PriceTo` text,
80
+ `ShippingName` text NOT NULL default '',
81
+ `ShippingPrice` float(10,2),
82
+ PRIMARY KEY (`shipping_id`)
83
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
84
+
85
+ ");
86
+
87
+
88
+
89
+ $installer->endSetup();
90
+
91
+ ?>
app/design/adminhtml/default/default/template/pay4later/bulk/download.phtml ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $pflcore = Mage::getModel('pay4later/pay4later'); ?>
2
+ <div class="entry-edit">
3
+ <div class="fieldset " id="group_fields4">To begin, please press
4
+ 'download' below. Magento will generate a CSV file and will then serve
5
+ it to you (this may take a few minutes).</div>
6
+ </div>
7
+
8
+ <div class="entry-edit" id="downloadbuttonzone"
9
+ name="downloadbuttonzone" style="display: block;">
10
+ <div class="entry-edit-head">
11
+ <h4 class="icon-head head-edit-form fieldset-legend">Commence
12
+ Download</h4>
13
+ <div class="form-buttons"></div>
14
+ </div>
15
+ <div class="fieldset " id="group_fields4">
16
+ <div class="hor-scroll">
17
+ <div id="displaynode">
18
+ <center>
19
+ <button id="downloadbutton" type="button" class="scalable "
20
+ onclick="startdownload();" style=""><span>Download</span></button>
21
+ </center>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+
27
+
28
+ <div class="entry-edit" id="downloadprep" name="downloadprep"
29
+ style="display: none;">
30
+ <div class="entry-edit-head">
31
+ <h4 class="icon-head head-edit-form fieldset-legend">Preparing
32
+ download file</h4>
33
+ <div class="form-buttons"></div>
34
+ </div>
35
+ <div class="fieldset " id="group_fields4">
36
+ <div class="hor-scroll">
37
+ <div id="displaynode">
38
+ <table cellspacing="0" class="form-list">
39
+ <tbody>
40
+
41
+ <tr>
42
+ <td class="label"><label for="color">Current Progress</label></td>
43
+ <td class="value">
44
+ <div style="width: 200px; border: 1px solid #999999; float: left;">
45
+ <div id="currentprogress" style="width: 0%; background: green;">&nbsp;</div>
46
+ </div>
47
+ &nbsp; <span id="progresspercent">0%</span> <span
48
+ id="download_indicator" class="autocomplete-indicator"> <img
49
+ src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif"
50
+ alt="Loading..." class="v-middle"> </span></td>
51
+ <td class="scope-label"></td>
52
+ <td><small>&nbsp;</small></td>
53
+ </tr>
54
+
55
+ <tr>
56
+ <td class="label"><label for="color">Estimated Time
57
+ Remaining</label></td>
58
+ <td class="value"><span id="timeleft">Estimating time
59
+ required...</span></td>
60
+ <td class="scope-label"></td>
61
+ <td><small>&nbsp;</small></td>
62
+ </tr>
63
+
64
+ </tbody>
65
+ </table>
66
+ </div>
67
+ </div>
68
+ </div></div>
69
+
70
+
71
+ <div class="entry-edit" id="downloader" name="downloader"
72
+ style="display: none;">
73
+ <div class="entry-edit-head">
74
+ <h4 class="icon-head head-edit-form fieldset-legend">Download is
75
+ ready</h4>
76
+ <div class="form-buttons"></div>
77
+ </div>
78
+ <div class="fieldset " id="group_fields4">
79
+ <div class="hor-scroll">
80
+ <div id="displaynode"><a href="#" onclick="goredownload();">Please
81
+ click here if your download does not begin automatically.</a><br />
82
+ <br />
83
+ <a href="#" onclick="goregenerate();">To regenerate this file,
84
+ please click here</a></div>
85
+ </div>
86
+ </div>
87
+ </div>
88
+
89
+ <form
90
+ action="<?php echo $pflcore->getRootUrl(); ?>pay4later/adminhtml_pay4later/downloadhelper/cachebuster/<?php echo time(); ?>"
91
+ method="POST" id="preparedownloadfile" name="preparedownloadfile"
92
+ target="iframedownload"><input type="hidden" name="form_key"
93
+ id="form_key"
94
+ value="<?=Mage::getSingleton('core/session')->getFormKey() ?>" /> <input
95
+ type="hidden" name="regenerate" id="regenerate" value="0" /></form>
96
+
97
+ <iframe src="about:blank" id="iframedownload" name="iframedownload"
98
+ style="width: 1px; height: 1px;" frameborder="0"></iframe> <script
99
+ type="text/javascript">
100
+
101
+ function startdownload() {
102
+ $('regenerate').value = "1";
103
+ Effect.Fade('downloadbuttonzone');
104
+ Effect.Appear('downloadprep');
105
+ $('preparedownloadfile').submit();
106
+ $('regenerate').value = "0";
107
+ }
108
+
109
+ function updatestatus(percentval,alttext,timeleft){
110
+ $('timeleft').innerHTML = timeleft;
111
+ $('progresspercent').innerHTML = percentval;
112
+ $('currentprogress').morph('width:'+percentval+';background:green;');
113
+ $('currentprogress').alt = alttext;
114
+ $('currentprogress').title = alttext;
115
+ <?php echo $pflcore->browserCheckForReloader('preparedownloadfile'); ?>
116
+ }
117
+
118
+ function godownload(){
119
+ <?php echo $pflcore->browserCheckForReloader('preparedownloadfile'); ?>
120
+ Effect.Fade('downloadprep');
121
+ Effect.Appear('downloader');
122
+ }
123
+
124
+ function goredownload(){
125
+ <?php echo $pflcore->browserCheckForReloader('preparedownloadfile'); ?>
126
+ }
127
+
128
+ function goregenerate(){
129
+ $('regenerate').value = "1";
130
+ $('preparedownloadfile').submit();
131
+ Effect.Fade('downloader');
132
+ Effect.Appear('downloadprep');
133
+ $('regenerate').value = "0";
134
+ }
135
+
136
+ </script>
app/design/adminhtml/default/default/template/pay4later/bulk/help.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h4>Help Completing CSV File</h4>
2
+
3
+ <div class="entry-edit">
4
+ <div class="fieldset " id="group_fields4">
5
+ Now that you have downloaded the CSV file, please open it in your favourite spreadsheet software (for example OpenOffice, Numbers or Excel). Once open, navigate to row 2. Row 1 contains headers and therefore you will not need to update this row.<br/><br/>
6
+
7
+
8
+ In column A, your product ID is provided for reference.
9
+ <br/><br/>
10
+ In column B, your product SKU and Name are shown so that if you only wish to activate finance on one or a small selection of products you can search for their product SKU codes or product names.
11
+ <br/><br/>
12
+ Column C is a divider which can be ignored.
13
+ <br/><br/>
14
+ Column D to Column U contain spaces for you to activate or deactivate each finance product. To activate a finance product for one of your catalogue's products, please enter 0 or 1 into the cell.
15
+
16
+ <br/><br/>
17
+ </div>
18
+ </div>
app/design/adminhtml/default/default/template/pay4later/bulk/upload.phtml ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $pflcore = Mage::getModel('pay4later/pay4later'); ?>
2
+ <div class="entry-edit">
3
+ <div class="fieldset " id="group_fields4">
4
+ Once you have finished adding values into your CSV file, save it as a CSV once more and find the file below.
5
+ Then click 'Upload' to begin saving these values (this make take a few minutes to complete on large catalogues).
6
+ </div>
7
+ </div>
8
+
9
+ <div class="entry-edit" id="uploadbuttonzone"
10
+ name="uploadbuttonzone" style="display: block;">
11
+ <div class="entry-edit-head">
12
+ <h4 class="icon-head head-edit-form fieldset-legend">Find your CSV file below</h4>
13
+ <div class="form-buttons"></div>
14
+ </div>
15
+ <div class="fieldset " id="group_fields4">
16
+ <div class="hor-scroll">
17
+ <div id="displaynode">
18
+ <center>
19
+ <form id="edit_form_1" name="edit_form_1" method="post" action="<?php echo $pflcore->getRootUrl(); ?>pay4later/adminhtml_pay4later/uploadhelper/cachebuster/<?php echo time(); ?>" target="iframeupload" enctype="multipart/form-data">
20
+ <input type="hidden" name="form_key" id="form_key" value="<?=Mage::getSingleton('core/session')->getFormKey() ?>">
21
+ <input type="file" name="csvfile">
22
+ <input type="hidden" name="regenerate" id="regenerate" value="1" />
23
+ &nbsp;&nbsp;&nbsp;<button class="scalable save" type="submit" onclick="startupload();" name="submit" value="Upload">
24
+ <span>Upload</span>
25
+ </button>
26
+ </center>
27
+
28
+ </form>
29
+ </center>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
34
+
35
+ <div class="entry-edit" id="uploadingzone"
36
+ name="uploadingzone" style="display:none;">
37
+ <div class="entry-edit-head">
38
+ <h4 class="icon-head head-edit-form fieldset-legend">Uploading CSV - Please Wait</h4>
39
+ <div class="form-buttons"></div>
40
+ </div>
41
+ <div class="fieldset " id="group_fields4">
42
+ <div class="hor-scroll">
43
+ <div id="displaynode">
44
+ <center>
45
+ <img src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif" alt="Loading..." class="v-middle"> <img src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif" alt="Loading..." class="v-middle"> <img src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif" alt="Loading..." class="v-middle"> <img src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif" alt="Loading..." class="v-middle">
46
+ </center>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+
52
+
53
+
54
+ <div class="entry-edit" id="uploadproc" name="uploadproc"
55
+ style="display:none;">
56
+ <div class="entry-edit-head">
57
+ <h4 class="icon-head head-edit-form fieldset-legend">Processing uploaded file</h4>
58
+ <div class="form-buttons"></div>
59
+ </div>
60
+ <div class="fieldset " id="group_fields4">
61
+ <div class="hor-scroll">
62
+ <div id="displaynode">
63
+ <table cellspacing="0" class="form-list">
64
+ <tbody>
65
+ <tr>
66
+ <td class="label"><label for="color">Current Progress</label></td>
67
+ <td class="value">
68
+ <div style="width: 200px; border: 1px solid #999999; float: left;">
69
+ <div id="currentprogressupload" style="width: 0%; background: green;">&nbsp;</div>
70
+ </div>
71
+ &nbsp; <span id="progresspercentupload">0%</span> <span
72
+ id="upload_indicator" class="autocomplete-indicator"> <img
73
+ src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif"
74
+ alt="Loading..." class="v-middle"> </span></td>
75
+ <td class="scope-label"></td>
76
+ <td><small>&nbsp;</small></td>
77
+ </tr>
78
+
79
+ <tr>
80
+ <td class="label"><label for="color">Estimated Time
81
+ Remaining</label></td>
82
+ <td class="value"><span id="timeleftupload">Estimating time
83
+ required...</span></td>
84
+ <td class="scope-label"></td>
85
+ <td><small>&nbsp;</small></td>
86
+ </tr>
87
+
88
+ </tbody>
89
+ </table>
90
+ </div>
91
+ </div>
92
+ </div></div>
93
+
94
+
95
+ <div class="entry-edit" id="uploadcomplete" name="uploadcomplete"
96
+ style="display: none">
97
+ <div class="entry-edit-head">
98
+ <h4 class="icon-head head-edit-form fieldset-legend">Upload processing complete</h4>
99
+ <div class="form-buttons"></div>
100
+ </div>
101
+ <div class="fieldset " id="group_fields4">
102
+ <div class="hor-scroll">
103
+ <div id="displaynode">
104
+ This upload has been processed fully. Your changes have taken effect.
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </div>
109
+
110
+ <form action="<?php echo $pflcore->getRootUrl(); ?>pay4later/adminhtml_pay4later/uploadhelper/cachebuster/<?php echo time(); ?>" method="POST" id="prepareuploadfile" name="prepareuploadfile" target="iframeupload">
111
+ <input type="hidden" name="form_key" id="form_key" value="<?=Mage::getSingleton('core/session')->getFormKey() ?>" />
112
+ <input type="hidden" name="regenerate" id="regenerate" value="0" />
113
+ </form>
114
+ <iframe src="about:blank" id="iframeupload" name="iframeupload" style="width: 1px; height: 1px;" frameborder="0"></iframe>
115
+ <script type="text/javascript">
116
+
117
+ function startupload() {
118
+ Effect.Fade('uploadbuttonzone');
119
+ Effect.Appear('uploadingzone');
120
+ }
121
+
122
+ function processfileupload() {
123
+ Effect.Fade('uploadingzone');
124
+ Effect.Appear('uploadproc');
125
+ }
126
+
127
+ function gouploadcomplete(){
128
+ Effect.Fade('uploadproc');
129
+ Effect.Appear('uploadcomplete');
130
+ }
131
+
132
+ function updatestatusupload(percentval,alttext,timeleft){
133
+ $('timeleftupload').innerHTML = timeleft;
134
+ $('progresspercentupload').innerHTML = percentval;
135
+ $('currentprogressupload').morph('width:'+percentval+';background:green;');
136
+ $('currentprogressupload').alt = alttext;
137
+ $('currentprogressupload').title = alttext;
138
+ <?php echo $pflcore->browserCheckForReloader('prepareuploadfile'); ?>
139
+ }
140
+
141
+
142
+ </script>
app/design/adminhtml/default/default/template/pay4later/configheader.phtml 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
+ <?php if(Mage::getModel('pay4later/pay4laterlink')->checkLicenseFrontend()){ ?>
19
+ <div>
20
+ <div style="float:left;width:50%;text-align:left;"><img src="<?php echo $this->getSkinUrl('images/p4ladmin.gif'); ?>" /></div>
21
+ <div style="float:left;width:50%;text-align:right;">
22
+ <h3>Pay4Later Integration for Magento</h3>
23
+ Designed & Developed by <a href="http://www.camiloo.co.uk/?ref=camp4l" target="_blank">Camiloo Limited</a><br />
24
+ <?php
25
+ $xml = Mage::getModel('pay4later/pay4laterlink')->getRemoteXMLFileData("http://www.camiloo.co.uk/version/pay4later/versioncheck.php?Version=1.00");
26
+ $html = Mage::getModel('pay4later/pay4laterlink')->getRemoteFileData($xml->DisplayMessage[0]);
27
+ echo $html;
28
+ ?><br />
29
+ <b>Need Help?</b> View the <a href="<?php echo $this->escapeHtml($this->getUrl('pay4later/adminhtml_manual')) ?>" target="_blank"><?php echo Mage::helper('pay4later')->__('knowledgebase')?></a> or submit a <a href="<?php echo $this->escapeHtml($this->getUrl('pay4later/adminhtml_logging/support')) ?>" target="_blank"><?php echo Mage::helper('pay4later')->__('support ticket')?></a> to Camiloo Support.
30
+ </div>
31
+ </div>
32
+ <div style="clear:both"> &nbsp; </div>
33
+
34
+ <?php }else{ ?>
35
+
36
+ <div id="messages"><ul class="messages"><li class="error-msg"><ul><li>There was no license found for this server. <br /><br />Before continuing, please visit View / Update license under Pay4Later Integration within the system menu to get a license. A free 14 day trial license is available to new customers.</li></ul></li></ul></div>
37
+
38
+ <?php
39
+ die();
40
+ }
41
+
42
+ ?>
app/design/adminhtml/default/default/template/pay4later/kbase.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="entry-edit-head">
2
+ <h4 class="icon-head head-edit-form fieldset-legend">Knowledgebase</h4>
3
+ <div class="form-buttons"></div>
4
+ </div>
5
+ <iframe src="http://help.camiloo.co.uk/pay4later.php" frameborder="0" scrolling="no" style="width:100%;height:3000px;"></iframe>
app/design/adminhtml/default/default/template/pay4later/licensing/current.phtml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="entry-edit">
2
+ <fieldset id="my-fieldset">
3
+ Please use the form below to verify your license for this module. If you have not yet purchased this module or have not yet signed up for a 14 day free trial period, please visit the Licensing Store tab to continue.
4
+ </fieldset>
5
+
6
+ </div>
7
+
8
+
9
+ <div class="content-header">
10
+ <table cellspacing="0">
11
+ <tbody><tr>
12
+ <td><h3>License Information</h3></td><td class="form-buttons"><button class="scalable" type="button" onclick="reloadLicense();" name="button" value="Refresh"><span>Refresh</span></button></td>
13
+ </tr>
14
+ </tbody></table>
15
+ </div>
16
+
17
+
18
+ <div class="entry-edit">
19
+
20
+ <div class="fieldset " id="group_fields47">
21
+ <div class="hor-scroll" id="licensedisplay">
22
+ <table cellspacing="0" class="form-list">
23
+ <tbody>
24
+ <?php $xml = Mage::getModel('pay4later/pay4laterlink')->displayLicense(); ?>
25
+
26
+ <?php if($xml != ""){
27
+ foreach($xml as $node){
28
+
29
+ if(($node->getName() != "id")&&($node->getName() != "sku")&&($node->getName() != "datetest")){
30
+
31
+ ?>
32
+ <tr>
33
+ <?php if($node->getName() == "ddiff"){ ?>
34
+ <td class="label"><label for="name">Days Remaining</label></td>
35
+ <td class="value" style="width:450px;"><?php echo $node; ?></td>
36
+ <?php }else{ ?>
37
+ <td class="label"><label for="name"><?php echo ucwords(str_replace("_"," ",$node->getName())); ?></label></td>
38
+ <td class="value" style="width:450px;"><?php echo $node; ?></td>
39
+
40
+ <?php }?>
41
+ </tr>
42
+
43
+ <?php } } } ?>
44
+
45
+ </tbody>
46
+ </table>
47
+ </div>
48
+ </div>
49
+ </div>
50
+
51
+ <form action="<?php echo Mage::getModel('pay4later/pay4later')->getRootUrl(); ?>pay4later/adminhtml_licensing/refreshlicense/cachebuster/<?php echo time(); ?>" method="POST" id="reloadlicense" name="reloadlicense" target="searcher">
52
+ <input type="hidden" name="form_key" id="form_key" value="<?=Mage::getSingleton('core/session')->getFormKey() ?>"/>
53
+ </form>
54
+
55
+ <iframe src="about:blank" id="searcher" name="searcher" style="width:1px;height:1px;" frameborder="0"></iframe>
56
+
57
+ <script type="text/javascript">
58
+ function reloadLicense() {
59
+ $('reloadlicense').submit();
60
+ }
61
+
62
+ function updateLicensing(display){
63
+ $('licensedisplay').innerHTML = unescape(display);
64
+ }
65
+ </script>
app/design/adminhtml/default/default/template/pay4later/licensing/store.phtml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $url = Mage::getModel('pay4later/pay4laterlink')->getOrderform();
3
+ if($url != "active"){
4
+
5
+ ?>
6
+ <iframe src="<?php echo $url; ?>" style="width:100%;height:1000px;" frameborder="0"></iframe>
7
+ <?php }else{ ?>
8
+
9
+ <div class="entry-edit">
10
+ <fieldset id="my-fieldset">
11
+ You already have a license for this module. Please check 'Current License'.
12
+ </fieldset>
13
+ </div>
14
+
15
+ <?php } ?>
app/design/adminhtml/default/default/template/pay4later/logging/ticketcreate.phtml ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $is_ssl = (Mage::getStoreConfig('web/secure/use_in_adminhtml') == 1)? true : false; ?>
2
+ <?php
3
+
4
+ if($this->getRequest()->getParam('id') != ""){
5
+ $id = $this->getRequest()->getParam('id');
6
+ $model = Mage::getModel('pay4later/pay4laterlog')->load($id);
7
+ }else if($this->getRequest()->getParam('log_id') != ""){
8
+ $id = $this->getRequest()->getParam('log_id');
9
+ $model = Mage::getModel('pay4later/pay4laterlog')->load($id);
10
+ }else{
11
+ $model = Mage::getModel('pay4later/pay4laterlog');
12
+ }
13
+
14
+ ?>
15
+
16
+ <?php if (isset($id)){ ?>
17
+ <div class="entry-edit">
18
+ <fieldset id="my-fieldset">
19
+ At Camiloo, we are committed to providing the highest possible levels of Customer Support.
20
+ Therefore, if you are believe this communication log message indicates a bug or an error in this module,
21
+ please use the form below to contact our support helpdesk via email with a copy of the messages.
22
+ We will aim to reply to all support requests via email within 2 business days.
23
+ </fieldset>
24
+
25
+ </div>
26
+
27
+
28
+ <div class="content-header">
29
+ <table cellspacing="0">
30
+ <tbody><tr>
31
+ <td><h3>Review the outgoing / incoming messages</h3></td><td class="form-buttons">&nbsp;</td>
32
+ </tr>
33
+ </tbody></table>
34
+ </div>
35
+
36
+ <div class="entry-edit">
37
+
38
+ <div class="fieldset " id="group_fields47">
39
+ <div class="hor-scroll">
40
+ <table cellspacing="0" class="form-list">
41
+ <tbody>
42
+
43
+ <tr>
44
+ <td class="label"><label for="name">Outgoing Message</label></td>
45
+ <td class="value"><input id="name" name="outgoing" type="hidden" value="<?php echo htmlspecialchars($model->getOutgoing()); ?>" /><?php echo nl2br(htmlspecialchars($model->getOutgoing())); ?></td>
46
+ <td class="scope-label"></td>
47
+ <td><small>&nbsp;</small></td>
48
+ </tr>
49
+
50
+ <tr>
51
+ <td class="label"><label for="incoming">Incoming Message</label></td>
52
+ <td class="value"><input id=""incoming"" name="incoming" value="<?php echo htmlspecialchars($model->getIncoming()); ?>" type="hidden"/><?php echo nl2br(htmlspecialchars($model->getIncoming())); ?></td>
53
+ <td class="scope-label"></td>
54
+ <td><small>&nbsp;</small></td>
55
+ </tr>
56
+
57
+ <tr>
58
+ <td class="label"><label for="error">Error Message</label></td>
59
+ <td class="value"><input id="error" name="error" value="<?php echo htmlspecialchars($model->getError()); ?>" type="hidden"/><?php echo nl2br(htmlspecialchars($model->getError())); ?></td>
60
+ <td class="scope-label"></td>
61
+ <td><small>&nbsp;</small></td>
62
+ </tr>
63
+
64
+ <tr>
65
+ <td class="label"><label for="message_time">Date / Time</label></td>
66
+ <td class="value"><input type="hidden" id="message_time" name="message_time" value="<?php echo htmlspecialchars($model->getMessageTime()); ?>" /> <?php echo nl2br(htmlspecialchars($model->getMessageTime())); ?></td>
67
+ <td class="scope-label"></td>
68
+ <td><small>&nbsp;</small></td>
69
+ </tr>
70
+
71
+ </tbody>
72
+ </table>
73
+ </div>
74
+ </div>
75
+ </div>
76
+
77
+ <?php }else{ ?>
78
+
79
+ <div class="entry-edit">
80
+ <fieldset id="my-fieldset">
81
+ At Camiloo, we are committed to providing the highest possible levels of Customer Support.
82
+ Therefore, if you are believe there is a bug or an error in this module, please use the form below to contact our support helpdesk via email.
83
+ We will aim to reply to all support requests via email within 2 business days.
84
+ </fieldset>
85
+
86
+ </div>
87
+
88
+
89
+ <?php } ?>
90
+
91
+
92
+ <div class="content-header">
93
+ <table cellspacing="0">
94
+ <tbody><tr>
95
+ <td><h3>Ticket information</h3></td><td class="form-buttons">&nbsp;</td>
96
+ </tr>
97
+ </tbody></table>
98
+ </div>
99
+
100
+ <div class="entry-edit">
101
+ <div class="fieldset " id="group_fields47">
102
+ <div class="hor-scroll">
103
+ <table cellspacing="0" class="form-list">
104
+ <tbody>
105
+ <tr>
106
+ <td class="label"><label for="customer_name">Contact Name<span class="required">*</span></label></td>
107
+ <td class="value"><input name="customer_name" id="customer_name" value="" class="required-entry input-text" type="text" style="width:300px;"></td>
108
+ <td class="scope-label"></td>
109
+ <td><small>&nbsp;</small></td>
110
+ </tr>
111
+ <tr>
112
+ <td class="label"><label for="customer_email">Contact Email<span class="required">*</span></label></td>
113
+ <td class="value"><input name="customer_email" id="customer_email" value="" class="required-entry input-text" type="text" style="width:300px;"></td>
114
+ <td class="scope-label"></td>
115
+ <td><small>&nbsp;</small></td>
116
+ </tr><tr>
117
+ <td class="label"><label for="support_query">Message to Support<span class="required">*</span></label></td>
118
+ <td class="value"><textarea name="support_query" id="support_query" class="required-entry input-text" type="text" style="width:400px;height:300px;"></textarea></td>
119
+ <td class="scope-label"></td>
120
+ <td><small>&nbsp;</small></td>
121
+ </tr>
122
+ </tbody>
123
+ </table>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ <div class="content-header">
128
+ <table cellspacing="0">
129
+ <tbody><tr>
130
+ <td><h3>FTP & Magento Admin Credentials</h3></td><td class="form-buttons">&nbsp;</td>
131
+ </tr>
132
+ </tbody></table>
133
+ </div>
134
+
135
+ <div class="entry-edit">
136
+ <fieldset id="my-fieldset">
137
+ If possible, please provide FTP and Magento Admin area login details below. These details will only be used to diagnose & solve this issue and will not be saved on our server after your issue has been resolved. Our support area is protected by a 128-bit SSL certificate and passwords are stored in secret key AES encrypted database.
138
+ </fieldset>
139
+ </div>
140
+ <div class="entry-edit">
141
+ <div class="fieldset " id="group_fields47">
142
+ <div class="hor-scroll">
143
+ <table cellspacing="0" class="form-list">
144
+ <tbody>
145
+ <tr>
146
+ <td class="label"><label for="ftp_address">FTP Address</label></td>
147
+ <td class="value"><input name="ftp_address" id="ftp_address" value="" class=" input-text" type="text" style="width:200px;"></td>
148
+ <td class="scope-label"></td>
149
+ <td><small>&nbsp;</small></td>
150
+ </tr>
151
+ <tr>
152
+ <td class="label"><label for="ftp_username">FTP Username</label></td>
153
+ <td class="value"><input name="ftp_username" id="ftp_username" value="" class=" input-text" type="text" style="width:200px;"></td>
154
+ <td class="scope-label"></td>
155
+ <td><small>&nbsp;</small></td>
156
+ </tr><tr>
157
+ <td class="label"><label for="ftp_password">FTP Password</label></td>
158
+ <td class="value"><input name="ftp_password" id="ftp_password" value="" class=" input-text" type="password" style="width:200px;"></td>
159
+ <td class="scope-label"></td>
160
+ <td><small>&nbsp;</small></td>
161
+ </tr> <tr>
162
+ <td class="label"><label for="admin_url">Magento Admin Area Address</label></td>
163
+ <td class="value"><input name="admin_url" id="admin_url" value="" class=" input-text" type="text" style="width:200px;"></td>
164
+ <td class="scope-label"></td>
165
+ <td><small>&nbsp;</small></td>
166
+ </tr>
167
+ <tr>
168
+ <td class="label"><label for="admin_username">Magento Admin Area Username</label></td>
169
+ <td class="value"><input name="admin_username" id="admin_username" value="" class=" input-text" type="text" style="width:200px;"></td>
170
+ <td class="scope-label"></td>
171
+ <td><small>&nbsp;</small></td>
172
+ </tr><tr>
173
+ <td class="label"><label for="admin_password">Magento Admin Area Password</label></td>
174
+ <td class="value"><input name="admin_password" id="admin_password" value="" class=" input-text" type="password" style="width:200px;"></td>
175
+ <td class="scope-label"></td>
176
+ <td><small>&nbsp;</small></td>
177
+ </tr>
178
+ </tbody>
179
+ </table>
180
+ </div>
181
+ </div>
182
+ </div>
183
+
app/design/adminhtml/default/default/template/pay4later/paymentinfo.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $order = Mage::getModel('sales/order')->load($this->getMethod()->getInfoInstance()->getData('parent_id'));
3
+
4
+ $depositPercent = $this->getMethod()->getInfoInstance()->getData('pay4later_depositpercent');
5
+ $financeProductId = $this->getMethod()->getInfoInstance()->getData('pay4later_productid');
6
+ $financeProductName = $this->getMethod()->getInfoInstance()->getData('pay4later_productname');
7
+
8
+ ?>
9
+
10
+ <b>Pay4Later Finance Application</b><br />
11
+ Finance Option: <?php echo $financeProductName; ?><br />
12
+ Deposit Percentage: <?php echo $depositPercent; ?>%<br />
13
+ Deposit Payable: <?php echo Mage::helper('core')->formatCurrency(($order->getGrandTotal() / 100) * $depositPercent); ?><br />
app/design/adminhtml/default/default/template/pay4later/shippingbulk/download.phtml ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $pflcore = Mage::getModel('pay4later/pay4later'); ?>
2
+ <div class="entry-edit">
3
+ <div class="fieldset " id="group_fields4">To begin, please press
4
+ 'download' below. Magento will generate a CSV file and will then serve
5
+ it to you (this may take a few minutes).</div>
6
+ </div>
7
+
8
+ <div class="entry-edit" id="downloadbuttonzone"
9
+ name="downloadbuttonzone" style="display: block;">
10
+ <div class="entry-edit-head">
11
+ <h4 class="icon-head head-edit-form fieldset-legend">Commence
12
+ Download</h4>
13
+ <div class="form-buttons"></div>
14
+ </div>
15
+ <div class="fieldset " id="group_fields4">
16
+ <div class="hor-scroll">
17
+ <div id="displaynode">
18
+ <center>
19
+ <button id="downloadbutton" type="button" class="scalable "
20
+ onclick="startdownload();" style=""><span>Download</span></button>
21
+ </center>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+
27
+
28
+ <div class="entry-edit" id="downloadprep" name="downloadprep"
29
+ style="display: none;">
30
+ <div class="entry-edit-head">
31
+ <h4 class="icon-head head-edit-form fieldset-legend">Preparing
32
+ download file</h4>
33
+ <div class="form-buttons"></div>
34
+ </div>
35
+ <div class="fieldset " id="group_fields4">
36
+ <div class="hor-scroll">
37
+ <div id="displaynode">
38
+ <table cellspacing="0" class="form-list">
39
+ <tbody>
40
+
41
+ <tr>
42
+ <td class="label"><label for="color">Current Progress</label></td>
43
+ <td class="value">
44
+ <div style="width: 200px; border: 1px solid #999999; float: left;">
45
+ <div id="currentprogress" style="width: 0%; background: green;">&nbsp;</div>
46
+ </div>
47
+ &nbsp; <span id="progresspercent">0%</span> <span
48
+ id="download_indicator" class="autocomplete-indicator"> <img
49
+ src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif"
50
+ alt="Loading..." class="v-middle"> </span></td>
51
+ <td class="scope-label"></td>
52
+ <td><small>&nbsp;</small></td>
53
+ </tr>
54
+
55
+ <tr>
56
+ <td class="label"><label for="color">Estimated Time
57
+ Remaining</label></td>
58
+ <td class="value"><span id="timeleft">Estimating time
59
+ required...</span></td>
60
+ <td class="scope-label"></td>
61
+ <td><small>&nbsp;</small></td>
62
+ </tr>
63
+
64
+ </tbody>
65
+ </table>
66
+ </div>
67
+ </div>
68
+ </div></div>
69
+
70
+
71
+ <div class="entry-edit" id="downloader" name="downloader"
72
+ style="display: none;">
73
+ <div class="entry-edit-head">
74
+ <h4 class="icon-head head-edit-form fieldset-legend">Download is
75
+ ready</h4>
76
+ <div class="form-buttons"></div>
77
+ </div>
78
+ <div class="fieldset " id="group_fields4">
79
+ <div class="hor-scroll">
80
+ <div id="displaynode"><a href="#" onclick="goredownload();">Please
81
+ click here if your download does not begin automatically.</a><br />
82
+ <br />
83
+ <a href="#" onclick="goregenerate();">To regenerate this file,
84
+ please click here</a></div>
85
+ </div>
86
+ </div>
87
+ </div>
88
+
89
+ <form
90
+ action="<?php echo $pflcore->getRootUrl(); ?>pay4later/adminhtml_pay4latershipping/downloadhelper/cachebuster/<?php echo time(); ?>"
91
+ method="POST" id="preparedownloadfile" name="preparedownloadfile"
92
+ target="iframedownload"><input type="hidden" name="form_key"
93
+ id="form_key"
94
+ value="<?=Mage::getSingleton('core/session')->getFormKey() ?>" /> <input
95
+ type="hidden" name="regenerate" id="regenerate" value="0" /></form>
96
+
97
+ <iframe src="about:blank" id="iframedownload" name="iframedownload"
98
+ style="width: 1px; height: 1px;" frameborder="0"></iframe> <script
99
+ type="text/javascript">
100
+
101
+ function startdownload() {
102
+ $('regenerate').value = "1";
103
+ Effect.Fade('downloadbuttonzone');
104
+ Effect.Appear('downloadprep');
105
+ $('preparedownloadfile').submit();
106
+ $('regenerate').value = "0";
107
+ }
108
+
109
+ function updatestatus(percentval,alttext,timeleft){
110
+ $('timeleft').innerHTML = timeleft;
111
+ $('progresspercent').innerHTML = percentval;
112
+ $('currentprogress').morph('width:'+percentval+';background:green;');
113
+ $('currentprogress').alt = alttext;
114
+ $('currentprogress').title = alttext;
115
+ <?php echo $pflcore->browserCheckForReloader('preparedownloadfile'); ?>
116
+ }
117
+
118
+ function godownload(){
119
+ <?php echo $pflcore->browserCheckForReloader('preparedownloadfile'); ?>
120
+ Effect.Fade('downloadprep');
121
+ Effect.Appear('downloader');
122
+ }
123
+
124
+ function goredownload(){
125
+ <?php echo $pflcore->browserCheckForReloader('preparedownloadfile'); ?>
126
+ }
127
+
128
+ function goregenerate(){
129
+ $('regenerate').value = "1";
130
+ $('preparedownloadfile').submit();
131
+ Effect.Fade('downloader');
132
+ Effect.Appear('downloadprep');
133
+ $('regenerate').value = "0";
134
+ }
135
+
136
+ </script>
app/design/adminhtml/default/default/template/pay4later/shippingbulk/help.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h4>Help Completing CSV File</h4>
2
+
3
+ <div class="entry-edit">
4
+ <div class="fieldset " id="group_fields4">
5
+ Now that you have downloaded the CSV file, please open it in your favourite spreadsheet software (for example OpenOffice, Numbers or Excel). Once open, navigate to row 2. Row 1 contains headers and therefore you will not need to update this row.<br/><br/>
6
+ This CSV file contains columns to help you to limit the availability of various shipping options. Should you wish to apply a flat rate of shipping to all express checkout orders, please leave columns A to D empty, and then enter a shipping name and price.</div>
7
+ </div>
8
+
9
+ <div class="entry-edit">
10
+ <div class="fieldset " id="group_fields4">
11
+ If however you wish to set multiple shipping types, please note that only one shipping type can apply to a given order; such is the idea of 'Express Checkout'. Therefore please take care when following the below instructions to ensure that no overlaps exist, else the system will automatically select a value from those available.</div>
12
+ </div>
13
+
14
+ <div class="entry-edit">
15
+ <div class="fieldset " id="group_fields4">
16
+ <b>Column A and B</b> define the lower and upper weight limits for a given postage method. For example, if you ship some products via Royal Mail First Class Post, you would need to restrict the upper limit so that items heavier than the maximum allowed weight are not automatically assigned this shipping method. Please note that if a customer orders a quantity greater than one of a product, the weight value will be the sum total of all items. Example values: 0, 2500.<br />
17
+ Please leave the upper weight limit field empty if there is to be no upper weight limit, and likewise for lower weight limit.</div>
18
+ </div>
19
+
20
+ <div class="entry-edit">
21
+ <div class="fieldset " id="group_fields4">
22
+ <b>Column C and D</b> define the lower and upper weight price limits for a given postage method. For example, if you wish to send orders over a given price via a courier, you would need to restrict the lower limit so that items cheaper than the minimum allowed price are not automatically assigned this shipping method. Please note that if a customer orders a quantity greater than one of a product, the price value will be the sum total of all items. Example values: 500.00, 750.00.<br />
23
+ Please leave the upper price limit field empty if there is to be no upper price limit, and likewise for lower price limit.</div>
24
+ </div>
25
+
26
+ <div class="entry-edit">
27
+ <div class="fieldset " id="group_fields4">
28
+ <b>Column E</b> is a space for you to insert the name for this shipping method. This will be displayed on the order when it is imported from Pay4Later.</div>
29
+ </div>
30
+
31
+ <div class="entry-edit">
32
+ <div class="fieldset " id="group_fields4">
33
+ <b>Column F</b> is the space where you need to enter your shipping price. Free delivery methods should be entered here as 0.00.</div>
34
+ </div>
35
+
36
+ <div class="entry-edit">
37
+ <div class="fieldset " id="group_fields4">
38
+ Once you feel you have made all edits necessary, please save the file as a CSV again, and click 'Upload Bulk CSV' in the menu on the left.</div>
39
+ </div>
app/design/adminhtml/default/default/template/pay4later/shippingbulk/upload.phtml ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $pflcore = Mage::getModel('pay4later/pay4later'); ?>
2
+ <div class="entry-edit">
3
+ <div class="fieldset " id="group_fields4">
4
+ Once you have finished adding values into your CSV file, save it as a CSV once more and find the file below.
5
+ Then click 'Upload' to begin saving these values (this make take a few minutes to complete on large catalogues).
6
+ </div>
7
+ </div>
8
+
9
+ <div class="entry-edit" id="uploadbuttonzone"
10
+ name="uploadbuttonzone" style="display: block;">
11
+ <div class="entry-edit-head">
12
+ <h4 class="icon-head head-edit-form fieldset-legend">Find your CSV file below</h4>
13
+ <div class="form-buttons"></div>
14
+ </div>
15
+ <div class="fieldset " id="group_fields4">
16
+ <div class="hor-scroll">
17
+ <div id="displaynode">
18
+ <center>
19
+ <form id="edit_form_1" name="edit_form_1" method="post" action="<?php echo $pflcore->getRootUrl(); ?>pay4later/adminhtml_pay4latershipping/uploadhelper/cachebuster/<?php echo time(); ?>" target="iframeupload" enctype="multipart/form-data">
20
+ <input type="hidden" name="form_key" id="form_key" value="<?=Mage::getSingleton('core/session')->getFormKey() ?>">
21
+ <input type="file" name="csvfile">
22
+ <input type="hidden" name="regenerate" id="regenerate" value="1" />
23
+ &nbsp;&nbsp;&nbsp;<button class="scalable save" type="submit" onclick="startupload();" name="submit" value="Upload">
24
+ <span>Upload</span>
25
+ </button>
26
+ </center>
27
+
28
+ </form>
29
+ </center>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
34
+
35
+ <div class="entry-edit" id="uploadingzone"
36
+ name="uploadingzone" style="display:none;">
37
+ <div class="entry-edit-head">
38
+ <h4 class="icon-head head-edit-form fieldset-legend">Uploading CSV - Please Wait</h4>
39
+ <div class="form-buttons"></div>
40
+ </div>
41
+ <div class="fieldset " id="group_fields4">
42
+ <div class="hor-scroll">
43
+ <div id="displaynode">
44
+ <center>
45
+ <img src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif" alt="Loading..." class="v-middle"> <img src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif" alt="Loading..." class="v-middle"> <img src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif" alt="Loading..." class="v-middle"> <img src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif" alt="Loading..." class="v-middle">
46
+ </center>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+
52
+
53
+
54
+ <div class="entry-edit" id="uploadproc" name="uploadproc"
55
+ style="display:none;">
56
+ <div class="entry-edit-head">
57
+ <h4 class="icon-head head-edit-form fieldset-legend">Processing uploaded file</h4>
58
+ <div class="form-buttons"></div>
59
+ </div>
60
+ <div class="fieldset " id="group_fields4">
61
+ <div class="hor-scroll">
62
+ <div id="displaynode">
63
+ <table cellspacing="0" class="form-list">
64
+ <tbody>
65
+ <tr>
66
+ <td class="label"><label for="color">Current Progress</label></td>
67
+ <td class="value">
68
+ <div style="width: 200px; border: 1px solid #999999; float: left;">
69
+ <div id="currentprogressupload" style="width: 0%; background: green;">&nbsp;</div>
70
+ </div>
71
+ &nbsp; <span id="progresspercentupload">0%</span> <span
72
+ id="upload_indicator" class="autocomplete-indicator"> <img
73
+ src="<?php echo $pflcore->getSkinUrl(); ?>skin/adminhtml/default/default/images/ajax-loader.gif"
74
+ alt="Loading..." class="v-middle"> </span></td>
75
+ <td class="scope-label"></td>
76
+ <td><small>&nbsp;</small></td>
77
+ </tr>
78
+
79
+ <tr>
80
+ <td class="label"><label for="color">Estimated Time
81
+ Remaining</label></td>
82
+ <td class="value"><span id="timeleftupload">Estimating time
83
+ required...</span></td>
84
+ <td class="scope-label"></td>
85
+ <td><small>&nbsp;</small></td>
86
+ </tr>
87
+
88
+ </tbody>
89
+ </table>
90
+ </div>
91
+ </div>
92
+ </div></div>
93
+
94
+
95
+ <div class="entry-edit" id="uploadcomplete" name="uploadcomplete"
96
+ style="display: none">
97
+ <div class="entry-edit-head">
98
+ <h4 class="icon-head head-edit-form fieldset-legend">Upload processing complete</h4>
99
+ <div class="form-buttons"></div>
100
+ </div>
101
+ <div class="fieldset " id="group_fields4">
102
+ <div class="hor-scroll">
103
+ <div id="displaynode">
104
+ This upload has been processed fully. Your changes have taken effect.
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </div>
109
+
110
+ <form action="<?php echo $pflcore->getRootUrl(); ?>pay4later/adminhtml_pay4latershipping/uploadhelper/cachebuster/<?php echo time(); ?>" method="POST" id="prepareuploadfile" name="prepareuploadfile" target="iframeupload">
111
+ <input type="hidden" name="form_key" id="form_key" value="<?=Mage::getSingleton('core/session')->getFormKey() ?>" />
112
+ <input type="hidden" name="regenerate" id="regenerate" value="0" />
113
+ </form>
114
+ <iframe src="about:blank" id="iframeupload" name="iframeupload" style="width: 1px; height: 1px;" frameborder="0"></iframe>
115
+ <script type="text/javascript">
116
+
117
+ function startupload() {
118
+ Effect.Fade('uploadbuttonzone');
119
+ Effect.Appear('uploadingzone');
120
+ }
121
+
122
+ function processfileupload() {
123
+ Effect.Fade('uploadingzone');
124
+ Effect.Appear('uploadproc');
125
+ }
126
+
127
+ function gouploadcomplete(){
128
+ Effect.Fade('uploadproc');
129
+ Effect.Appear('uploadcomplete');
130
+ }
131
+
132
+ function updatestatusupload(percentval,alttext,timeleft){
133
+ $('timeleftupload').innerHTML = timeleft;
134
+ $('progresspercentupload').innerHTML = percentval;
135
+ $('currentprogressupload').morph('width:'+percentval+';background:green;');
136
+ $('currentprogressupload').alt = alttext;
137
+ $('currentprogressupload').title = alttext;
138
+ <?php echo $pflcore->browserCheckForReloader('prepareuploadfile'); ?>
139
+ }
140
+
141
+
142
+ </script>
app/design/frontend/default/base/layout/pay4later.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <pay4later_index_index>
6
+ <reference name="content">
7
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/pay4later.phtml" />
8
+ </reference>
9
+ </pay4later_index_index>
10
+ <pay4later_api_accept>
11
+ <reference name="root">
12
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
13
+ </reference>
14
+ <reference name="content">
15
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/accept.phtml" />
16
+ </reference>
17
+ </pay4later_api_accept>
18
+ <pay4later_api_decline>
19
+ <reference name="root">
20
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
21
+ </reference>
22
+ <reference name="content">
23
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/decline.phtml" />
24
+ </reference>
25
+ </pay4later_api_decline>
26
+ <pay4later_api_refer>
27
+ <reference name="root">
28
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
29
+ </reference>
30
+ <reference name="content">
31
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/refer.phtml" />
32
+ </reference>
33
+ </pay4later_api_refer>
34
+ <pay4later_index_index>
35
+ <reference name="content">
36
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/pay4later.phtml" />
37
+ </reference>
38
+ </pay4later_index_index>
39
+ <catalog_product_view>
40
+ <block type="pay4later/pay4later" name="product.info.pay4later" template="pay4later/creditpromo.phtml" />
41
+
42
+ <reference name="product.info.addtocart">
43
+ <action method="append"><block>product.info.pay4later</block></action>
44
+ </reference>
45
+ </catalog_product_view>
46
+ </layout>
app/design/frontend/default/base/template/pay4later/accept.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Your order has been received') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p><strong><?php echo $this->__('Thank you for your purchase!') ?></strong></p>
6
+
7
+ <p>You will shortly receive an email containing details of your order.</p>
8
+
9
+ <div class="buttons-set">
10
+ <button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
11
+ </div>
app/design/frontend/default/base/template/pay4later/creditpromo.phtml ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //003ab
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
3
+ ?>
4
+ 4+oV53DWtL9dv2LbQgf8SU0MK3x7oNLPKxLZdSWcJZqtBEY15BNGhDCwH0NGiKmdnTz/qxgUPrOA
5
+ q8hXbNwACGUdY+QEXOLJSTsI0n9gwjWdK1sEkg9k1lldrJLqyoOu/YV99MJyePSTvgha51akPNWo
6
+ 9q0faNCjc1SW41jXWedtLqmLu90UzAihZZ0XFhwc+p58l1VC10cu72x4G3dPDk37PenWw1Bxgrkq
7
+ lL9VjQMJRPtqHnm0s19cdi98mZwqr2BmmMrJBaoNT+dANdxrDymEPcanNqu8sDzTTBZAD25ZPKZ8
8
+ qsf+CxiKw8IksKjs4nR7V9R/BgU01UOYYvugvmyO8uk+OSEGcVSdwUofjm6C3YxIA3CAcICIn0oJ
9
+ dbxcSnlFtEemEtEK9d4z7LGePH263lubSVYjVES1+9LcizAVOaY5/znltnA4Jq1yr8xL2L87iM3n
10
+ HvC0I7zBPfGcHrWemgn769XVVdnlo/g0nmgfNEKYkFcWmGBrSa+1GPCBPIT8hhRV4CZEO40eYEFy
11
+ ksbLiJJYbEmNHX6zECeWpT4dZuXyctIltaEyw4BEIptftJQzeQTIKAXqfpc++s90OXxaJacXkB9E
12
+ B9zLVuIRktQS6Yb4b8EIEBamIVcgY7DLlNMmyaaQ1UqAq3H+vAlrcpSTun+GBXGLfxAO5xchKmtt
13
+ rrIsph41hKDN+uRL0EeFIYRMtYIj4DcA9iamdh141RGaYtm7mQ6x39fWtnSgYBHwdnMmItFyP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EIztR1ZysZ96CW9CCCqbfJ4Yhm5rzxl0O
80
+ S/WR441iIPzY0Qbh2gnMmnAvbXoLAv1CGPG7jsI+eTRPNpeAbeyo10ves47G9fMJkRYGBGRgExbL
81
+ 5FiG02fo5MUMGc+uIi4c8lvFIHtRbPCTwgD6lOUV4t5b4yJU/2r0IIX/YwXGaWbD8miqLKis/3/c
82
+ ih84XUikHV02cnxWGUrhOypYgvUAxRMIP+4PVnurgKxeO3S9FeulXQsroFXN2wdwuYrj/8gla6pa
83
+ UUT+jctsazOW+NGoY9h6tSpdCu3SuPPFEw5vi84i3Y8X406PWYzdOUhLFQrWdfFLdx/UZB5FOpB+
84
+ Mdu1rhia+d/e5QDy9MfMCqrOoIXZEgXix6xFLP7nkr+h+0UIyhnWO+yPLF/0ZertIKARMW7gsGod
85
+ 4q2bsVpeobouOqWXHgg7XRcCOW4Rzvmp+OQ2H+nSKKc8QcpvhYWcvUBrs5mQoUxFAz4LXHD8fPX3
86
+ 9859a6RTw/nrX4vF6tdzrwXeJfP7nRBiVLz54J+uCn51sIUKP0fX54VkZthWMEpAt9maFwRonztX
87
+ sKnLQTkndDBWrl6boUp98zpVk+dBWaTqtls9h7SISyLL8BQGQPjKdKxDPO2WmeFIXfa90sG+zRQJ
88
+ xFJJ
app/design/frontend/default/base/template/pay4later/decline.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Finance Application Declined') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p>Your application for finance was unsuccessful. Please restart the checkout process and select an alternative payment method to complete your order.</p>
app/design/frontend/default/base/template/pay4later/expressbutton/link.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $shortcutHtmlId = $this->getShortcutHtmlId() ?>
2
+ <a id="<?php echo $shortcutHtmlId ?>" href="<?php echo $this->getCheckoutUrl()?>">
3
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('images/p4lcheckout.gif'); ?>" alt="<?php echo Mage::helper('pay4later')->__('Apply for Finance');?>" />
4
+ </a>
5
+ <?php if ($this->getConfirmationUrl() || $this->getIsInCatalogProduct()): ?>
6
+ <?php if ($this->getIsInCatalogProduct()): ?>
7
+ <input type="hidden" id="pp_checkout_url" name="return_url" value="" />
8
+ <?php endif; ?>
9
+ <script type="text/javascript">
10
+ //<![CDATA[
11
+ Event.observe('<?php echo $shortcutHtmlId ?>', 'click', function(event) {
12
+ if (confirm('<?php echo Mage::helper('core')->jsQuoteEscape("This will take you to an application form where you can apply for finance on this product. Continue?")?>')) {
13
+ this.href = '<?php echo $this->getConfirmationUrl() ?>';
14
+ }
15
+ <?php if ($this->getIsInCatalogProduct()): ?>
16
+ $('pp_checkout_url').value = this.href;
17
+ productAddToCartForm.submit();
18
+ event.stop();
19
+ <?php endif; ?>
20
+ });
21
+ //]]>
22
+ </script>
23
+ <?php endif; ?>
app/design/frontend/default/base/template/pay4later/paymentform.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <script type="text/javascript" src="<?php echo $this->getUrl('pay4later/index/checkoutjsapi/'); ?>"></script>
3
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
4
+
5
+ <?php
6
+
7
+ /* At this point, we need to run through the items in the customers cart and work out which finance options are available.
8
+ By this point, we know that -some- finance options are available on some products; if not all products are eligable we will only be here
9
+ if deposit inflation is allowed, so we need to then check the config to see if we're allowed to display a select box for finance products
10
+ (or should we use ranking?)
11
+ */
12
+ ?>
13
+ <li>
14
+ <center><img src="<?php echo $this->getSkinUrl('images/p4lcheckoutlogo.gif'); ?>" /></center>
15
+ </li>
16
+
17
+ <li id="p4l_financequote" style="position: absolute; padding-top:15px; right: 30px; width: 270px; height: 200px; float:right;">
18
+ <ul class="checkoutSteps">
19
+ <li class="section">
20
+ <div class="step-title">
21
+ <span style="float:left;color:#000000;font-weight:bold;">Deposit to pay today</span>
22
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_depositpayable"></span></span>
23
+ <span style="color:#999999;float:left;clear:both;display:none;" id="depositInflator"><small><i>incl. items ineligible for finance @ &pound;<span id="depositInflation"></span></i></small></span>
24
+ </div>
25
+ <div class="step-title">
26
+ <span style="float:left;color:#000000;font-weight:bold;">plus <span id="p4l_monthcount"></span> Monthly Repayments of</span>
27
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_monthlies"></span></span>
28
+ </div>
29
+ <div class="step-title">
30
+ <span style="float:left;color:#000000;font-weight:bold;">Total Payable including interest</span>
31
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_totalpayable"><?php echo Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(); ?></span><input type="hidden" name="p4l_ordertotal" id="p4l_ordertotal" value ="<?php echo Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(); ?>" /></span>
32
+ </div>
33
+ </li>
34
+ </ul>
35
+ </li>
36
+
37
+ <li id="p4l_hasmultiplefinanceoptions" style="">
38
+ <label for="<?php echo $_code ?>_financeproduct" class="required"><em>*</em><?php echo $this->__('Please select a Finance option:') ?></label>
39
+ <div class="input-box">
40
+ <select id="p4l_financeproduct" name="payment[pay4later_productid]" class="required-entry" onchange="updateFinanceOptionSelection();">
41
+ </select>
42
+ </div>
43
+ </li>
44
+
45
+ <li id="p4l_hasonefinanceoption" style="">
46
+ <br />
47
+ <label for="<?php echo $_code ?>_financeproduct"><?php echo $this->__('Finance type:') ?></label>
48
+ <div class="input-box">Interest Free Credit (0% APR)<input type="hidden" id="onlyone" name="onlyone" /></div>
49
+ </li>
50
+
51
+ <li id="p4l_hasdepositoptions" style="">
52
+ <label for="<?php echo $_code ?>_depositamount" class="required"><em>*</em><?php echo $this->__('Amount to pay as deposit:') ?></label>
53
+ <div style="clear:both;margin-top:20px;margin-bottom:20px;">
54
+ <div id="deposittrack" style="width:300px; background:url(<?php echo $this->getSkinUrl('images/p4ldepositslidebg.gif'); ?>); padding-top:2px; height:38px;">
55
+ <div id="deposithandle" style="width: 40px; height: 40px; background-image: url(<?php echo $this->getSkinUrl('images/p4ldepositslidegripper.png'); ?>); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; cursor: move; position: relative; left: 20px; " class="selected">
56
+ <p id="depositdisplay" style="padding-left:9px;padding-top:11px;font-weight:bold;">%</p>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ </li>
62
+
63
+ <li id="p4l_hasfixeddeposit" style="">
64
+ <label for="<?php echo $_code ?>_financeproduct"><?php echo $this->__('Deposit Amount:') ?></label>
65
+ <div class="input-box"><span id="p4l_onedepositpcent">10</span>% of total order value</div>
66
+ </li>
67
+
68
+ <li id="p4l_redirectinformation" style="">
69
+ <input type="hidden" name="payment[p4l_calcElements_term]" id="p4l_calcElements_term" />
70
+ <input type="hidden" name="payment[pay4later_productname]" id="p4l_calcElements_productname" />
71
+ <input type="hidden" name="payment[pay4later_depositpercent]" id="p4l_calcElements_deposit" />
72
+ You will be redirected to Pay4Later to complete this finance application when you place your order
73
+ </li>
74
+
75
+ </ul>
app/design/frontend/default/base/template/pay4later/paymentinfo.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <p><b><?php echo $this->getMethod()->getTitle() ?>:</b></p>
2
+
3
+ <?php echo $this->getInfo()->getPay4laterProductname(); ?><br /><br />
4
+
5
+ <b>Deposit to pay today:</b><br />
6
+
7
+ <?php echo Mage::helper('core')->formatCurrency((Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal() / 100 * $this->getInfo()->getPay4laterDepositpercent())); ?>
app/design/frontend/default/base/template/pay4later/refer.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Finance Application Referred') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p>Thank you, we have received your order. At present, Pay4Later Retail Finance are reviewing your finance application and therefore we cannot currently finish processing your order. Please rest assured however that if and when your application for finance is approved we will finish processing your order immediately and send you an email confirming this.</p>
app/design/frontend/default/blank/layout/pay4later.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <pay4later_index_index>
6
+ <reference name="content">
7
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/pay4later.phtml" />
8
+ </reference>
9
+ </pay4later_index_index>
10
+ <pay4later_api_accept>
11
+ <reference name="root">
12
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
13
+ </reference>
14
+ <reference name="content">
15
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/accept.phtml" />
16
+ </reference>
17
+ </pay4later_api_accept>
18
+ <pay4later_api_decline>
19
+ <reference name="root">
20
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
21
+ </reference>
22
+ <reference name="content">
23
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/decline.phtml" />
24
+ </reference>
25
+ </pay4later_api_decline>
26
+ <pay4later_api_refer>
27
+ <reference name="root">
28
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
29
+ </reference>
30
+ <reference name="content">
31
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/refer.phtml" />
32
+ </reference>
33
+ </pay4later_api_refer>
34
+ <pay4later_index_index>
35
+ <reference name="content">
36
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/pay4later.phtml" />
37
+ </reference>
38
+ </pay4later_index_index>
39
+ <catalog_product_view>
40
+ <block type="pay4later/pay4later" name="product.info.pay4later" template="pay4later/creditpromo.phtml" />
41
+
42
+ <reference name="product.info.addtocart">
43
+ <action method="append"><block>product.info.pay4later</block></action>
44
+ </reference>
45
+ </catalog_product_view>
46
+ </layout>
app/design/frontend/default/blank/template/pay4later/accept.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Your order has been received') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p><strong><?php echo $this->__('Thank you for your purchase!') ?></strong></p>
6
+
7
+ <p>You will shortly receive an email containing details of your order.</p>
8
+
9
+ <div class="buttons-set">
10
+ <button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
11
+ </div>
app/design/frontend/default/blank/template/pay4later/creditpromo.phtml ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //003ab
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
3
+ ?>
4
+ 4+oV5FOFi8Mss0YgMyKbfdZNvcaBhqhS+G3xoQUix93Q1a8cn9C/QHGQ7lDp+MehJeLU6XgjmQ43
5
+ o6zvoM7c7M1KaRBS8zAC8G8arKDkcuVxLup/6+Ls4vFPM9tKpfAOAVDtRPnGMsIVPlDMAJMWCIOG
6
+ IbtNicms6l8g06t8+kn7Gnzw8NY/5NlMjjhW1LP5Pnw7sdgw2VWqX0itpoVkt+1Pieo0pcv+zAIt
7
+ 9KD1c0EWUDM+1sPSm/YJV9026phC9uRNsFS9dpP1pl1XXMmkEcvTalmyNVtNtrqGm/a3/uHoJF1F
8
+ vJrNuqcPR/X74E/rS/n2KOz1JbFvWMfaNbbzWGqMABHzizSdt3B8XjrlGOLznO6qfkosuixcNQ/M
9
+ U//WYbss3p8GKyAaGvow7IPj1WVBKPx2n+BPpbRzYdo12kZFvKwlSw6lCOR6z5lrLoRVNEUYY1JR
10
+ rJkX+VDa6QIcBIcY0B7NvSCRIRTjeZvUOUdV+TmUsgesgIWKQdMLeD9MkKL79L029EgqKl/OrzqQ
11
+ VMIZSRYpAATTg91t9GWiTP30SJkPy1SDwCjKLCQ+LERd2gzA6pVz3xYiKIlYT/7YZNp26WJZA5zj
12
+ aLnoMkmYpZ9EaxUHP+feAkgo9Ms+d7mcxHphTcaKnB2OFxHVRurEq6omvN91MnfabA3XQb3xJHy1
13
+ QDyrbxASxYVOjqOhc0+2S9ifeJKc6BIwRe95RM7lRvuA33xBjI5CU8kLtL8q73M/qb3HwUxXiHJh
14
+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mnYu7wrNzVQzIfNrlOEA/Y5OwGvmLm32HnSFqjPQhoDC7rd7hfKGKK
81
+ wOnMqQEK0zBMBAzPtoC6Ysq/fg0vOGXKXR+/FNgQsxZKHmzUs95xbxMs/l3pYxSNo1qB1Lv5KnRq
82
+ GPoiRFKw6GTCJmctmu5lRePwTOmbwxDZVggWkYXlxkaRW15JrNmJHB6HSboExrQSHOyrYS7j0oHv
83
+ gCjGkPupcreCXrzW7LhQ/ZAs5A7xK03y0JDdvsfzppaeaEmpEyhHAOhAMUEutKzo6pksVBR7h0M8
84
+ KH4sfo/6WV95uNNDYAuSJT3/LDRpHNAEiXw94yRreD6U3lpk+e/znpvoWqHoQP6tlDRh8gjdN1VE
85
+ 3wn+MQb8GNvNcF5XP0hBOY234gU3L1+cMRFDtjbfMbth6UytzO+2FhZXQkyu71cnSk/Bw8LCsbL1
86
+ aMAJiEQ3vJ37ToPXWYlgxPCLSE9wq6JblTYw40/BR6yXKn2b8icTxcOughAOPzAvWBFjY+oHxvaP
87
+ tiGmOzSVQSbAZOXPcVw7j8WLgwQZs+Z6V6vCSMdAHdyw6vEtt+FNRG==
app/design/frontend/default/blank/template/pay4later/decline.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Finance Application Declined') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p>Your application for finance was unsuccessful. Please restart the checkout process and select an alternative payment method to complete your order.</p>
app/design/frontend/default/blank/template/pay4later/expressbutton/link.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $shortcutHtmlId = $this->getShortcutHtmlId() ?>
2
+ <a id="<?php echo $shortcutHtmlId ?>" href="<?php echo $this->getCheckoutUrl()?>">
3
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('images/p4lcheckout.gif'); ?>" alt="<?php echo Mage::helper('pay4later')->__('Apply for Finance');?>" />
4
+ </a>
5
+ <?php if ($this->getConfirmationUrl() || $this->getIsInCatalogProduct()): ?>
6
+ <?php if ($this->getIsInCatalogProduct()): ?>
7
+ <input type="hidden" id="pp_checkout_url" name="return_url" value="" />
8
+ <?php endif; ?>
9
+ <script type="text/javascript">
10
+ //<![CDATA[
11
+ Event.observe('<?php echo $shortcutHtmlId ?>', 'click', function(event) {
12
+ if (confirm('<?php echo Mage::helper('core')->jsQuoteEscape("This will take you to an application form where you can apply for finance on this product. Continue?")?>')) {
13
+ this.href = '<?php echo $this->getConfirmationUrl() ?>';
14
+ }
15
+ <?php if ($this->getIsInCatalogProduct()): ?>
16
+ $('pp_checkout_url').value = this.href;
17
+ productAddToCartForm.submit();
18
+ event.stop();
19
+ <?php endif; ?>
20
+ });
21
+ //]]>
22
+ </script>
23
+ <?php endif; ?>
app/design/frontend/default/blank/template/pay4later/paymentform.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <script type="text/javascript" src="<?php echo $this->getUrl('pay4later/index/checkoutjsapi/'); ?>"></script>
3
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
4
+
5
+ <?php
6
+
7
+ /* At this point, we need to run through the items in the customers cart and work out which finance options are available.
8
+ By this point, we know that -some- finance options are available on some products; if not all products are eligable we will only be here
9
+ if deposit inflation is allowed, so we need to then check the config to see if we're allowed to display a select box for finance products
10
+ (or should we use ranking?)
11
+ */
12
+ ?>
13
+ <li>
14
+ <center><img src="<?php echo $this->getSkinUrl('images/p4lcheckoutlogo.gif'); ?>" /></center>
15
+ </li>
16
+
17
+ <li id="p4l_financequote" style="position: absolute; padding-top:15px; right: 30px; width: 270px; height: 200px; float:right;">
18
+ <ul class="checkoutSteps">
19
+ <li class="section">
20
+ <div class="step-title">
21
+ <span style="float:left;color:#000000;font-weight:bold;">Deposit to pay today</span>
22
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_depositpayable"></span></span>
23
+ <span style="color:#999999;float:left;clear:both;display:none;" id="depositInflator"><small><i>incl. items ineligible for finance @ &pound;<span id="depositInflation"></span></i></small></span>
24
+ </div>
25
+ <div class="step-title">
26
+ <span style="float:left;color:#000000;font-weight:bold;">plus <span id="p4l_monthcount"></span> Monthly Repayments of</span>
27
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_monthlies"></span></span>
28
+ </div>
29
+ <div class="step-title">
30
+ <span style="float:left;color:#000000;font-weight:bold;">Total Payable including interest</span>
31
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_totalpayable"><?php echo Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(); ?></span><input type="hidden" name="p4l_ordertotal" id="p4l_ordertotal" value ="<?php echo Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(); ?>" /></span>
32
+ </div>
33
+ </li>
34
+ </ul>
35
+ </li>
36
+
37
+ <li id="p4l_hasmultiplefinanceoptions" style="">
38
+ <label for="<?php echo $_code ?>_financeproduct" class="required"><em>*</em><?php echo $this->__('Please select a Finance option:') ?></label>
39
+ <div class="input-box">
40
+ <select id="p4l_financeproduct" name="payment[pay4later_productid]" class="required-entry" onchange="updateFinanceOptionSelection();">
41
+ </select>
42
+ </div>
43
+ </li>
44
+
45
+ <li id="p4l_hasonefinanceoption" style="">
46
+ <br />
47
+ <label for="<?php echo $_code ?>_financeproduct"><?php echo $this->__('Finance type:') ?></label>
48
+ <div class="input-box">Interest Free Credit (0% APR)<input type="hidden" id="onlyone" name="onlyone" /></div>
49
+ </li>
50
+
51
+ <li id="p4l_hasdepositoptions" style="">
52
+ <label for="<?php echo $_code ?>_depositamount" class="required"><em>*</em><?php echo $this->__('Amount to pay as deposit:') ?></label>
53
+ <div style="clear:both;margin-top:20px;margin-bottom:20px;">
54
+ <div id="deposittrack" style="width:300px; background:url(<?php echo $this->getSkinUrl('images/p4ldepositslidebg.gif'); ?>); padding-top:2px; height:38px;">
55
+ <div id="deposithandle" style="width: 40px; height: 40px; background-image: url(<?php echo $this->getSkinUrl('images/p4ldepositslidegripper.png'); ?>); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; cursor: move; position: relative; left: 20px; " class="selected">
56
+ <p id="depositdisplay" style="padding-left:9px;padding-top:11px;font-weight:bold;">%</p>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ </li>
62
+
63
+ <li id="p4l_hasfixeddeposit" style="">
64
+ <label for="<?php echo $_code ?>_financeproduct"><?php echo $this->__('Deposit Amount:') ?></label>
65
+ <div class="input-box"><span id="p4l_onedepositpcent">10</span>% of total order value</div>
66
+ </li>
67
+
68
+ <li id="p4l_redirectinformation" style="">
69
+ <input type="hidden" name="payment[p4l_calcElements_term]" id="p4l_calcElements_term" />
70
+ <input type="hidden" name="payment[pay4later_productname]" id="p4l_calcElements_productname" />
71
+ <input type="hidden" name="payment[pay4later_depositpercent]" id="p4l_calcElements_deposit" />
72
+ You will be redirected to Pay4Later to complete this finance application when you place your order
73
+ </li>
74
+
75
+ </ul>
app/design/frontend/default/blank/template/pay4later/paymentinfo.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <p><b><?php echo $this->getMethod()->getTitle() ?>:</b></p>
2
+
3
+ <?php echo $this->getInfo()->getPay4laterProductname(); ?><br /><br />
4
+
5
+ <b>Deposit to pay today:</b><br />
6
+
7
+ <?php echo Mage::helper('core')->formatCurrency((Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal() / 100 * $this->getInfo()->getPay4laterDepositpercent())); ?>
app/design/frontend/default/blank/template/pay4later/refer.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Finance Application Referred') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p>Thank you, we have received your order. At present, Pay4Later Retail Finance are reviewing your finance application and therefore we cannot currently finish processing your order. Please rest assured however that if and when your application for finance is approved we will finish processing your order immediately and send you an email confirming this.</p>
app/design/frontend/default/default/layout/pay4later.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <pay4later_index_index>
6
+ <reference name="content">
7
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/pay4later.phtml" />
8
+ </reference>
9
+ </pay4later_index_index>
10
+ <pay4later_api_accept>
11
+ <reference name="root">
12
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
13
+ </reference>
14
+ <reference name="content">
15
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/accept.phtml" />
16
+ </reference>
17
+ </pay4later_api_accept>
18
+ <pay4later_api_decline>
19
+ <reference name="root">
20
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
21
+ </reference>
22
+ <reference name="content">
23
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/decline.phtml" />
24
+ </reference>
25
+ </pay4later_api_decline>
26
+ <pay4later_api_refer>
27
+ <reference name="root">
28
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
29
+ </reference>
30
+ <reference name="content">
31
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/refer.phtml" />
32
+ </reference>
33
+ </pay4later_api_refer>
34
+ <pay4later_index_index>
35
+ <reference name="content">
36
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/pay4later.phtml" />
37
+ </reference>
38
+ </pay4later_index_index>
39
+ <catalog_product_view>
40
+ <block type="pay4later/pay4later" name="product.info.pay4later" template="pay4later/creditpromo.phtml" />
41
+
42
+ <reference name="product.info.addtocart">
43
+ <action method="append"><block>product.info.pay4later</block></action>
44
+ </reference>
45
+ </catalog_product_view>
46
+ </layout>
app/design/frontend/default/default/template/pay4later/accept.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Your order has been received') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p><strong><?php echo $this->__('Thank you for your purchase!') ?></strong></p>
6
+
7
+ <p>You will shortly receive an email containing details of your order.</p>
8
+
9
+ <div class="buttons-set">
10
+ <button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
11
+ </div>
app/design/frontend/default/default/template/pay4later/creditpromo.phtml ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //003ab
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
3
+ ?>
4
+ 4+oV5FO0WQQmntc9MSeKXUjY1Uvj+cDd5SpCtxEiBA+/FW6YDJ3ouCIR7l5VZeqT1/4lEU7MZT9+
5
+ /A6/7S91tAch9ObhS1XU2YHa2KSCAxKGlzmBD/0MkM0mKXUIqPddSnlIm3xfrWRal6xd3kjyNfIK
6
+ wYwlUSVpyTx1NOBnjwhFZmKQXXPPWZJmVIvBoLMk9VtUn8rh+VRe7DtgwWoVE56xvUM8oKgsS4ev
7
+ SK0Aem2rXAiucFMDKGNrEBheNKLdB2uTNy/+FyIEC9Pc7WCaVoCt2/ccozdNtrrD/mAkWUX/0C7E
8
+ 0cKhy9wCmohAPrZK2i7RfJu/RvKGMvm3vGrAdkb6NxSZsd7OVnEWboZDAFAPkYZ+U0xNRviofElA
9
+ KDhGHqccuWurdVH16ETsVPaCdnbGFm+oDLyBxYEQlDH6rKSGUUP6Sfs8YSql65Zsh1ctBKucfGSY
10
+ izoM4SIHPZatxnpNgPyK6YY1tN9GXqSVDGAOqoXu8VEqUJSdJ1iVPLWwwptrXJ2C5kn5Us6Aw3fJ
11
+ 0aHjNosOBwr3B81UFipGO8UZCyfZ7oIeFewThV7pYoKgZy89LuUUf+B3AvAxnmAeP2BdovQ0nzOX
12
+ ds9Z05ANS2iskG1uPKsKSIiM5KB/STjRINfkzqvZFypv1AC2zJgpc1V4nkzeyGvT81VlWBYeTaLh
13
+ KjnSEIUQSa8WylyM7LIf0Tan6+7JA9Kvyp0/eTyhCEWYKf5B4nf4Q1geSCl1MuJugw31IboQWmrI
14
+ ipybbIj7i54hgk0AT/nO+bB2ocYHEPSzdyX5IrB3hNnZN83rRVqtpRo+VdJVomzr7Dtww113L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P+aS14uIsLS3YaTCYT7Tog2xPWAsJ+UKBK
82
+ 9UKk53XdQXIObpvpW8hxFg//kGXQCVUnX/309NpxuvgeJH5gEcS4MlQI/rUkXikTI2j1ds/QiFjO
83
+ tPs0lGl/3SGWRNVnXTTUkk+3fdejpzxmdG3/Yj1tkL+9Z/pKu0AZINzyRl3cL/62D+nhxWWNHtNi
84
+ mPPy2iZVVaEXIyQD/JxoYslL5MS4pQPERhb0AMK8wN3JUDKgQdR5srhM2Ck3udOO/Xvz055J1Yci
85
+ mOAlDMs87zD4EGwTIK7Car6gKtP4MlCSLcBZDURkA2eHxpGUFa7/chLKFeD+XHq+61tSqkgvUr3V
86
+ jpeKj2IpcGAELWlMWajsuacEIlm0aSbxCK0VdNXoj4qu8VxlwNNviG4ssN/X+UuWU8vD2ZfR25HG
87
+ 3VdeGlMsrWdnck5zSEW2vOZm5v+RvUWUmzbRrxI7G4egk92lqIi=
app/design/frontend/default/default/template/pay4later/decline.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Finance Application Declined') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p>Your application for finance was unsuccessful. Please restart the checkout process and select an alternative payment method to complete your order.</p>
app/design/frontend/default/default/template/pay4later/expressbutton/link.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $shortcutHtmlId = $this->getShortcutHtmlId() ?>
2
+ <a id="<?php echo $shortcutHtmlId ?>" href="<?php echo $this->getCheckoutUrl()?>">
3
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('images/p4lcheckout.gif'); ?>" alt="<?php echo Mage::helper('pay4later')->__('Apply for Finance');?>" />
4
+ </a>
5
+ <?php if ($this->getConfirmationUrl() || $this->getIsInCatalogProduct()): ?>
6
+ <?php if ($this->getIsInCatalogProduct()): ?>
7
+ <input type="hidden" id="pp_checkout_url" name="return_url" value="" />
8
+ <?php endif; ?>
9
+ <script type="text/javascript">
10
+ //<![CDATA[
11
+ Event.observe('<?php echo $shortcutHtmlId ?>', 'click', function(event) {
12
+ if (confirm('<?php echo Mage::helper('core')->jsQuoteEscape("This will take you to an application form where you can apply for finance on this product. Continue?")?>')) {
13
+ this.href = '<?php echo $this->getConfirmationUrl() ?>';
14
+ }
15
+ <?php if ($this->getIsInCatalogProduct()): ?>
16
+ $('pp_checkout_url').value = this.href;
17
+ productAddToCartForm.submit();
18
+ event.stop();
19
+ <?php endif; ?>
20
+ });
21
+ //]]>
22
+ </script>
23
+ <?php endif; ?>
app/design/frontend/default/default/template/pay4later/paymentform.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <script type="text/javascript" src="<?php echo $this->getUrl('pay4later/index/checkoutjsapi/'); ?>"></script>
3
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
4
+
5
+ <?php
6
+
7
+ /* At this point, we need to run through the items in the customers cart and work out which finance options are available.
8
+ By this point, we know that -some- finance options are available on some products; if not all products are eligable we will only be here
9
+ if deposit inflation is allowed, so we need to then check the config to see if we're allowed to display a select box for finance products
10
+ (or should we use ranking?)
11
+ */
12
+ ?>
13
+ <li>
14
+ <center><img src="<?php echo $this->getSkinUrl('images/p4lcheckoutlogo.gif'); ?>" /></center>
15
+ </li>
16
+
17
+ <li id="p4l_financequote" style="position: absolute; padding-top:15px; right: 30px; width: 270px; height: 200px; float:right;">
18
+ <ul class="checkoutSteps">
19
+ <li class="section">
20
+ <div class="step-title">
21
+ <span style="float:left;color:#000000;font-weight:bold;">Deposit to pay today</span>
22
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_depositpayable"></span></span>
23
+ <span style="color:#999999;float:left;clear:both;display:none;" id="depositInflator"><small><i>incl. items ineligible for finance @ &pound;<span id="depositInflation"></span></i></small></span>
24
+ </div>
25
+ <div class="step-title">
26
+ <span style="float:left;color:#000000;font-weight:bold;">plus <span id="p4l_monthcount"></span> Monthly Repayments of</span>
27
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_monthlies"></span></span>
28
+ </div>
29
+ <div class="step-title">
30
+ <span style="float:left;color:#000000;font-weight:bold;">Total Payable including interest</span>
31
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_totalpayable"><?php echo Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(); ?></span><input type="hidden" name="p4l_ordertotal" id="p4l_ordertotal" value ="<?php echo Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(); ?>" /></span>
32
+ </div>
33
+ </li>
34
+ </ul>
35
+ </li>
36
+
37
+ <li id="p4l_hasmultiplefinanceoptions" style="">
38
+ <label for="<?php echo $_code ?>_financeproduct" class="required"><em>*</em><?php echo $this->__('Please select a Finance option:') ?></label>
39
+ <div class="input-box">
40
+ <select id="p4l_financeproduct" name="payment[pay4later_productid]" class="required-entry" onchange="updateFinanceOptionSelection();">
41
+ </select>
42
+ </div>
43
+ </li>
44
+
45
+ <li id="p4l_hasonefinanceoption" style="">
46
+ <br />
47
+ <label for="<?php echo $_code ?>_financeproduct"><?php echo $this->__('Finance type:') ?></label>
48
+ <div class="input-box">Interest Free Credit (0% APR)<input type="hidden" id="onlyone" name="onlyone" /></div>
49
+ </li>
50
+
51
+ <li id="p4l_hasdepositoptions" style="">
52
+ <label for="<?php echo $_code ?>_depositamount" class="required"><em>*</em><?php echo $this->__('Amount to pay as deposit:') ?></label>
53
+ <div style="clear:both;margin-top:20px;margin-bottom:20px;">
54
+ <div id="deposittrack" style="width:300px; background:url(<?php echo $this->getSkinUrl('images/p4ldepositslidebg.gif'); ?>); padding-top:2px; height:38px;">
55
+ <div id="deposithandle" style="width: 40px; height: 40px; background-image: url(<?php echo $this->getSkinUrl('images/p4ldepositslidegripper.png'); ?>); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; cursor: move; position: relative; left: 20px; " class="selected">
56
+ <p id="depositdisplay" style="padding-left:9px;padding-top:11px;font-weight:bold;">%</p>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ </li>
62
+
63
+ <li id="p4l_hasfixeddeposit" style="">
64
+ <label for="<?php echo $_code ?>_financeproduct"><?php echo $this->__('Deposit Amount:') ?></label>
65
+ <div class="input-box"><span id="p4l_onedepositpcent">10</span>% of total order value</div>
66
+ </li>
67
+
68
+ <li id="p4l_redirectinformation" style="">
69
+ <input type="hidden" name="payment[p4l_calcElements_term]" id="p4l_calcElements_term" />
70
+ <input type="hidden" name="payment[pay4later_productname]" id="p4l_calcElements_productname" />
71
+ <input type="hidden" name="payment[pay4later_depositpercent]" id="p4l_calcElements_deposit" />
72
+ You will be redirected to Pay4Later to complete this finance application when you place your order
73
+ </li>
74
+
75
+ </ul>
app/design/frontend/default/default/template/pay4later/paymentinfo.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <p><b><?php echo $this->getMethod()->getTitle() ?>:</b></p>
2
+
3
+ <?php echo $this->getInfo()->getPay4laterProductname(); ?><br /><br />
4
+
5
+ <b>Deposit to pay today:</b><br />
6
+
7
+ <?php echo Mage::helper('core')->formatCurrency((Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal() / 100 * $this->getInfo()->getPay4laterDepositpercent())); ?>
app/design/frontend/default/default/template/pay4later/refer.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Finance Application Referred') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p>Thank you, we have received your order. At present, Pay4Later Retail Finance are reviewing your finance application and therefore we cannot currently finish processing your order. Please rest assured however that if and when your application for finance is approved we will finish processing your order immediately and send you an email confirming this.</p>
app/design/frontend/default/enterprise/layout/pay4later.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <pay4later_index_index>
6
+ <reference name="content">
7
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/pay4later.phtml" />
8
+ </reference>
9
+ </pay4later_index_index>
10
+ <pay4later_api_accept>
11
+ <reference name="root">
12
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
13
+ </reference>
14
+ <reference name="content">
15
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/accept.phtml" />
16
+ </reference>
17
+ </pay4later_api_accept>
18
+ <pay4later_api_decline>
19
+ <reference name="root">
20
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
21
+ </reference>
22
+ <reference name="content">
23
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/decline.phtml" />
24
+ </reference>
25
+ </pay4later_api_decline>
26
+ <pay4later_api_refer>
27
+ <reference name="root">
28
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
29
+ </reference>
30
+ <reference name="content">
31
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/refer.phtml" />
32
+ </reference>
33
+ </pay4later_api_refer>
34
+ <pay4later_index_index>
35
+ <reference name="content">
36
+ <block type="pay4later/pay4later" name="pay4later" template="pay4later/pay4later.phtml" />
37
+ </reference>
38
+ </pay4later_index_index>
39
+ <catalog_product_view>
40
+ <block type="pay4later/pay4later" name="product.info.pay4later" template="pay4later/creditpromo.phtml" />
41
+
42
+ <reference name="product.info.addtocart">
43
+ <action method="append"><block>product.info.pay4later</block></action>
44
+ </reference>
45
+ </catalog_product_view>
46
+ </layout>
app/design/frontend/default/enterprise/template/pay4later/accept.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Your order has been received') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p><strong><?php echo $this->__('Thank you for your purchase!') ?></strong></p>
6
+
7
+ <p>You will shortly receive an email containing details of your order.</p>
8
+
9
+ <div class="buttons-set">
10
+ <button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
11
+ </div>
app/design/frontend/default/enterprise/template/pay4later/creditpromo.phtml ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //003ab
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
3
+ ?>
4
+ 4+oV546WyJly9Ch/rkrgP1YdHylXMGKX4bE4SzU5w6Yg+Qkpur+4vI2kJ3/HaZxUJvQuevBdV4a8
5
+ QE1S6Cuo/X3xSpUaHXLBrF5+kDgGFiG9seVUFGac/GWDTkvvqBXj7FN5hzln0Kcm55iY8ARTufYX
6
+ uk5gzyXc/STrEusR2fXDyRa4bykkwzJj1t+5nOZz2B7ZpBR0/czgUSk8jTLmW4bWZgKcTLWdDBJ5
7
+ 1+DOeu5GasXKqg6I83DVMi4I+Mud6UXhqrhH285td3OQQZCRnwwYvluSK/3erzzTQFzdb7Pf1ZJb
8
+ kWIrcBFlfr9U6bJwUk6Ut/GS+viBZvueBmG+jOefx47jScjI9eTgn8U0ObtVi9kWU8rPJX8pnsLT
9
+ 6UcLiraMwFAEIrGdd4Fmm3kw3WOQQPnPX4Sw4SK9e7o8l1aOeYcRbk/++hKXqlUj8t8eqN3oY9XH
10
+ Ocl1RinLmQ1b+sCesLPp+Q0z/OhtdKe3qwGd/q27andbJ+5nlqpNTazO+x/ts+FGGM9vt8R02VSJ
11
+ hBJoeF9EBrhpWUNDqxORiVVReeslB6lPnuypbwiIKsRkZcmaJLO/9ENGu4c0X90RbaKPdzUkVRKj
12
+ ++/kq3JQBuszrLdDXv9vNkvKBVzWtrVaJwGaoNDFqVTQfUnL9pyBnuMZJJleasehXC6ifX7ej4gA
13
+ jVzMbj5VzOaqeIibYt1nxK8mUYpQDkBkOlP4EflIvzNG35Zp0OzjDRFAKREISpN5xz3U9syBCbRC
14
+ 1p1bYywbi9uKzYUB7ILb6LrN01MYdqHpBhFevWatRPzvJ8ULGg3/+xqMki3RToBBU71ik9U7X0vV
15
+ iW+XWbKqewlTuNopi7b0p0BF+31qBe2Ok/j36fydUHpSAyaU7G8wNJbDhO7hcC+EgUDDTqRheO25
16
+ o55Insqcm7uWXEM6S8AK+cY0Bp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PWZsoYyVi+SVBX855Vx
83
+ p/DjcmcxNY47TD3lIw8lsm49UFuuVmfYz68ll7NJA5w+9ld0DZJC9wIJsOB+DZjfNR1QB5FJznlF
84
+ rhWSDD8cLdbJZQzSfL8IHEZqkhXJnXxd/veEx/8DooK9kBUjnbaEWt2RmC76HCbi+aJmXtGQikRI
85
+ 7V5fiLLgtY9qskjTMraXSsjVVQEMYU8Xlx4g1icxYOQTDCv5e1Mq3B7b8qeCU5RccMWENs2qN6mo
86
+ knZTNZ8gWtt6dFIKWemT0QLHO1/TMae5rH61c4uCRY3n5F6XTEMAurFc457T1IfKr8sFZdco8RbS
87
+ Y0KsYTclSOn0+1pbUWq5jRMsbzvl5jWrsOVOFVsXc3W6eZVZVVzu
app/design/frontend/default/enterprise/template/pay4later/decline.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Finance Application Declined') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p>Your application for finance was unsuccessful. Please restart the checkout process and select an alternative payment method to complete your order.</p>
app/design/frontend/default/enterprise/template/pay4later/expressbutton/link.phtml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $shortcutHtmlId = $this->getShortcutHtmlId() ?>
2
+ <a id="<?php echo $shortcutHtmlId ?>" href="<?php echo $this->getCheckoutUrl()?>">
3
+ <img src="<?php echo Mage::getDesign()->getSkinUrl('images/p4lcheckout.gif'); ?>" alt="<?php echo Mage::helper('pay4later')->__('Apply for Finance');?>" />
4
+ </a>
5
+ <?php if ($this->getConfirmationUrl() || $this->getIsInCatalogProduct()): ?>
6
+ <?php if ($this->getIsInCatalogProduct()): ?>
7
+ <input type="hidden" id="pp_checkout_url" name="return_url" value="" />
8
+ <?php endif; ?>
9
+ <script type="text/javascript">
10
+ //<![CDATA[
11
+ Event.observe('<?php echo $shortcutHtmlId ?>', 'click', function(event) {
12
+ if (confirm('<?php echo Mage::helper('core')->jsQuoteEscape("This will take you to an application form where you can apply for finance on this product. Continue?")?>')) {
13
+ this.href = '<?php echo $this->getConfirmationUrl() ?>';
14
+ }
15
+ <?php if ($this->getIsInCatalogProduct()): ?>
16
+ $('pp_checkout_url').value = this.href;
17
+ productAddToCartForm.submit();
18
+ event.stop();
19
+ <?php endif; ?>
20
+ });
21
+ //]]>
22
+ </script>
23
+ <?php endif; ?>
app/design/frontend/default/enterprise/template/pay4later/paymentform.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_code=$this->getMethodCode() ?>
2
+ <script type="text/javascript" src="<?php echo $this->getUrl('pay4later/index/checkoutjsapi/'); ?>"></script>
3
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
4
+
5
+ <?php
6
+
7
+ /* At this point, we need to run through the items in the customers cart and work out which finance options are available.
8
+ By this point, we know that -some- finance options are available on some products; if not all products are eligable we will only be here
9
+ if deposit inflation is allowed, so we need to then check the config to see if we're allowed to display a select box for finance products
10
+ (or should we use ranking?)
11
+ */
12
+ ?>
13
+ <li>
14
+ <center><img src="<?php echo $this->getSkinUrl('images/p4lcheckoutlogo.gif'); ?>" /></center>
15
+ </li>
16
+
17
+ <li id="p4l_financequote" style="position: absolute; padding-top:15px; right: 30px; width: 270px; height: 200px; float:right;">
18
+ <ul class="checkoutSteps">
19
+ <li class="section">
20
+ <div class="step-title">
21
+ <span style="float:left;color:#000000;font-weight:bold;">Deposit to pay today</span>
22
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_depositpayable"></span></span>
23
+ <span style="color:#999999;float:left;clear:both;display:none;" id="depositInflator"><small><i>incl. items ineligible for finance @ &pound;<span id="depositInflation"></span></i></small></span>
24
+ </div>
25
+ <div class="step-title">
26
+ <span style="float:left;color:#000000;font-weight:bold;">plus <span id="p4l_monthcount"></span> Monthly Repayments of</span>
27
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_monthlies"></span></span>
28
+ </div>
29
+ <div class="step-title">
30
+ <span style="float:left;color:#000000;font-weight:bold;">Total Payable including interest</span>
31
+ <span style="float:right;color:#000000;">&pound;<span id="p4l_totalpayable"><?php echo Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(); ?></span><input type="hidden" name="p4l_ordertotal" id="p4l_ordertotal" value ="<?php echo Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(); ?>" /></span>
32
+ </div>
33
+ </li>
34
+ </ul>
35
+ </li>
36
+
37
+ <li id="p4l_hasmultiplefinanceoptions" style="">
38
+ <label for="<?php echo $_code ?>_financeproduct" class="required"><em>*</em><?php echo $this->__('Please select a Finance option:') ?></label>
39
+ <div class="input-box">
40
+ <select id="p4l_financeproduct" name="payment[pay4later_productid]" class="required-entry" onchange="updateFinanceOptionSelection();">
41
+ </select>
42
+ </div>
43
+ </li>
44
+
45
+ <li id="p4l_hasonefinanceoption" style="">
46
+ <br />
47
+ <label for="<?php echo $_code ?>_financeproduct"><?php echo $this->__('Finance type:') ?></label>
48
+ <div class="input-box">Interest Free Credit (0% APR)<input type="hidden" id="onlyone" name="onlyone" /></div>
49
+ </li>
50
+
51
+ <li id="p4l_hasdepositoptions" style="">
52
+ <label for="<?php echo $_code ?>_depositamount" class="required"><em>*</em><?php echo $this->__('Amount to pay as deposit:') ?></label>
53
+ <div style="clear:both;margin-top:20px;margin-bottom:20px;">
54
+ <div id="deposittrack" style="width:300px; background:url(<?php echo $this->getSkinUrl('images/p4ldepositslidebg.gif'); ?>); padding-top:2px; height:38px;">
55
+ <div id="deposithandle" style="width: 40px; height: 40px; background-image: url(<?php echo $this->getSkinUrl('images/p4ldepositslidegripper.png'); ?>); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; cursor: move; position: relative; left: 20px; " class="selected">
56
+ <p id="depositdisplay" style="padding-left:9px;padding-top:11px;font-weight:bold;">%</p>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ </li>
62
+
63
+ <li id="p4l_hasfixeddeposit" style="">
64
+ <label for="<?php echo $_code ?>_financeproduct"><?php echo $this->__('Deposit Amount:') ?></label>
65
+ <div class="input-box"><span id="p4l_onedepositpcent">10</span>% of total order value</div>
66
+ </li>
67
+
68
+ <li id="p4l_redirectinformation" style="">
69
+ <input type="hidden" name="payment[p4l_calcElements_term]" id="p4l_calcElements_term" />
70
+ <input type="hidden" name="payment[pay4later_productname]" id="p4l_calcElements_productname" />
71
+ <input type="hidden" name="payment[pay4later_depositpercent]" id="p4l_calcElements_deposit" />
72
+ You will be redirected to Pay4Later to complete this finance application when you place your order
73
+ </li>
74
+
75
+ </ul>
app/design/frontend/default/enterprise/template/pay4later/paymentinfo.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <p><b><?php echo $this->getMethod()->getTitle() ?>:</b></p>
2
+
3
+ <?php echo $this->getInfo()->getPay4laterProductname(); ?><br /><br />
4
+
5
+ <b>Deposit to pay today:</b><br />
6
+
7
+ <?php echo Mage::helper('core')->formatCurrency((Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal() / 100 * $this->getInfo()->getPay4laterDepositpercent())); ?>
app/design/frontend/default/enterprise/template/pay4later/refer.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="page-title">
2
+ <h1><?php echo $this->__('Finance Application Referred') ?></h1>
3
+ </div>
4
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
5
+ <p>Thank you, we have received your order. At present, Pay4Later Retail Finance are reviewing your finance application and therefore we cannot currently finish processing your order. Please rest assured however that if and when your application for finance is approved we will finish processing your order immediately and send you an email confirming this.</p>
app/etc/modules/Camiloo_Pay4later.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Camiloo_Pay4later>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Camiloo_Pay4later>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Camiloo_Pay4later</name>
4
+ <version>1.0.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.camiloo.co.uk/license.txt">Camiloo EULA</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Pay4Later Integration for Magento brings Retail Finance to UK Magento stores for the first time.</summary>
10
+ <description>With this module and a Pay4Later account (see www.pay4later.com) you can offer finance to your customers during the checkout process.
11
+
12
+ The finance options offered are fully configurable on a per product basis, and customers can select the amount to pay as a deposit using an intuitive sliding ball control.
13
+
14
+ During finance applications an orders status within Magento updates showing you clearly which stage of the application process customers are up to.</description>
15
+ <notes>First release</notes>
16
+ <authors><author><name>Camiloo Limited</name><user>auto-converted</user><email>hello@camiloo.co.uk</email></author></authors>
17
+ <date>2011-01-13</date>
18
+ <time>22:21:20</time>
19
+ <contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="p4ladmin.gif" hash="efaaa666eeb19e96861acd97074c5e86"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="base"><dir name="css"><file name="pay4later.css" hash="1c2ae700774643ccd9c30339a0109a84"/></dir><dir name="images"><file name="p4lcheckout.gif" hash="011218b4a465c365c26dc228af03e60f"/><file name="p4lcheckoutlogo.gif" hash="24ddd8b9263dce4caf2e152024fbb2fd"/><file name="p4ldeposithandle.gif" hash="d468eed098244e4d160d0bd91b4d94bb"/><file name="p4ldepositslidebg.gif" hash="4b8377f5c552358c7eecfe5e9cd1a877"/><file name="p4ldepositslidegripper.png" hash="85248baaa729ad28231824b062e4843f"/><file name="p4ldepositslideoverlay.png" hash="83360950c6aebc118ba83383f013dd36"/></dir></dir><dir name="blank"><dir name="css"><file name="pay4later.css" hash="1c2ae700774643ccd9c30339a0109a84"/></dir><dir name="images"><file name="p4lcheckout.gif" hash="011218b4a465c365c26dc228af03e60f"/><file name="p4lcheckoutlogo.gif" hash="24ddd8b9263dce4caf2e152024fbb2fd"/><file name="p4ldeposithandle.gif" hash="d468eed098244e4d160d0bd91b4d94bb"/><file name="p4ldepositslidebg.gif" hash="4b8377f5c552358c7eecfe5e9cd1a877"/><file name="p4ldepositslidegripper.png" hash="85248baaa729ad28231824b062e4843f"/><file name="p4ldepositslideoverlay.png" hash="83360950c6aebc118ba83383f013dd36"/></dir></dir><dir name="default"><dir name="css"><file name="pay4later.css" hash="1c2ae700774643ccd9c30339a0109a84"/></dir><dir name="images"><file name="p4lcheckout.gif" hash="011218b4a465c365c26dc228af03e60f"/><file name="p4lcheckoutlogo.gif" hash="24ddd8b9263dce4caf2e152024fbb2fd"/><file name="p4ldeposithandle.gif" hash="d468eed098244e4d160d0bd91b4d94bb"/><file name="p4ldepositslidebg.gif" hash="4b8377f5c552358c7eecfe5e9cd1a877"/><file name="p4ldepositslidegripper.png" hash="85248baaa729ad28231824b062e4843f"/><file name="p4ldepositslideoverlay.png" hash="83360950c6aebc118ba83383f013dd36"/></dir></dir><dir name="enterprise"><dir name="css"><file name="pay4later.css" hash="1c2ae700774643ccd9c30339a0109a84"/></dir><dir name="images"><file name="p4lcheckout.gif" hash="011218b4a465c365c26dc228af03e60f"/><file name="p4lcheckoutlogo.gif" hash="24ddd8b9263dce4caf2e152024fbb2fd"/><file name="p4ldeposithandle.gif" hash="d468eed098244e4d160d0bd91b4d94bb"/><file name="p4ldepositslidebg.gif" hash="4b8377f5c552358c7eecfe5e9cd1a877"/><file name="p4ldepositslidegripper.png" hash="85248baaa729ad28231824b062e4843f"/><file name="p4ldepositslideoverlay.png" hash="83360950c6aebc118ba83383f013dd36"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="pay4later"><dir name="bulk"><file name="download.phtml" hash="cc74fcf2dd6ab56bc98ce293b2f0ace2"/><file name="help.phtml" hash="407ace70ef4c4b5e7cfba1373a5d1e36"/><file name="upload.phtml" hash="ead761e2f203b3cd3b3c1abeb4074c53"/></dir><dir name="licensing"><file name="current.phtml" hash="2c2e46021a4260f3f9ffe75e60b3b4d3"/><file name="store.phtml" hash="de109e0166098dc11b380d996f1be8b2"/></dir><dir name="logging"><file name="ticketcreate.phtml" hash="309043822228060faf11b5654608da0c"/></dir><dir name="shippingbulk"><file name="download.phtml" hash="18b3761829ed0fc0d19db2ba045afdd2"/><file name="help.phtml" hash="7d5ad9c77578fd2c56b258db5172ef99"/><file name="upload.phtml" hash="800ff97f9a364bbc08959ff398c055fd"/></dir><file name="configheader.phtml" hash="68bd0a4de836b5fb0a511ca897a1e263"/><file name="kbase.phtml" hash="e5c61b20551e938bf7dce6e5f6303dba"/><file name="paymentinfo.phtml" hash="25f7c43c5255ab2fa92c9a8ee63fb508"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="base"><dir name="layout"><file name="pay4later.xml" hash="39b11e0a8806c4591288478f3d2184ba"/></dir><dir name="template"><dir name="pay4later"><dir name="expressbutton"><file name="link.phtml" hash="14f59877626551a63442d519e6a8ef35"/></dir><file name="accept.phtml" hash="c9569eff303fe3d9deb598f85f109b04"/><file name="creditpromo.phtml" hash="bf7c7dac9f6ade96412482301fa5b71e"/><file name="decline.phtml" hash="f516a5eb79407b74e13c0fb8b72ae4f8"/><file name="paymentform.phtml" hash="74aae219d5ea3e33caeac4ba52e954c6"/><file name="paymentinfo.phtml" hash="a84e24b9f2b69a7b51bfb311aff0096f"/><file name="refer.phtml" hash="2fa82ec3204a500e0db380acdb51cf09"/></dir></dir></dir><dir name="blank"><dir name="layout"><file name="pay4later.xml" hash="39b11e0a8806c4591288478f3d2184ba"/></dir><dir name="template"><dir name="pay4later"><dir name="expressbutton"><file name="link.phtml" hash="14f59877626551a63442d519e6a8ef35"/></dir><file name="accept.phtml" hash="c9569eff303fe3d9deb598f85f109b04"/><file name="creditpromo.phtml" hash="01e05b0a7ddc3af70ccdc343b2926897"/><file name="decline.phtml" hash="f516a5eb79407b74e13c0fb8b72ae4f8"/><file name="paymentform.phtml" hash="74aae219d5ea3e33caeac4ba52e954c6"/><file name="paymentinfo.phtml" hash="a84e24b9f2b69a7b51bfb311aff0096f"/><file name="refer.phtml" hash="2fa82ec3204a500e0db380acdb51cf09"/></dir></dir></dir><dir name="default"><dir name="layout"><file name="pay4later.xml" hash="39b11e0a8806c4591288478f3d2184ba"/></dir><dir name="template"><dir name="pay4later"><dir name="expressbutton"><file name="link.phtml" hash="14f59877626551a63442d519e6a8ef35"/></dir><file name="accept.phtml" hash="c9569eff303fe3d9deb598f85f109b04"/><file name="creditpromo.phtml" hash="9dd64f4267029102876c28a52e03cc62"/><file name="decline.phtml" hash="f516a5eb79407b74e13c0fb8b72ae4f8"/><file name="paymentform.phtml" hash="74aae219d5ea3e33caeac4ba52e954c6"/><file name="paymentinfo.phtml" hash="a84e24b9f2b69a7b51bfb311aff0096f"/><file name="refer.phtml" hash="2fa82ec3204a500e0db380acdb51cf09"/></dir></dir></dir><dir name="enterprise"><dir name="layout"><file name="pay4later.xml" hash="39b11e0a8806c4591288478f3d2184ba"/></dir><dir name="template"><dir name="pay4later"><dir name="expressbutton"><file name="link.phtml" hash="14f59877626551a63442d519e6a8ef35"/></dir><file name="accept.phtml" hash="c9569eff303fe3d9deb598f85f109b04"/><file name="creditpromo.phtml" hash="807c82d521bf45b9db170e1f9f800a4a"/><file name="decline.phtml" hash="f516a5eb79407b74e13c0fb8b72ae4f8"/><file name="paymentform.phtml" hash="74aae219d5ea3e33caeac4ba52e954c6"/><file name="paymentinfo.phtml" hash="a84e24b9f2b69a7b51bfb311aff0096f"/><file name="refer.phtml" hash="2fa82ec3204a500e0db380acdb51cf09"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Camiloo"><dir name="Pay4later"><dir name="Block"><dir name="Adminhtml"><dir name="Kbase"><file name="Kbase.php" hash="600761e23b57e03fd33312b25e6bf6e5"/></dir><dir name="Licensing"><dir name="Edit"><dir name="Tab"><file name="Current.php" hash="a5499d71ed9ba9398ef8a6ae1a9379f3"/><file name="Store.php" hash="3b85a0f20adf23609ae534a75a27e97b"/></dir><file name="Form.php" hash="2ff4516e06c07a731813b773da0381bf"/><file name="Tabs.php" hash="f5c2b5cfd09027bced1f12aa8a998b7a"/></dir><dir name="Tab"><file name="Current.php" hash="73d18eae225a5cc91dfd271c1cde1c72"/><file name="Store.php" hash="82912392f7144dc5ba3f358ec5af8643"/></dir><file name="Edit.php" hash="262ce66fde64e47c8e6f6e4cd2b1bb03"/><file name="Form.php" hash="f94b85f2eb1b91d043f1585f81e0b609"/><file name="Tabs.php" hash="8f86ce8ba4110fe7df45a8dcf5025256"/></dir><dir name="Logging"><dir name="Edit"><dir name="Tab"><dir name="_notes"><file name="dwsync.xml" hash="3aef37d8c6ed474c433a0cc91dc9dd49"/></dir><file name="Ticketcreate.php" hash="a37af0c35702112016fa0b8a041fc393"/></dir><dir name="_notes"><file name="dwsync.xml" hash="ca7bdb019376ce4074da2a6b9d4b67fd"/></dir><file name="Form.php" hash="03bf35bff2c2d737dc688caf7abb76c4"/><file name="Tabs.php" hash="4763ff2c852ee29f61a2c51ba95449f2"/></dir><file name="Edit.php" hash="5ee0892ad593393a8ccf1668bfc616d4"/><file name="Grid.php" hash="5063f53b04a8da2ed35e80f7e58dfb51"/></dir><dir name="Manual"><dir name="Edit"><dir name="Tab"><file name="Topic.php" hash="2f152fe3c9a2a7da22237b04a483ccf6"/></dir><file name="Form.php" hash="118cf7699b6d8cece88da95cec72da6d"/><file name="Tabs.php" hash="f5f7b182ea63c2df099ceec169be1925"/></dir><dir name="Versioncheck"><dir name="Edit"><file name="Form.php" hash="a868e2d2b4ede5f562f0577b11e55eea"/><file name="Tabs.php" hash="a6557cbe917aa03c7c65538280c4d8c2"/></dir><file name="Edit.php" hash="9a68618c2161d0a0d235d231652d4097"/></dir><file name="Edit.php" hash="1421ff388f011ce8a95ec369ec07aa19"/></dir><dir name="Pay4later"><dir name="Edit"><dir name="Tab"><file name="Download.php" hash="31c6c245e96bcc9019c9394875e21778"/><file name="Help.php" hash="53cdabcebf10ada85b4b46b391ae832e"/><file name="Upload.php" hash="486364415b3ac80aaa3ba2bb6b70adc5"/></dir><file name="Form.php" hash="840ec9ee195fc25ce10b14039e24a007"/><file name="Tabs.php" hash="26409268a5b15579a6df730233c53268"/></dir><file name="Edit.php" hash="bc15de7c184c3f910f7e772002f3eb5b"/></dir><dir name="Shipping"><dir name="Edit"><dir name="Tab"><file name="Download.php" hash="656d1043e450c7aa63434b7995c74fcb"/><file name="Help.php" hash="aa68ccbc7e80198bc601c2e32073b48c"/><file name="Upload.php" hash="e73212ab0add8e153a1275f4d94419a0"/></dir><file name="Form.php" hash="125834968592d6c26ff96422acf89fd9"/><file name="Tabs.php" hash="2c92e62d2ed1fefe2a1e7423fa84e0e1"/></dir><file name="Edit.php" hash="c9b7112e0931113a5484812f9fe36894"/></dir><file name="Configheader.php" hash="43e180b21c928c1f8f9f6f99c1888892"/><file name="Licensing.php" hash="89fc3d54c6d1e1352fee8b9db5b5cfcc"/><file name="Logging.php" hash="8f1003a21b65ee41002ded400b584d10"/><file name="Pay4later.php" hash="dc3cc6215826406802b62e558a25f491"/></dir><file name="P4lpaymentform.php" hash="5dc3c4a1585c1302739d3467e1094c1f"/><file name="P4lpaymentinfo.php" hash="714b229976f52fdbd0faf16a4ea012be"/><file name="Pay4later.php" hash="f1155b32af453c71b1d51196e3b428ac"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="LicensingController.php" hash="656d9c9ffc8b45895146e1e4da46001c"/><file name="LoggingController.php" hash="4e95ea3f66e10c1964d5bf2391a03b83"/><file name="ManualController.php" hash="4c56e5a57ef489887db82fa317d877eb"/><file name="Pay4laterController.php" hash="30475dded9a4b70d02f6e6c71e95a075"/><file name="Pay4latershippingController.php" hash="76084502f4703c1858c9b97ce13eff66"/></dir><file name="ApiController.php" hash="5347ec17954fa014632dcb6f4749a9dd"/><file name="IndexController.php" hash="ecf9731d976ee2554beed96f92e602da"/></dir><dir name="etc"><file name="config.xml" hash="74a16743646e6adbaf474e971b13707a"/><file name="system.xml" hash="699addf33dc33e1d084714f48f0000ac"/></dir><dir name="Helper"><file name="Data.php" hash="ac696099015be944ca8cacc2a0af92eb"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Expresscheckout"><file name="Collection.php" hash="0e6b6118d0cf589055b0e26bf4e077db"/></dir><dir name="Pay4later"><file name="Collection.php" hash="2e9aa17a35f57250b35f8f9f6af343dd"/></dir><dir name="Pay4laterlog"><file name="Collection.php" hash="42490eb132641863609fdbb04c37ee4f"/></dir><file name="Expresscheckout.php" hash="53a61aea6cee5ad865b3bc3afc9a9b4a"/><file name="Pay4later.php" hash="7ea2bab536822df097f2444e02f57794"/><file name="Pay4laterlog.php" hash="0f99b15ce063751678eda47df907c39e"/><file name="Setup.php" hash="26897e26406c2483876bac644a448a0c"/></dir><file name="Expresscheckout.php" hash="615dac9fc85a6b30a0cc2401894acd81"/><file name="Financeoptions.php" hash="87c9d0e60ecd9bb9acf502798a93d16f"/><file name="Observer.php" hash="5c14c6139fadd4fd839b4c47c1ccf40d"/><file name="P4lpayment.php" hash="d0b4de7e8e106e94364065ddd649a7f5"/><file name="P4lpaymentinfo.php" hash="0560dad7fadcd3e82731858efa5d3c2f"/><file name="Pay4later.php" hash="a51043c14aa30c87f75f04d98a9e5c67"/><file name="Pay4laterlink.php" hash="0c93c06212daebd8b02399685a1b9ffe"/><file name="Pay4laterlog.php" hash="a85f2a48c2c5333bd4b055d6a9fe4355"/><file name="Status.php" hash="d3a1f1687b6a7786c5905d92fa48eb16"/></dir><dir name="sql"><dir name="pay4later_setup"><file name="mysql4-install-0.2.1.php" hash="cdca69690eaf376aeee869e1cfa2ae1b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Camiloo_Pay4later.xml" hash="0d65a74c23aad959f234bdb67d66a3cc"/></dir></target></contents>
20
+ <compatible/>
21
+ <dependencies/>
22
+ </package>
skin/adminhtml/default/default/images/p4ladmin.gif ADDED
Binary file
skin/frontend/default/base/css/pay4later.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .pay4later-logo {
2
+ clear:left; margin:0; padding:10px 0 0; text-align:right;
3
+ }
skin/frontend/default/base/images/p4lcheckout.gif ADDED
Binary file
skin/frontend/default/base/images/p4lcheckoutlogo.gif ADDED
Binary file
skin/frontend/default/base/images/p4ldeposithandle.gif ADDED
Binary file
skin/frontend/default/base/images/p4ldepositslidebg.gif ADDED
Binary file
skin/frontend/default/base/images/p4ldepositslidegripper.png ADDED
Binary file
skin/frontend/default/base/images/p4ldepositslideoverlay.png ADDED
Binary file
skin/frontend/default/blank/css/pay4later.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .pay4later-logo {
2
+ clear:left; margin:0; padding:10px 0 0; text-align:right;
3
+ }
skin/frontend/default/blank/images/p4lcheckout.gif ADDED
Binary file
skin/frontend/default/blank/images/p4lcheckoutlogo.gif ADDED
Binary file
skin/frontend/default/blank/images/p4ldeposithandle.gif ADDED
Binary file
skin/frontend/default/blank/images/p4ldepositslidebg.gif ADDED
Binary file
skin/frontend/default/blank/images/p4ldepositslidegripper.png ADDED
Binary file
skin/frontend/default/blank/images/p4ldepositslideoverlay.png ADDED
Binary file
skin/frontend/default/default/css/pay4later.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .pay4later-logo {
2
+ clear:left; margin:0; padding:10px 0 0; text-align:right;
3
+ }
skin/frontend/default/default/images/p4lcheckout.gif ADDED
Binary file
skin/frontend/default/default/images/p4lcheckoutlogo.gif ADDED
Binary file
skin/frontend/default/default/images/p4ldeposithandle.gif ADDED
Binary file
skin/frontend/default/default/images/p4ldepositslidebg.gif ADDED
Binary file
skin/frontend/default/default/images/p4ldepositslidegripper.png ADDED
Binary file
skin/frontend/default/default/images/p4ldepositslideoverlay.png ADDED
Binary file
skin/frontend/default/enterprise/css/pay4later.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .pay4later-logo {
2
+ clear:left; margin:0; padding:10px 0 0; text-align:right;
3
+ }
skin/frontend/default/enterprise/images/p4lcheckout.gif ADDED
Binary file
skin/frontend/default/enterprise/images/p4lcheckoutlogo.gif ADDED
Binary file
skin/frontend/default/enterprise/images/p4ldeposithandle.gif ADDED
Binary file
skin/frontend/default/enterprise/images/p4ldepositslidebg.gif ADDED
Binary file
skin/frontend/default/enterprise/images/p4ldepositslidegripper.png ADDED
Binary file
skin/frontend/default/enterprise/images/p4ldepositslideoverlay.png ADDED
Binary file