Ced_LayBuy - Version 2.1.6

Version Notes

1. New secure communication protocal,
.

Download this release

Release Info

Developer Warrin
Extension Ced_LayBuy
Version 2.1.6
Comparing to
See all releases


Code changes from version 2.1.5 to 2.1.6

Files changed (29) hide show
  1. app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Details.php +4 -3
  2. app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Edit.php +16 -6
  3. app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Edit/Form.php +23 -4
  4. app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Grid.php +1 -154
  5. app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Renderer/Order.php +1 -45
  6. app/code/local/Ced/LayBuy/Block/Standard/Redirect.php +23 -33
  7. app/code/local/Ced/LayBuy/Helper/Config.php +1 -103
  8. app/code/local/Ced/LayBuy/Helper/Data.php +78 -18
  9. app/code/local/Ced/LayBuy/Model/Observer.php +11 -4
  10. app/code/local/Ced/LayBuy/Model/Report.php +2 -3
  11. app/code/local/Ced/LayBuy/Model/Standard.php +22 -18
  12. app/code/local/Ced/LayBuy/Model/System/Config/Backend/Cron.php +2 -2
  13. app/code/local/Ced/LayBuy/Model/System/Config/Source/Allowspecificcategory.php +37 -0
  14. app/code/local/Ced/LayBuy/Model/System/Config/Source/Allowspecificgroup.php +37 -0
  15. app/code/local/Ced/LayBuy/controllers/Adminhtml/ReportController.php +33 -3
  16. app/code/local/Ced/LayBuy/controllers/ReportController.php +41 -5
  17. app/code/local/Ced/LayBuy/controllers/ReviseController.php +1 -1
  18. app/code/local/Ced/LayBuy/controllers/StandardController.php +3 -4
  19. app/code/local/Ced/LayBuy/etc/config.xml +21 -3
  20. app/code/local/Ced/LayBuy/etc/system.xml +55 -25
  21. app/code/local/Ced/LayBuy/sql/laybuy_setup/mysql4-upgrade-0.9.0-1.0.0.php +19 -0
  22. app/design/adminhtml/default/default/layout/laybuy.xml +2 -2
  23. app/design/adminhtml/default/default/template/laybuy/notification.phtml +4 -4
  24. app/design/frontend/base/default/layout/laybuy.xml +7 -5
  25. app/design/frontend/base/default/template/laybuy/checkout/onepage/review/button.phtml +8 -9
  26. app/design/frontend/base/default/template/laybuy/form/extra.phtml +9 -6
  27. app/design/frontend/base/default/template/laybuy/form/laybuy.phtml +8 -2
  28. app/design/frontend/base/default/template/laybuy/info/default.phtml +4 -4
  29. package.xml +6 -17
app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Details.php CHANGED
@@ -57,15 +57,16 @@ class Ced_LayBuy_Block_Adminhtml_Report_Details extends Mage_Adminhtml_Block_Wid
57
 
58
  'class' => 'delete',
59
  ));
60
-
 
61
  $this->_addButton('edit', array(
62
 
63
- 'label' => Mage::helper('laybuy')->__('Revise Instalment Plan'),
64
 
65
  'onclick' => "setLocation('{$this->getUrl('*/*/edit',array('_secure' => true,'id'=>$this->getRequest()->getParam('id')))}')",
66
 
67
  'class' => 'add',
68
- ));
69
  }
70
  }
71
 
57
 
58
  'class' => 'delete',
59
  ));
60
+ }
61
+ if(in_array($model->getStatus(),array(-2,0))) {
62
  $this->_addButton('edit', array(
63
 
64
+ 'label' => Mage::helper('laybuy')->__('Revise Instalment Plan'),
65
 
66
  'onclick' => "setLocation('{$this->getUrl('*/*/edit',array('_secure' => true,'id'=>$this->getRequest()->getParam('id')))}')",
67
 
68
  'class' => 'add',
69
+ ));
70
  }
71
  }
72
 
app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Edit.php CHANGED
@@ -56,14 +56,24 @@ class Ced_LayBuy_Block_Adminhtml_Report_Edit extends Mage_Adminhtml_Block_Widget
56
 
57
  'class' => 'back',
58
  ));
 
 
 
 
 
 
 
 
 
 
59
  $this->_addButton('save', array(
60
-
61
- 'label' => Mage::helper('laybuy')->__('Save and Send Email to Buyer'),
62
-
63
- 'onclick' => "editForm.submit()",
64
 
65
- 'class' => 'save',
66
- ));
 
 
 
 
67
  }
68
 
69
  /**
56
 
57
  'class' => 'back',
58
  ));
59
+ $buttonLabel = Mage::helper('laybuy')->__('Save and Send Email to Buyer');
60
+ if($model->getStatus() == -2) {
61
+ $revised = Mage::getModel('laybuy/revise')->getCollection()
62
+ ->addFieldToFilter('transaction_id',array('eq'=>$model->getId()))
63
+ ->addFieldToFilter('type',array('eq'=>'new'))->getLastItem()->load();
64
+ if($revised && $revised->getId()){
65
+ $model = $revised;
66
+ $buttonLabel = Mage::helper('laybuy')->__('Resend Email to Buyer');
67
+ }
68
+ }
69
  $this->_addButton('save', array(
 
 
 
 
70
 
71
+ 'label' => $buttonLabel,
72
+
73
+ 'onclick' => "editForm.submit()",
74
+
75
+ 'class' => 'save',
76
+ ));
77
  }
78
 
79
  /**
app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Edit/Form.php CHANGED
@@ -42,6 +42,18 @@ class Ced_LayBuy_Block_Adminhtml_Report_Edit_Form extends Mage_Adminhtml_Block_W
42
  {
43
  $calcUrl = $this->getUrl('*/*/docalc',array('_secure' => true)); /*'http://lay-buys.com/gateway/docalc.php'*/;
44
  $model = Mage::registry('current_laybuy_transaction_edit');
 
 
 
 
 
 
 
 
 
 
 
 
45
  /* print_r($model->getData());die; */
46
  /* @var $model Mage_Paypal_Model_Report_Settlement_Row */
47
  $settlement = Mage::getSingleton('laybuy/report');
@@ -49,7 +61,7 @@ class Ced_LayBuy_Block_Adminhtml_Report_Edit_Form extends Mage_Adminhtml_Block_W
49
  $order_id = $model->getData('order_id');
50
  $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
51
  $storeId = $order->getStoreId();
52
- $newAmount = $model->getData('amount') - ($model->getData('downpayment_amount') + (((int)$model->getTransaction() - 2) * $model->getData('payment_amounts')));
53
  $fieldsets = array(
54
  'reference_fieldset' => array(
55
  'fields' => array(
@@ -58,6 +70,11 @@ class Ced_LayBuy_Block_Adminhtml_Report_Edit_Form extends Mage_Adminhtml_Block_W
58
  'type' => 'hidden',
59
  'value' => Mage::getStoreConfig('payment/laybuy/membership_number',$storeId),
60
  ),
 
 
 
 
 
61
  'paypal_profile_id' => array(
62
  'label' => $settlement->getFieldLabel('paypal_profile_id'),
63
  'type' => 'text',
@@ -85,7 +102,7 @@ class Ced_LayBuy_Block_Adminhtml_Report_Edit_Form extends Mage_Adminhtml_Block_W
85
  'fields' => array(
86
  'amount' => array(
87
  'label' => $settlement->getFieldLabel('total_amount'),
88
- 'value' => number_format($newAmount,2,'.',','),
89
  'type' => 'hidden',
90
  ),
91
  'pending_amount' => array(
@@ -100,13 +117,14 @@ class Ced_LayBuy_Block_Adminhtml_Report_Edit_Form extends Mage_Adminhtml_Block_W
100
  'value' => 1,
101
  'type' => 'radio',
102
  'onclick'=> 'methodChange(1)',
103
- 'checked' => 'checked',
104
  'after_element_html' => '<label for="lay-buy" class="inline">Lay-Buy</label>',
105
  ),
106
  'buy-now' => array(
107
  'label' => $settlement->getFieldLabel(''),
108
  'value' => 0,
109
  'type' => 'radio',
 
110
  'onclick'=> 'methodChange(0)',
111
  'after_element_html' => '<label for="buy-now" class="inline">Buy-Now</label>',
112
  ),
@@ -223,7 +241,7 @@ class Ced_LayBuy_Block_Adminhtml_Report_Edit_Form extends Mage_Adminhtml_Block_W
223
  'legend' => Mage::helper('laybuy')->__("Please Choose Buyer's New Payment Plan"),
224
  ),
225
  );
226
-
227
  $form = new Varien_Data_Form();
228
  $submitUrl = $this->getUrl('*/*/save',array('_secure' => true,'id'=>$this->getRequest()->getParam('id')));
229
  $form->setAction($submitUrl)
@@ -257,6 +275,7 @@ class Ced_LayBuy_Block_Adminhtml_Report_Edit_Form extends Mage_Adminhtml_Block_W
257
  'value' => isset($info['value']) ? $info['value'] : $model->getData($id),
258
  'after_element_html' => isset($info['after_element_html']) ? $info['after_element_html'] : '',
259
  isset($info['readonly'])?'readonly':'' => isset($info['readonly'])?$info['readonly']:false,
 
260
  isset($info['values'])?'values':'' => isset($info['values'])?$info['values']:'',
261
  isset($info['onchange'])?'onchange':'' => isset($info['onchange'])?$info['onchange']:'',
262
  isset($info['onclick'])?'onclick':'' => isset($info['onclick'])?$info['onclick']:'',
42
  {
43
  $calcUrl = $this->getUrl('*/*/docalc',array('_secure' => true)); /*'http://lay-buys.com/gateway/docalc.php'*/;
44
  $model = Mage::registry('current_laybuy_transaction_edit');
45
+ $newAmount = $model->getData('amount') - ($model->getData('downpayment_amount') + (((int)$model->getTransaction() - 2) * $model->getData('payment_amounts')));
46
+ $isRevised = 0;
47
+ if($model->getStatus() == -2) {
48
+ $revised = Mage::getModel('laybuy/revise')->getCollection()
49
+ ->addFieldToFilter('transaction_id',array('eq'=>$model->getId()))
50
+ ->addFieldToFilter('type',array('eq'=>'new'))->getLastItem()->load();
51
+ if($revised && $revised->getId()) {
52
+ $model = $revised;
53
+ $newAmount = $model->getData('amount');
54
+ $isRevised = $model->getId();
55
+ }
56
+ }
57
  /* print_r($model->getData());die; */
58
  /* @var $model Mage_Paypal_Model_Report_Settlement_Row */
59
  $settlement = Mage::getSingleton('laybuy/report');
61
  $order_id = $model->getData('order_id');
62
  $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
63
  $storeId = $order->getStoreId();
64
+
65
  $fieldsets = array(
66
  'reference_fieldset' => array(
67
  'fields' => array(
70
  'type' => 'hidden',
71
  'value' => Mage::getStoreConfig('payment/laybuy/membership_number',$storeId),
72
  ),
73
+ 'is_revised' => array(
74
+ 'label' => 'Is Revised',
75
+ 'type' => 'hidden',
76
+ 'value' => $isRevised
77
+ ),
78
  'paypal_profile_id' => array(
79
  'label' => $settlement->getFieldLabel('paypal_profile_id'),
80
  'type' => 'text',
102
  'fields' => array(
103
  'amount' => array(
104
  'label' => $settlement->getFieldLabel('total_amount'),
105
+ 'value' => $newAmount,
106
  'type' => 'hidden',
107
  ),
108
  'pending_amount' => array(
117
  'value' => 1,
118
  'type' => 'radio',
119
  'onclick'=> 'methodChange(1)',
120
+ !$isRevised || ($isRevised && $model->getPaymentType())?'checked':'' => !$isRevised || ($isRevised && $model->getPaymentType())?'checked':'',
121
  'after_element_html' => '<label for="lay-buy" class="inline">Lay-Buy</label>',
122
  ),
123
  'buy-now' => array(
124
  'label' => $settlement->getFieldLabel(''),
125
  'value' => 0,
126
  'type' => 'radio',
127
+ ($isRevised && !$model->getPaymentType())?'checked':'' => ($isRevised && !$model->getPaymentType())?'checked':'',
128
  'onclick'=> 'methodChange(0)',
129
  'after_element_html' => '<label for="buy-now" class="inline">Buy-Now</label>',
130
  ),
241
  'legend' => Mage::helper('laybuy')->__("Please Choose Buyer's New Payment Plan"),
242
  ),
243
  );
244
+ //print_r($fieldsets);die;
245
  $form = new Varien_Data_Form();
246
  $submitUrl = $this->getUrl('*/*/save',array('_secure' => true,'id'=>$this->getRequest()->getParam('id')));
247
  $form->setAction($submitUrl)
275
  'value' => isset($info['value']) ? $info['value'] : $model->getData($id),
276
  'after_element_html' => isset($info['after_element_html']) ? $info['after_element_html'] : '',
277
  isset($info['readonly'])?'readonly':'' => isset($info['readonly'])?$info['readonly']:false,
278
+ ($isRevised && !isset($info['readonly']) && $info['type'] != 'hidden')? 'disabled':'' => ($isRevised && !$info['readonly'] && $info['type'] != 'hidden')?true:false,
279
  isset($info['values'])?'values':'' => isset($info['values'])?$info['values']:'',
280
  isset($info['onchange'])?'onchange':'' => isset($info['onchange'])?$info['onchange']:'',
281
  isset($info['onclick'])?'onclick':'' => isset($info['onclick'])?$info['onclick']:'',
app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Grid.php CHANGED
@@ -1,154 +1 @@
1
- <?php
2
- /**
3
- * Lay-Buys
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 Ced
22
- * @package Ced_LayBuy
23
- * @author Asheesh Singh<asheeshsingh@cedcoss.com>
24
- * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
- /**
29
- * Block for LayBuy report grid
30
- */
31
- class Ced_LayBuy_Block_Adminhtml_Report_Grid extends Mage_Adminhtml_Block_Widget_Grid
32
- {
33
- public function __construct()
34
- {
35
-
36
- parent::__construct();
37
- $this->setId('laybuyReportGrid');
38
- $this->setDefaultSort('created_at');
39
- $this->setDefaultDir('DESC');
40
- $this->setSaveParametersInSession(true);
41
- }
42
-
43
- protected function _prepareCollection()
44
- {
45
- $collection = Mage::getModel('laybuy/report')->getCollection();
46
-
47
- $this->setCollection($collection);
48
- return parent::_prepareCollection();
49
- }
50
-
51
- protected function _getStore()
52
- {
53
- $storeId = (int) $this->getRequest()->getParam('store', 0);
54
- return Mage::app()->getStore($storeId);
55
- }
56
-
57
- protected function _prepareColumns()
58
- {
59
- $this->addColumn('created_at', array(
60
- 'header' => Mage::helper('laybuy')->__('Created At'),
61
- 'align' => 'left',
62
- 'filter_index' => 'created_at',
63
- 'index' => 'created_at',
64
- 'type' => 'datetime',
65
- ));
66
-
67
- $this->addColumn('order_id', array(
68
- 'header' => Mage::helper('laybuy')->__('Order#'),
69
- 'align' => 'right',
70
- 'filter_index' => 'order_id',
71
- 'index' => 'order_id',
72
- 'type' => 'number',
73
- 'renderer' => 'Ced_LayBuy_Block_Adminhtml_Report_Renderer_Order',
74
- ));
75
-
76
- $store = $this->_getStore();
77
- $this->addColumn('amount', array(
78
- 'header' => Mage::helper('laybuy')->__('Amount'),
79
- 'align' => 'left',
80
- 'filter_index' => 'amount',
81
- 'index' => 'amount',
82
- 'type' => 'price',
83
- 'currency_code' => $store->getBaseCurrency()->getCode(),
84
- ));
85
-
86
- $this->addColumn('downpayment', array(
87
- 'header' => Mage::helper('laybuy')->__('Down Payment %'),
88
- 'align' => 'right',
89
- 'filter_index' => 'downpayment',
90
- 'index' => 'downpayment',
91
- 'type' => 'range',
92
- ));
93
-
94
- $this->addColumn('months', array(
95
- 'header' => Mage::helper('laybuy')->__('Months'),
96
- 'align' => 'left',
97
- 'filter_index' => 'months',
98
- 'index' => 'months',
99
- 'type' => 'range',
100
- ));
101
-
102
- $this->addColumn('downpayment_amount', array(
103
- 'header' => Mage::helper('laybuy')->__('Down Payment Amount'),
104
- 'align' => 'right',
105
- 'filter_index' => 'downpayment_amount',
106
- 'index' => 'downpayment_amount',
107
- 'type' => 'price',
108
- 'currency_code' => $store->getBaseCurrency()->getCode(),
109
- ));
110
-
111
- $this->addColumn('payment_amounts', array(
112
- 'header' => Mage::helper('laybuy')->__('Payment Amounts'),
113
- 'align' => 'left',
114
- 'filter_index' => 'payment_amounts',
115
- 'index' => 'payment_amounts',
116
- 'type' => 'price',
117
- 'currency_code' => $store->getBaseCurrency()->getCode(),
118
- ));
119
-
120
- $this->addColumn('first_payment_due', array(
121
- 'header' => Mage::helper('laybuy')->__('First Payment Due'),
122
- 'align' => 'right',
123
- 'filter_index' => 'first_payment_due',
124
- 'index' => 'first_payment_due',
125
- 'type' => 'datetime',
126
- ));
127
-
128
- $this->addColumn('last_payment_due', array(
129
- 'header' => Mage::helper('laybuy')->__('Last Payment Due'),
130
- 'align' => 'left',
131
- 'filter_index' => 'last_payment_due',
132
- 'index' => 'last_payment_due',
133
- 'type' => 'datetime',
134
- ));
135
- $this->addColumn('status', array(
136
- 'header' => Mage::helper('laybuy')->__('Status'),
137
- 'align' => 'right',
138
- 'filter_index' => 'status',
139
- 'index' => 'status',
140
- 'type' => 'options',
141
- 'options' => Mage::helper('laybuy')->getStatuses(),
142
- ));
143
-
144
- $this->addExportType('*/*/exportCsv', Mage::helper('laybuy')->__('CSV'));
145
- $this->addExportType('*/*/exportXml', Mage::helper('laybuy')->__('XML'));
146
-
147
- return parent::_prepareColumns();
148
- }
149
-
150
- public function getRowUrl($row)
151
- {
152
- return $this->getUrl('*/*/details', array('_secure' => true,'id' => $row->getId()));
153
- }
154
- }
155
  * Lay-Buys
156
  *
157
  * NOTICE OF LICENSE
158
  *
159
  * This source file is subject to the Open Software License (OSL 3.0)
160
  * that is bundled with this package in the file LICENSE.txt.
161
  * It is also available through the world-wide-web at this URL:
162
  * http://opensource.org/licenses/osl-3.0.php
163
  * If you did not receive a copy of the license and are unable to
164
  * obtain it through the world-wide-web, please send an email
165
  * to license@magentocommerce.com so we can send you a copy immediately.
166
  *
167
  * DISCLAIMER
168
  *
169
  * Do not edit or add to this file if you wish to upgrade Magento to newer
170
  * versions in the future. If you wish to customize Magento for your
171
  * needs please refer to http://www.magentocommerce.com for more information.
172
  *
173
  * @category Ced
174
  * @package Ced_LayBuy
175
  * @author Asheesh Singh<asheeshsingh@cedcoss.com>
176
  * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
177
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
178
  */
179
  * Block for LayBuy report grid
180
  */
181
  {
182
  $storeId = (int) $this->getRequest()->getParam('store', 0);
183
  return Mage::app()->getStore($storeId);
184
  }
185
  public function getRowUrl($row)
186
  {
187
  return $this->getUrl('*/*/details', array('_secure' => true,'id' => $row->getId()));
188
  }
1
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  * Lay-Buys
3
  *
4
  * NOTICE OF LICENSE
5
  *
6
  * This source file is subject to the Open Software License (OSL 3.0)
7
  * that is bundled with this package in the file LICENSE.txt.
8
  * It is also available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  * If you did not receive a copy of the license and are unable to
11
  * obtain it through the world-wide-web, please send an email
12
  * to license@magentocommerce.com so we can send you a copy immediately.
13
  *
14
  * DISCLAIMER
15
  *
16
  * Do not edit or add to this file if you wish to upgrade Magento to newer
17
  * versions in the future. If you wish to customize Magento for your
18
  * needs please refer to http://www.magentocommerce.com for more information.
19
  *
20
  * @category Ced
21
  * @package Ced_LayBuy
22
  * @author Asheesh Singh<asheeshsingh@cedcoss.com>
23
  * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  * Block for LayBuy report grid
27
  */
28
  {
29
  $storeId = (int) $this->getRequest()->getParam('store', 0);
30
  return Mage::app()->getStore($storeId);
31
  }
32
  public function getRowUrl($row)
33
  {
34
  return $this->getUrl('*/*/details', array('_secure' => true,'id' => $row->getId()));
35
  }
app/code/local/Ced/LayBuy/Block/Adminhtml/Report/Renderer/Order.php CHANGED
@@ -1,45 +1 @@
1
- <?php
2
- /**
3
- * Lay-Buys
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 Ced
22
- * @package Ced_LayBuy
23
- * @author Asheesh Singh<asheeshsingh@cedcoss.com>
24
- * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
- /**
29
- * Block for LayBuy report grid renderer
30
- */
31
- class Ced_LayBuy_Block_Adminhtml_Report_Renderer_Order extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
32
- {
33
- public function render(Varien_Object $row)
34
- {
35
- $orderId=$row->getOrderId();
36
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
37
- if($order && $order->getId()){
38
- $orderUrl = Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/view',array('_secure' => true,'order_id'=>$order->getId()));
39
- return '<a title="'.$orderUrl.'" href="'.$orderUrl.'">'.$orderId.'</a>';
40
- }else{
41
- return $orderId;
42
- }
43
-
44
- }
45
- }
46
  * Lay-Buys
47
  *
48
  * NOTICE OF LICENSE
49
  *
50
  * This source file is subject to the Open Software License (OSL 3.0)
51
  * that is bundled with this package in the file LICENSE.txt.
52
  * It is also available through the world-wide-web at this URL:
53
  * http://opensource.org/licenses/osl-3.0.php
54
  * If you did not receive a copy of the license and are unable to
55
  * obtain it through the world-wide-web, please send an email
56
  * to license@magentocommerce.com so we can send you a copy immediately.
57
  *
58
  * DISCLAIMER
59
  *
60
  * Do not edit or add to this file if you wish to upgrade Magento to newer
61
  * versions in the future. If you wish to customize Magento for your
62
  * needs please refer to http://www.magentocommerce.com for more information.
63
  *
64
  * @category Ced
65
  * @package Ced_LayBuy
66
  * @author Asheesh Singh<asheeshsingh@cedcoss.com>
67
  * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
68
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
69
  */
70
  * Block for LayBuy report grid renderer
71
  */
72
  {
73
  $orderId=$row->getOrderId();
74
  }
1
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  * Lay-Buys
3
  *
4
  * NOTICE OF LICENSE
5
  *
6
  * This source file is subject to the Open Software License (OSL 3.0)
7
  * that is bundled with this package in the file LICENSE.txt.
8
  * It is also available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  * If you did not receive a copy of the license and are unable to
11
  * obtain it through the world-wide-web, please send an email
12
  * to license@magentocommerce.com so we can send you a copy immediately.
13
  *
14
  * DISCLAIMER
15
  *
16
  * Do not edit or add to this file if you wish to upgrade Magento to newer
17
  * versions in the future. If you wish to customize Magento for your
18
  * needs please refer to http://www.magentocommerce.com for more information.
19
  *
20
  * @category Ced
21
  * @package Ced_LayBuy
22
  * @author Asheesh Singh<asheeshsingh@cedcoss.com>
23
  * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  * Block for LayBuy report grid renderer
27
  */
28
  {
29
  $orderId=$row->getOrderId();
30
  }
app/code/local/Ced/LayBuy/Block/Standard/Redirect.php CHANGED
@@ -26,42 +26,32 @@
26
  */
27
  class Ced_LayBuy_Block_Standard_Redirect extends Mage_Core_Block_Abstract
28
  {
29
- protected function _toHtml()
30
- {
31
- $dcount = 0;
32
- $helper = Mage::helper('laybuy/config');
33
- $submitUrl = $helper->getSubmitUrl();
34
 
35
- $form = new Varien_Data_Form();
36
- $form->setAction($submitUrl)
37
- ->setId('laybuy_standard_checkout')
38
- ->setName('laybuy_standard_checkout')
39
- ->setMethod('POST')
40
- ->setUseContainer(true);
41
-
42
  $session = Mage::getSingleton('checkout/session');
43
- $data = $helper->extractAndPrepareRequiredValueForFormFields($session);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- foreach ($helper->getStandardCheckoutFormFields($data) as $field=>$value) {
46
- if(is_array($value)){
47
- foreach($value as $description){
48
- $form->addField($field.$dcount, 'hidden', array('name'=>$field, 'value'=>$description));
49
- $dcount++;
50
- }
51
- }else{
52
- $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
53
- }
54
- }
55
- $submitButton = new Varien_Data_Form_Element_Submit(array(
56
- 'value' => $this->__('Click here if you are not redirected within 10 seconds...'),
57
- ));
58
- $submitButton->setId('laybuy_standard_payment');
59
- $form->addElement($submitButton);
60
- $html = '<html><body>';
61
- $html.= $this->__('You will be redirected to the PayPal website in a few seconds.');
62
- $html.= $form->toHtml();
63
- $html.= '<script type="text/javascript">document.getElementById("laybuy_standard_checkout").submit();</script>';
64
- $html.= '</body></html>';
65
 
66
  return $html;
67
  }
26
  */
27
  class Ced_LayBuy_Block_Standard_Redirect extends Mage_Core_Block_Abstract
28
  {
 
 
 
 
 
29
 
30
+ protected function _toHtml()
31
+ {
32
+ $helper = Mage::helper('laybuy');
33
+ $chelper = Mage::helper('laybuy/config');
34
+ $redirectURL = $chelper->getSubmitUrl();
 
 
35
  $session = Mage::getSingleton('checkout/session');
36
+ $data = $chelper->extractAndPrepareRequiredValueForFormFields($session);
37
+
38
+ if ($token = $helper->postToLaybuy($redirectURL,$chelper->getStandardCheckoutFormFields($data))) {
39
+ $session->setLayBuyToken($token);
40
+ $redirectURL .= '?TOKEN='.$token;
41
+ $html = '<html><body>';
42
+ $html.= $this->__('You will be redirected to the PayPal website in a few seconds.');
43
+ $html.= '<br><input type="button" onClick="window.location=\''.$redirectURL.'\' " value="'.$this->__('Click here if you are not redirected within 10 seconds...').'" />';
44
+ $html.= '<script type="text/javascript">setTimeout(\'window.location="'.$redirectURL.'"\',1000);</script>';
45
+ $html.= '</body></html>';
46
+ }else{
47
+ $html = '<html><body>';
48
+ $html.= $this->__('You will be redirected to the PayPal website in a few seconds.');
49
+ $html.= '<br><input type="button" onClick="window.location=window.location;" value="'.$this->__('Click here if you are not redirected within 10 seconds...').'" />';
50
+ $html.= '<script type="text/javascript">setTimeout("window.location=window.location;",1000);</script>';
51
+ $html.= '</body></html>';
52
+ }
53
+
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  return $html;
57
  }
app/code/local/Ced/LayBuy/Helper/Config.php CHANGED
@@ -1,103 +1 @@
1
- <?php
2
- /**
3
- * Lay-Buys
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 Ced
22
- * @package Ced_LayBuy
23
- * @author Asheesh Singh<asheeshsingh@cedcoss.com>
24
- * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
- /**
29
- * LayBuy Config helper
30
- */
31
-
32
- class Ced_LayBuy_Helper_Config extends Mage_Core_Helper_Abstract
33
- {
34
- protected $_storeId = null;
35
- public function getStoreId(){
36
- if(empty($this->_storeId))
37
- $this->_storeId = Mage::app()->getStore()->getId();
38
- return $this->_storeId;
39
- }
40
- /*
41
- * Get the gateway submit url
42
- */
43
- public function getSubmitUrl(){
44
- return Mage::getStoreConfig('payment/laybuy/submit_url',$this->getStoreId());
45
- }
46
- /*
47
- * For form filed At LayBuy gateway
48
- */
49
- public function getStandardCheckoutFormFields($data){
50
- return $data;
51
- }
52
- /*
53
- * For form field At LayBuy gateway
54
- */
55
- public function extractAndPrepareRequiredValueForFormFields($chekoutSession){
56
- $descKey = 'DESC';
57
- $storeId = $this->getStoreId();
58
- $orderId = $chekoutSession->getLastRealOrderId();
59
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
60
- $amount = $order->getData('grand_total');
61
- $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
62
- $email = $order->getData('customer_email');
63
- /* for adding product's description */
64
- if(Mage::getStoreConfig('payment/laybuy/multipledesc',$storeId)){
65
- $_product = Mage::getModel('catalog/product')->load($_product->getProductId());
66
- $description .= ' <br/> ';
67
- }
68
- }else{
69
- $definedDescription = Mage::getStoreConfig('payment/laybuy/desc',$storeId);
70
- }
71
- $data = array(
72
- 'AMOUNT' => number_format($amount, 2, '.', ''),
73
- 'MEMBER' => Mage::getStoreConfig('payment/laybuy/membership_number',$storeId),
74
- 'CURRENCY' => $currency_code,
75
- 'RETURNURL' => Mage::getUrl('laybuy/standard/success',array('_secure'=>true)),
76
- 'CANCELURL' => Mage::getUrl('laybuy/standard/cancel',array('_secure'=>true)),
77
- $descKey => $description,
78
- 'CUSTOM' => $orderId,
79
- 'EMAIL' => $email,
80
- );
81
- $MAXD = Mage::getStoreConfig('payment/laybuy/maxd',$storeId);
82
- $MIND = Mage::getStoreConfig('payment/laybuy/mind',$storeId);
83
- $IMAGE = Mage::getStoreConfig('payment/laybuy/image',$storeId);
84
- if(!$MIND || $MIND<20 || $MIND>50){
85
- $MIND = 20;
86
- }
87
- if(!$MAXD || $MAXD<20 || $MAXD>50){
88
- $MAXD = 50;
89
- }
90
- if($IMAGE){
91
- $IMAGE = Mage::getBaseUrl('media')."laybuy/".$IMAGE;
92
- }else{
93
- $IMAGE = 'http://lay-buys.com/lb2.jpg';
94
- }
95
- if(!$MONTHS || $MONTHS<0){
96
- $MONTHS = 3;
97
- }
98
- $data['MAXD'] = $MAXD;
99
- $data['IMAGE'] = $IMAGE;
100
- $data['MONTHS'] = $MONTHS;
101
- return $data;
102
- }
103
- }
104
  * Lay-Buys
105
  *
106
  * NOTICE OF LICENSE
107
  *
108
  * This source file is subject to the Open Software License (OSL 3.0)
109
  * that is bundled with this package in the file LICENSE.txt.
110
  * It is also available through the world-wide-web at this URL:
111
  * http://opensource.org/licenses/osl-3.0.php
112
  * If you did not receive a copy of the license and are unable to
113
  * obtain it through the world-wide-web, please send an email
114
  * to license@magentocommerce.com so we can send you a copy immediately.
115
  *
116
  * DISCLAIMER
117
  *
118
  * Do not edit or add to this file if you wish to upgrade Magento to newer
119
  * versions in the future. If you wish to customize Magento for your
120
  * needs please refer to http://www.magentocommerce.com for more information.
121
  *
122
  * @category Ced
123
  * @package Ced_LayBuy
124
  * @author Asheesh Singh<asheeshsingh@cedcoss.com>
125
  * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
126
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
127
  */
128
  * LayBuy Config helper
129
  */
130
 
1
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  * Lay-Buys
3
  *
4
  * NOTICE OF LICENSE
5
  *
6
  * This source file is subject to the Open Software License (OSL 3.0)
7
  * that is bundled with this package in the file LICENSE.txt.
8
  * It is also available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
  * If you did not receive a copy of the license and are unable to
11
  * obtain it through the world-wide-web, please send an email
12
  * to license@magentocommerce.com so we can send you a copy immediately.
13
  *
14
  * DISCLAIMER
15
  *
16
  * Do not edit or add to this file if you wish to upgrade Magento to newer
17
  * versions in the future. If you wish to customize Magento for your
18
  * needs please refer to http://www.magentocommerce.com for more information.
19
  *
20
  * @category Ced
21
  * @package Ced_LayBuy
22
  * @author Asheesh Singh<asheeshsingh@cedcoss.com>
23
  * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
  * LayBuy Config helper
27
  */
28
 
app/code/local/Ced/LayBuy/Helper/Data.php CHANGED
@@ -39,7 +39,51 @@ class Ced_LayBuy_Helper_Data extends Mage_Core_Helper_Abstract{
39
  '-2' => $this->__('Revise Requested'),
40
  '2' => $this->__('Revised'),
41
  );
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  public function fetchFromLaybuy($config){
44
  $url = $config['hostname'];
45
  $matchedData = $this->getMatchingData();
@@ -49,17 +93,18 @@ class Ced_LayBuy_Helper_Data extends Mage_Core_Helper_Abstract{
49
  $data .= "mid=".$config['username']."&";
50
  /* $data .= "custom=".$orderIds."&"; */
51
  $data .= "profileIds=".$profileIds;
52
- /* $data .= "&test=1"; */
53
- /* echo $data;die; */
54
  $ch = curl_init();
55
- curl_setopt($ch, CURLOPT_URL,$url);
 
 
56
  curl_setopt($ch, CURLOPT_POST, 1);
57
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
58
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* use this to suppress output */
59
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); /* tell cURL to graciously accept an SSL certificate */
60
  $result = curl_exec ($ch);
61
  curl_close ($ch);
62
- /* print_r(json_decode($result)); die; */
63
  return json_decode($result);
64
  }
65
 
@@ -83,12 +128,14 @@ class Ced_LayBuy_Helper_Data extends Mage_Core_Helper_Abstract{
83
  /* ->addFieldToFilter('last_payment_due',array('lt'=>date('Y-m-d h:i:s',time()))) */
84
  ->addFieldToFilter('status',array('eq'=>0));
85
  foreach($collection as $report){
86
- $orderIds .= $report->getData('laybuy_ref_no').",";
87
- $profileIds .= $report->getData('paypal_profile_id').",";
 
 
88
  /* $result .= $report->getData('order_id').","; */
89
  }
90
- $result['orderIds'] = rtrim($orderIds,',');
91
- $result['profileIds'] = rtrim($profileIds,',');
92
  return $result;
93
  }
94
 
@@ -117,17 +164,22 @@ class Ced_LayBuy_Helper_Data extends Mage_Core_Helper_Abstract{
117
  if(!$paypalProfileId)
118
  return true;
119
  Mage::log('cancel paypal profile called',null,'laybuy_success.log');
120
- $url = 'https://lay-buys.com/vtmob/deal5cancel.php';
 
 
121
  $data ='';
122
  $data .= "&mid=".Mage::getStoreConfig('payment/laybuy/membership_number',$storeId);
123
  $data .= "&paypal_profile_id=".$paypalProfileId;
124
  $ch = curl_init();
125
- curl_setopt($ch, CURLOPT_URL,$url);
 
 
126
  curl_setopt($ch, CURLOPT_POST, 1);
127
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
128
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* use this to suppress output */
129
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); /* tell cURL to graciously accept an SSL certificate */
130
  $result = curl_exec ($ch);
 
131
  if($result == 'success'){
132
  $result = print_r($result,true);
133
  Mage::log('Cancel Request Array to LayBuy {{'.$data."}}", null, 'laybuy_success.log');
@@ -190,16 +242,18 @@ class Ced_LayBuy_Helper_Data extends Mage_Core_Helper_Abstract{
190
  /* $order = Mage::getModel('sales/order')->loadByIncrementId($revise->getOrderId()); */
191
  $storeId = $revise->getStoreId();
192
 
193
- $url = 'https://lay-buys.com/vtmob/deal5.php';
 
 
194
  $data ='';
195
  $data .= "eml=".$revise->getEmail();
196
  $data .= "&prc=".$revise->getAmount();
197
  $data .= "&curr=".$revise->getCurrency();
198
- if($revise->getPaymentType()==1){
199
  /* Lay-Buy Payment */
200
  $data .= "&pp=1";
201
  $data .= "&pplan=1";
202
- }else{
203
  /* Buy-Now Payment */
204
  $data .= "&pp=0";
205
  $data .= "&pplan=0";
@@ -211,19 +265,25 @@ class Ced_LayBuy_Helper_Data extends Mage_Core_Helper_Abstract{
211
  $data .= "&id=".$revise->getId()."-".$revise->getOrderId();
212
  $data .="&CANCELURL=".Mage::getUrl('laybuy/revise/cancel/',array('_secure'=>true));
213
  $data .="&RETURNURL=".Mage::getUrl('laybuy/revise/success/',array('_secure'=>true));
 
 
214
  $ch = curl_init();
215
- curl_setopt($ch, CURLOPT_URL,$url);
 
 
216
  curl_setopt($ch, CURLOPT_POST, 1);
217
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
218
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* use this to suppress output */
219
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); /* tell cURL to graciously accept an SSL certificate */
220
  $result = curl_exec ($ch);
221
- if($result == 'success'){
 
 
222
  $result = print_r($result,true);
223
  Mage::log('Revise Request Array to LayBuy {{'.$data."}}", null, 'laybuy_success.log');
224
  curl_close ($ch);
225
- return true;
226
- }else{
227
  Mage::log('Revise Response Array From LayBuy {{'.$result."}}", null, 'laybuy_failure.log');
228
  curl_close ($ch);
229
  return false;
39
  '-2' => $this->__('Revise Requested'),
40
  '2' => $this->__('Revised'),
41
  );
42
+ }
43
+
44
+ public function getInstalmentData($payment,$key = '') {
45
+ if(!$payment) return false;
46
+ if(empty($key)) {
47
+ $customerOptions['INIT'] = $payment->getData('laybuy_init');
48
+ $customerOptions['MONTHS'] = $payment->getData('laybuy_months');
49
+ return $customerOptions;
50
+ } else {
51
+ return $payment->getData('laybuy_'.strtolower($key));
52
+ }
53
+ }
54
+
55
+ public function postToLaybuy($url = 'https://lay-buys.com/gateway/',$data = array()){
56
+ if(!is_array($data) || count($data) == 0) return false;
57
+
58
+ $postdata ='';
59
+
60
+ foreach($data as $lname=>$lvalue){
61
+ /* if($lname == 'MEMBER') continue; */
62
+ $postdata .= $lname."=".urlencode($lvalue)."&";
63
+ }
64
+ $postdata = rtrim($postdata,'&');
65
+ /* echo $postdata;
66
+ echo "<hr>";
67
+ echo $url; */
68
+
69
+ $ch = curl_init();
70
+ curl_setopt($ch, CURLOPT_URL,$url);
71
+ curl_setopt($ch, CURLOPT_POST, 1);
72
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
73
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
74
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
75
+ $result = curl_exec($ch);
76
+ /* print_r($result);die('hello'); */
77
+ curl_close ($ch);
78
+
79
+ $result = json_decode($result,true);
80
+
81
+ if(isset($result['ACK']) && isset($result['TOKEN']) && $result['ACK'] == 'SUCCESS'){
82
+ return $result['TOKEN'];
83
+ }
84
+ return false;
85
+ }
86
+
87
  public function fetchFromLaybuy($config){
88
  $url = $config['hostname'];
89
  $matchedData = $this->getMatchingData();
93
  $data .= "mid=".$config['username']."&";
94
  /* $data .= "custom=".$orderIds."&"; */
95
  $data .= "profileIds=".$profileIds;
96
+ $data .= "&showall=1";
 
97
  $ch = curl_init();
98
+ curl_setopt($ch, CURLOPT_URL,$url);
99
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
100
+ curl_setopt($ch, CURLOPT_USERPWD, "laybuy:cedcoss123");
101
  curl_setopt($ch, CURLOPT_POST, 1);
102
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
103
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* use this to suppress output */
104
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); /* tell cURL to graciously accept an SSL certificate */
105
  $result = curl_exec ($ch);
106
  curl_close ($ch);
107
+ /* print_r($result); die('here'); */
108
  return json_decode($result);
109
  }
110
 
128
  /* ->addFieldToFilter('last_payment_due',array('lt'=>date('Y-m-d h:i:s',time()))) */
129
  ->addFieldToFilter('status',array('eq'=>0));
130
  foreach($collection as $report){
131
+ if($report->getData('laybuy_ref_no'))
132
+ $orderIds .= $report->getData('laybuy_ref_no').",";
133
+ if($report->getData('paypal_profile_id'))
134
+ $profileIds .= $report->getData('paypal_profile_id').",";
135
  /* $result .= $report->getData('order_id').","; */
136
  }
137
+ $result['orderIds'] = trim($orderIds,',');
138
+ $result['profileIds'] = trim($profileIds,',');
139
  return $result;
140
  }
141
 
164
  if(!$paypalProfileId)
165
  return true;
166
  Mage::log('cancel paypal profile called',null,'laybuy_success.log');
167
+ $url = 'https://lay-buys.com/vtmob/deal5cancel.php';
168
+ /* $url = 'http://192.168.1.101/ced/index.php/vtmob/deal5cancel.php';
169
+ $url = 'http://www.lay-buys.com.au/ced/index.php/vtmob/deal5cancel.php'; */
170
  $data ='';
171
  $data .= "&mid=".Mage::getStoreConfig('payment/laybuy/membership_number',$storeId);
172
  $data .= "&paypal_profile_id=".$paypalProfileId;
173
  $ch = curl_init();
174
+ curl_setopt($ch, CURLOPT_URL,$url);
175
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
176
+ curl_setopt($ch, CURLOPT_USERPWD, "laybuy:cedcoss123");
177
  curl_setopt($ch, CURLOPT_POST, 1);
178
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
179
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* use this to suppress output */
180
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); /* tell cURL to graciously accept an SSL certificate */
181
  $result = curl_exec ($ch);
182
+ /* print_r($result);die; */
183
  if($result == 'success'){
184
  $result = print_r($result,true);
185
  Mage::log('Cancel Request Array to LayBuy {{'.$data."}}", null, 'laybuy_success.log');
242
  /* $order = Mage::getModel('sales/order')->loadByIncrementId($revise->getOrderId()); */
243
  $storeId = $revise->getStoreId();
244
 
245
+ $url = 'https://lay-buys.com/vtmob/deal5.php';
246
+ /* $url = 'http://192.168.1.101/ced/index.php/vtmob/deal5.php';
247
+ $url = 'http://www.lay-buys.com.au/ced/index.php/vtmob/deal5.php'; */
248
  $data ='';
249
  $data .= "eml=".$revise->getEmail();
250
  $data .= "&prc=".$revise->getAmount();
251
  $data .= "&curr=".$revise->getCurrency();
252
+ if($revise->getPaymentType()==1) {
253
  /* Lay-Buy Payment */
254
  $data .= "&pp=1";
255
  $data .= "&pplan=1";
256
+ } else {
257
  /* Buy-Now Payment */
258
  $data .= "&pp=0";
259
  $data .= "&pplan=0";
265
  $data .= "&id=".$revise->getId()."-".$revise->getOrderId();
266
  $data .="&CANCELURL=".Mage::getUrl('laybuy/revise/cancel/',array('_secure'=>true));
267
  $data .="&RETURNURL=".Mage::getUrl('laybuy/revise/success/',array('_secure'=>true));
268
+ /* $arr = explode('&',$data);
269
+ print_r($arr);die; */
270
  $ch = curl_init();
271
+ curl_setopt($ch, CURLOPT_URL,$url);
272
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
273
+ curl_setopt($ch, CURLOPT_USERPWD, "laybuy:cedcoss123");
274
  curl_setopt($ch, CURLOPT_POST, 1);
275
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
276
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* use this to suppress output */
277
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); /* tell cURL to graciously accept an SSL certificate */
278
  $result = curl_exec ($ch);
279
+
280
+ if($result == 'success') {
281
+ $result1 = $result;
282
  $result = print_r($result,true);
283
  Mage::log('Revise Request Array to LayBuy {{'.$data."}}", null, 'laybuy_success.log');
284
  curl_close ($ch);
285
+ return $result1;
286
+ } else {
287
  Mage::log('Revise Response Array From LayBuy {{'.$result."}}", null, 'laybuy_failure.log');
288
  curl_close ($ch);
289
  return false;
app/code/local/Ced/LayBuy/Model/Observer.php CHANGED
@@ -115,10 +115,17 @@ class Ced_LayBuy_Model_Observer
115
  /**
116
  * Chcek cron setup is available at server or not.
117
  */
118
- public function checkCron(){
119
- if(!Mage::getStoreConfig('paymnet/laybuy/cronenabled')){
120
- $config = Mage::getConfig();
121
- $config->setNode("paymnet/laybuy/cronenabled", 1);
 
 
 
 
 
 
 
122
  }
123
  }
124
  }
115
  /**
116
  * Chcek cron setup is available at server or not.
117
  */
118
+ public function checkCron() {
119
+ Mage::log('Check Cron 1',null,'laybuy_cron.log');
120
+ if(!Mage::getStoreConfig('payment/laybuy/cronenabled')) {
121
+ Mage::log('Check Cron 2',null,'laybuy_cron.log');
122
+ try {
123
+ $config = new Mage_Core_Model_Config();
124
+ $config->saveConfig("payment/laybuy/cronenabled", 1);
125
+ Mage::log('Check Cron 3: '.Mage::getStoreConfig('payment/laybuy/cronenabled'),null,'laybuy_cron.log');
126
+ } catch (Exception $e) {
127
+ Mage::log('Check Cron exp: '.$e->getMessage(),null,'laybuy_cron.log');
128
+ }
129
  }
130
  }
131
  }
app/code/local/Ced/LayBuy/Model/Report.php CHANGED
@@ -66,7 +66,7 @@ class Ced_LayBuy_Model_Report extends Mage_Core_Model_Abstract
66
  $helper = Mage::helper('laybuy');
67
 
68
  $listing = $helper->fetchFromLaybuy($config);
69
- /* print_r($listing);die; */
70
  foreach($listing as $orderId=>$reports){
71
  $status = $reports->status;
72
  $report = $reports->report;
@@ -122,7 +122,6 @@ class Ced_LayBuy_Model_Report extends Mage_Core_Model_Abstract
122
 
123
  $newStr .= '<td style="text-align: center;"> '.$transaction->paymentStatus.' </td></tr>';
124
 
125
- $nextPaymentStatus = $transaction->paymentStatus;
126
 
127
  }
128
 
@@ -149,7 +148,7 @@ class Ced_LayBuy_Model_Report extends Mage_Core_Model_Abstract
149
  }
150
  }
151
  $newStr .= '</tbody></table></div></div>';
152
-
153
  switch($status){
154
  case -1: if($helper->processOrder($orderId,0)){
155
  $model->setStatus(-1)->setReport($newStr)->setTransaction($startIndex)->save(); /* Cancel */
66
  $helper = Mage::helper('laybuy');
67
 
68
  $listing = $helper->fetchFromLaybuy($config);
69
+
70
  foreach($listing as $orderId=>$reports){
71
  $status = $reports->status;
72
  $report = $reports->report;
122
 
123
  $newStr .= '<td style="text-align: center;"> '.$transaction->paymentStatus.' </td></tr>';
124
 
 
125
 
126
  }
127
 
148
  }
149
  }
150
  $newStr .= '</tbody></table></div></div>';
151
+
152
  switch($status){
153
  case -1: if($helper->processOrder($orderId,0)){
154
  $model->setStatus(-1)->setReport($newStr)->setTransaction($startIndex)->save(); /* Cancel */
app/code/local/Ced/LayBuy/Model/Standard.php CHANGED
@@ -71,13 +71,15 @@ class Ced_LayBuy_Model_Standard extends Mage_Payment_Model_Method_Abstract
71
 
72
  /* Condition for customer groups for method availability */
73
  if($status){
74
- $configCustomerGroupId = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/customergroup',$storeId ));
75
- $customerGroupId = $quote ? $quote->getData('customer_group_id'):-5;
76
- if($customerGroupId != -5){
77
- if($configCustomerGroupId && in_array($customerGroupId,$configCustomerGroupId)){
78
- $status = true;
79
- }else{
80
- $status = false;
 
 
81
  }
82
  }
83
  }
@@ -127,19 +129,21 @@ class Ced_LayBuy_Model_Standard extends Mage_Payment_Model_Method_Abstract
127
  $productName = '';
128
  $configCategories = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/categories',$storeId ));
129
  $xproducts = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/xproducts',$storeId));
130
- if($configCategories){
131
- foreach($cartItems as $_product){
132
- $_product = Mage::getModel('catalog/product')->load($_product->getProductId());
133
- if($xproducts && in_array($_product->getId(),$xproducts)){
134
- $status = false;
135
- $productName .= $_product->getName().',';
136
- }elseif(count(array_diff($_product->getCategoryIds(),$configCategories))>0){
137
- $status = false;
138
- $productName .= $_product->getName().',';
139
- }
 
140
  }
141
- $productName = rtrim($productName,',');
142
  }
 
 
143
  return array($status,$productName);
144
  }
145
  }
71
 
72
  /* Condition for customer groups for method availability */
73
  if($status){
74
+ if(Mage::getStoreConfig('laybuy/conditional_criteria/allowspecificgroup',$storeId)) {
75
+ $configCustomerGroupId = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/customergroup',$storeId ));
76
+ $customerGroupId = $quote ? $quote->getData('customer_group_id'):-5;
77
+ if($customerGroupId != -5){
78
+ if($configCustomerGroupId && in_array($customerGroupId,$configCustomerGroupId)){
79
+ $status = true;
80
+ }else{
81
+ $status = false;
82
+ }
83
  }
84
  }
85
  }
129
  $productName = '';
130
  $configCategories = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/categories',$storeId ));
131
  $xproducts = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/xproducts',$storeId));
132
+
133
+ foreach($cartItems as $_product){
134
+ $_product = Mage::getModel('catalog/product')->load($_product->getProductId());
135
+ if($xproducts && in_array($_product->getId(),$xproducts)){
136
+ $status = false;
137
+ $productName .= $_product->getName().',';
138
+ } elseif(!Mage::getStoreConfig('laybuy/conditional_criteria/allowspecificcategory',$storeId)) {
139
+ $status = true;
140
+ } elseif ($configCategories && count(array_diff($_product->getCategoryIds(),$configCategories))>0){
141
+ $status = false;
142
+ $productName .= $_product->getName().',';
143
  }
 
144
  }
145
+ $productName = rtrim($productName,',');
146
+
147
  return array($status,$productName);
148
  }
149
  }
app/code/local/Ced/LayBuy/Model/System/Config/Backend/Cron.php CHANGED
@@ -44,9 +44,9 @@ class Ced_LayBuy_Model_System_Config_Backend_Cron extends Mage_Core_Model_Config
44
  }
45
 
46
  Mage::getModel('core/config_data')
47
- ->load(self::CRON_STRING_PATH, 'path')
48
  ->setValue($cronExprString)
49
- ->setPath(self::CRON_STRING_PATH)
50
  ->save();
51
 
52
  return parent::_afterSave();
44
  }
45
 
46
  Mage::getModel('core/config_data')
47
+ ->load('path_name', 'path')
48
  ->setValue($cronExprString)
49
+ ->setPath('path_name')
50
  ->save();
51
 
52
  return parent::_afterSave();
app/code/local/Ced/LayBuy/Model/System/Config/Source/Allowspecificcategory.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Lay-Buys
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 Ced
22
+ * @package Ced_LayBuy
23
+ * @author Asheesh Singh<asheeshsingh@cedcoss.com>
24
+ * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ class Ced_LayBuy_Model_System_Config_Source_Allowspecificcategory
29
+ {
30
+ public function toOptionArray()
31
+ {
32
+ return array (
33
+ 0 => Mage::helper('laybuy')->__("All Allowed Categories"),
34
+ 1 => Mage::helper('laybuy')->__("Specific Categories"),
35
+ );
36
+ }
37
+ }
app/code/local/Ced/LayBuy/Model/System/Config/Source/Allowspecificgroup.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Lay-Buys
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 Ced
22
+ * @package Ced_LayBuy
23
+ * @author Asheesh Singh<asheeshsingh@cedcoss.com>
24
+ * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ class Ced_LayBuy_Model_System_Config_Source_Allowspecificgroup
29
+ {
30
+ public function toOptionArray()
31
+ {
32
+ return array (
33
+ 0 => Mage::helper('laybuy')->__("All Allowed Customer Groups"),
34
+ 1 => Mage::helper('laybuy')->__("Specific Customer Groups"),
35
+ );
36
+ }
37
+ }
app/code/local/Ced/LayBuy/controllers/Adminhtml/ReportController.php CHANGED
@@ -136,6 +136,10 @@ class Ced_LayBuy_Adminhtml_ReportController extends Mage_Adminhtml_Controller_Ac
136
  */
137
  public function saveAction()
138
  {
 
 
 
 
139
  $rowId = $this->getRequest()->getParam('id');
140
  $data = $this->getRequest()->getParams();
141
  /* print_r($data);die; */
@@ -191,7 +195,7 @@ class Ced_LayBuy_Adminhtml_ReportController extends Mage_Adminhtml_Controller_Ac
191
  }
192
  }catch(Exception $e){
193
  $this->_getSession()->addError(
194
- Mage::helper('laybuy')->__("Failed to modify Plan")
195
  );
196
  Mage::logException($e);
197
  }
@@ -200,6 +204,31 @@ class Ced_LayBuy_Adminhtml_ReportController extends Mage_Adminhtml_Controller_Ac
200
 
201
  }
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  /**
204
  * Forced to cancel transaction action
205
  */
@@ -304,8 +333,9 @@ class Ced_LayBuy_Adminhtml_ReportController extends Mage_Adminhtml_Controller_Ac
304
  }
305
 
306
  public function docalcAction(){
307
- $this->loadLayout();
308
- $this->renderLayout();
 
309
  }
310
 
311
  }
136
  */
137
  public function saveAction()
138
  {
139
+ if($this->getRequest()->getParam('is_revised')){
140
+ $this->_forward('resend');
141
+ return;
142
+ }
143
  $rowId = $this->getRequest()->getParam('id');
144
  $data = $this->getRequest()->getParams();
145
  /* print_r($data);die; */
195
  }
196
  }catch(Exception $e){
197
  $this->_getSession()->addError(
198
+ Mage::helper('laybuy')->__($e->getMessage())
199
  );
200
  Mage::logException($e);
201
  }
204
 
205
  }
206
 
207
+ public function resendAction() {
208
+ $revise = Mage::getModel('laybuy/revise')->load($this->getRequest()->getParam('is_revised',0));
209
+ $rowId = $this->getRequest()->getParam('id');
210
+ if($revise && $revise->getId()) {
211
+ try {
212
+ if(Mage::helper('laybuy')->revisePlan($revise)){
213
+
214
+ $this->_getSession()->addSuccess(
215
+ Mage::helper('laybuy')->__("Email re-sent to %s for order#%s",$revise->getEmail(),$revise->getOrderId())
216
+ );
217
+ } else {
218
+ $this->_getSession()->addError(
219
+ Mage::helper('laybuy')->__("Failed to re-send email")
220
+ );
221
+ }
222
+ } catch (Exception $e) {
223
+ $this->_getSession()->addError(
224
+ Mage::helper('laybuy')->__($e->getMessage())
225
+ );
226
+ Mage::logException($e);
227
+ }
228
+ }
229
+ $this->_redirect('*/*/details',array('_secure' => true,'id'=>$rowId));
230
+ }
231
+
232
  /**
233
  * Forced to cancel transaction action
234
  */
333
  }
334
 
335
  public function docalcAction(){
336
+ $this->getResponse()->setBody(
337
+ $this->getLayout()->createBlock('laybuy/adminhtml_docalc')->toHtml()
338
+ );
339
  }
340
 
341
  }
app/code/local/Ced/LayBuy/controllers/ReportController.php CHANGED
@@ -34,12 +34,48 @@
34
  */
35
  class Ced_LayBuy_ReportController extends Mage_Core_Controller_Front_Action
36
  {
37
- public function preDispatch() {
38
- parent::preDispatch();
39
- /* if (!Mage::getStoreConfig('payment/laybuy/active')) {
40
- $this->norouteAction();
41
- } */
 
 
 
42
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  public function detailsAction(){
45
  $this->loadLayout();
34
  */
35
  class Ced_LayBuy_ReportController extends Mage_Core_Controller_Front_Action
36
  {
37
+ /**
38
+ * Retrieve customer session model object
39
+ *
40
+ * @return Mage_Customer_Model_Session
41
+ */
42
+ protected function _getSession()
43
+ {
44
+ return Mage::getSingleton('customer/session');
45
  }
46
+ /**
47
+ * Action predispatch
48
+ * Check that trainer is eligible for viewing content
49
+ */
50
+ public function preDispatch()
51
+ {
52
+ parent::preDispatch();
53
+ if (!$this->getRequest()->isDispatched()) {
54
+ return;
55
+ }
56
+
57
+ $action = $this->getRequest()->getActionName();
58
+ $openActions = array(
59
+ 'create',
60
+ 'login',
61
+ 'logoutsuccess',
62
+ 'forgotpassword',
63
+ 'forgotpasswordpost',
64
+ 'resetpassword',
65
+ 'resetpasswordpost',
66
+ 'confirm',
67
+ 'confirmation'
68
+ );
69
+ $pattern = '/^(' . implode('|', $openActions) . ')/i';
70
+
71
+ if (!preg_match($pattern, $action)) {
72
+ if (!$this->_getSession()->authenticate($this)) {
73
+ $this->setFlag('', 'no-dispatch', true);
74
+ }
75
+ } else {
76
+ $this->_getSession()->setNoReferer(true);
77
+ }
78
+ }
79
 
80
  public function detailsAction(){
81
  $this->loadLayout();
app/code/local/Ced/LayBuy/controllers/ReviseController.php CHANGED
@@ -40,7 +40,7 @@ class Ced_LayBuy_ReviseController extends Mage_Core_Controller_Front_Action
40
  public function cancelAction()
41
  {
42
  $session = Mage::getSingleton('checkout/session');
43
- Mage::log('Revise Order of LayBuy {{'."Order_id=".$order->getId()."|".$this->getRequest()->getParam('ErrorMessage')."}}", null, 'laybuy_failure.log');
44
  $session->addError($this->getRequest()->getParam('ErrorMessage'));
45
  $this->_redirect('checkout/onepage/failure',array('_secure' => true));
46
  }
40
  public function cancelAction()
41
  {
42
  $session = Mage::getSingleton('checkout/session');
43
+ Mage::log('Revise Order of LayBuy {{'.$this->getRequest()->getParam('ErrorMessage')."}}", null, 'laybuy_failure.log');
44
  $session->addError($this->getRequest()->getParam('ErrorMessage'));
45
  $this->_redirect('checkout/onepage/failure',array('_secure' => true));
46
  }
app/code/local/Ced/LayBuy/controllers/StandardController.php CHANGED
@@ -20,7 +20,6 @@
20
  *
21
  * @category Ced
22
  * @package Ced_LayBuy
23
- * @author Asheesh Singh<asheeshsingh@cedcoss.com>
24
  * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  */
@@ -29,7 +28,6 @@
29
  *
30
  * @category Ced
31
  * @package Ced_LayBuy
32
- * @author Asheesh Singh<asheeshsingh@cedcoss.com>
33
  */
34
  class Ced_LayBuy_StandardController extends Mage_Core_Controller_Front_Action
35
  {
@@ -189,7 +187,8 @@ class Ced_LayBuy_StandardController extends Mage_Core_Controller_Front_Action
189
  $this->_redirect('checkout/onepage/success',array('_secure' => true));
190
  }
191
  public function docalcAction(){
192
- $this->loadLayout();
193
- $this->renderLayout();
 
194
  }
195
  }
20
  *
21
  * @category Ced
22
  * @package Ced_LayBuy
 
23
  * @copyright Copyright LAY-BUYS (2011). (http://lay-buys.com/)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
28
  *
29
  * @category Ced
30
  * @package Ced_LayBuy
 
31
  */
32
  class Ced_LayBuy_StandardController extends Mage_Core_Controller_Front_Action
33
  {
187
  $this->_redirect('checkout/onepage/success',array('_secure' => true));
188
  }
189
  public function docalcAction(){
190
+ $this->getResponse()->setBody(
191
+ $this->getLayout()->createBlock('laybuy/standard_docalc')->toHtml()
192
+ );
193
  }
194
  }
app/code/local/Ced/LayBuy/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ced_LayBuy>
5
- <version>0.9.0</version>
6
  <author>ASHEESH SINGH (asheeshsingh@cedcoss.com)</author>
7
  </Ced_LayBuy>
8
  </modules>
@@ -63,6 +63,16 @@
63
  </translate>
64
  </frontend>
65
  <global>
 
 
 
 
 
 
 
 
 
 
66
  <models>
67
  <laybuy>
68
  <class>Ced_LayBuy_Model</class>
@@ -133,6 +143,7 @@
133
  <mind>20%</mind>
134
  <maxd>50%</maxd>
135
  <months>3</months>
 
136
  <ftp_ip>https://lay-buys.com/report/</ftp_ip>
137
  <allowspecific>0</allowspecific>
138
  <sort_order>1</sort_order>
@@ -141,6 +152,11 @@
141
  </laybuy>
142
  </payment>
143
  <laybuy>
 
 
 
 
 
144
  <fetch_reports>
145
  <schedule>1</schedule>
146
  <time>00,00,00</time>
@@ -154,12 +170,14 @@
154
  <cron_expr>* * * * *</cron_expr>
155
  </schedule>
156
  <run>
157
- <model>laybuy/Observer::checkCron</model>
 
158
  </run>
159
  </LayBuy_Cron_Check>
160
  <LayBuy_Automated_Fetch_Updates>
161
  <run>
162
- <model>laybuy/Observer::fetchUpdates</model>
 
163
  </run>
164
  </LayBuy_Automated_Fetch_Updates>
165
  </jobs>
2
  <config>
3
  <modules>
4
  <Ced_LayBuy>
5
+ <version>1.0.0</version>
6
  <author>ASHEESH SINGH (asheeshsingh@cedcoss.com)</author>
7
  </Ced_LayBuy>
8
  </modules>
63
  </translate>
64
  </frontend>
65
  <global>
66
+ <fieldsets>
67
+ <sales_convert_quote_payment>
68
+ <laybuy_init>
69
+ <to_order_payment>*</to_order_payment>
70
+ </laybuy_init>
71
+ <laybuy_months>
72
+ <to_order_payment>*</to_order_payment>
73
+ </laybuy_months>
74
+ </sales_convert_quote_payment>
75
+ </fieldsets>
76
  <models>
77
  <laybuy>
78
  <class>Ced_LayBuy_Model</class>
143
  <mind>20%</mind>
144
  <maxd>50%</maxd>
145
  <months>3</months>
146
+ <adminfee>0</adminfee>
147
  <ftp_ip>https://lay-buys.com/report/</ftp_ip>
148
  <allowspecific>0</allowspecific>
149
  <sort_order>1</sort_order>
152
  </laybuy>
153
  </payment>
154
  <laybuy>
155
+ <conditional_criteria>
156
+ <total>0</total>
157
+ <allowspecificcategory>0</allowspecificcategory>
158
+ <allowspecificgroup>0</allowspecificgroup>
159
+ </conditional_criteria>
160
  <fetch_reports>
161
  <schedule>1</schedule>
162
  <time>00,00,00</time>
170
  <cron_expr>* * * * *</cron_expr>
171
  </schedule>
172
  <run>
173
+ <model>laybuy/Observer</model>
174
+ <method>checkCron</method>
175
  </run>
176
  </LayBuy_Cron_Check>
177
  <LayBuy_Automated_Fetch_Updates>
178
  <run>
179
+ <model>laybuy/Observer</model>
180
+ <method>fetchUpdates</method>
181
  </run>
182
  </LayBuy_Automated_Fetch_Updates>
183
  </jobs>
app/code/local/Ced/LayBuy/etc/system.xml CHANGED
@@ -99,70 +99,100 @@
99
  <show_in_store>1</show_in_store>
100
  <comment>Maximum Number of Months to pay Balance (defaults to 3)</comment>
101
  </months>
 
 
 
 
 
 
 
 
 
 
102
  <conditional_criteria_total translate="label comment">
103
  <label>Minimum Cart Total</label>
104
  <config_path>laybuy/conditional_criteria/total</config_path>
105
  <frontend_type>text</frontend_type>
106
  <comment>The checkout total the order must reach before this payment method becomes active.</comment>
107
- <sort_order>65</sort_order>
108
  <show_in_default>1</show_in_default>
109
  <show_in_website>1</show_in_website>
110
  <show_in_store>1</show_in_store>
111
  <shared>1</shared>
112
  </conditional_criteria_total>
113
- <conditional_criteria_category translate="label comment">
114
  <label>Allowed Categories</label>
 
 
 
 
 
 
 
 
 
115
  <config_path>laybuy/conditional_criteria/categories</config_path>
116
  <frontend_type>multiselect</frontend_type>
117
  <source_model>laybuy/system_config_source_categories</source_model>
118
  <can_be_empty>1</can_be_empty>
119
  <comment>The checkout products of the orders must be in these categories before this payment method becomes active.</comment>
120
- <sort_order>66</sort_order>
 
121
  <show_in_default>1</show_in_default>
122
  <show_in_website>1</show_in_website>
123
  <show_in_store>1</show_in_store>
124
  <shared>1</shared>
125
  </conditional_criteria_category>
126
- <conditional_criteria_exclude_products translate="label comment">
127
- <label>Excluded Product Ids</label>
128
- <config_path>laybuy/conditional_criteria/xproducts</config_path>
129
- <frontend_type>textarea</frontend_type>
130
- <can_be_empty>1</can_be_empty>
131
- <comment>Add product ids separated by comma(,) for which method will not available.</comment>
132
- <sort_order>67</sort_order>
133
  <show_in_default>1</show_in_default>
134
  <show_in_website>1</show_in_website>
135
  <show_in_store>1</show_in_store>
136
- <shared>1</shared>
137
- </conditional_criteria_exclude_products>
138
- <conditional_criteria_customergroup translate="label comment">
139
- <label>Allowed Customer Groups</label>
140
  <config_path>laybuy/conditional_criteria/customergroup</config_path>
141
  <frontend_type>multiselect</frontend_type>
142
  <source_model>laybuy/system_config_source_groups</source_model>
143
  <comment>The checkout customer must be in these customer groups before this payment method becomes active.</comment>
144
- <sort_order>68</sort_order>
 
145
  <show_in_default>1</show_in_default>
146
  <show_in_website>1</show_in_website>
147
  <show_in_store>1</show_in_store>
148
  <shared>1</shared>
149
  </conditional_criteria_customergroup>
 
 
 
 
 
 
 
 
 
 
 
 
150
  <image translate="label comment">
151
  <label>Image/Logo</label>
152
  <frontend_type>image</frontend_type>
153
  <backend_model>adminhtml/system_config_backend_image</backend_model>
154
  <upload_dir config="system/filesystem/media" scope_info="1">laybuy</upload_dir>
155
  <base_url type="media" scope_info="1">laybuy</base_url>
156
- <sort_order>69</sort_order>
157
  <show_in_default>1</show_in_default>
158
  <show_in_website>1</show_in_website>
159
  <show_in_store>1</show_in_store>
160
- <comment>logo or image to appear on Lay-Buys page for your branding or white-labeling</comment>
161
  </image>
162
  <allowspecific translate="label comment">
163
  <label>Payment Applicable From</label>
164
  <frontend_type>select</frontend_type>
165
- <sort_order>70</sort_order>
166
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
167
  <show_in_default>1</show_in_default>
168
  <show_in_website>1</show_in_website>
@@ -170,7 +200,7 @@
170
  <specificcountry translate="label comment">
171
  <label>Countries Payment Applicable From</label>
172
  <frontend_type>multiselect</frontend_type>
173
- <sort_order>75</sort_order>
174
  <source_model>adminhtml/system_config_source_country</source_model>
175
  <show_in_default>1</show_in_default>
176
  <show_in_website>1</show_in_website>
@@ -179,7 +209,7 @@
179
  <sort_order translate="label comment">
180
  <label>Sort Order</label>
181
  <frontend_type>text</frontend_type>
182
- <sort_order>76</sort_order>
183
  <show_in_default>1</show_in_default>
184
  <show_in_website>1</show_in_website>
185
  <show_in_store>1</show_in_store>
@@ -187,7 +217,7 @@
187
  <heading_sftp translate="label">
188
  <label>Api Credentials</label>
189
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
190
- <sort_order>77</sort_order>
191
  <show_in_default>1</show_in_default>
192
  <show_in_website>1</show_in_website>
193
  </heading_sftp>
@@ -196,7 +226,7 @@
196
  <comment>By default it is "https://lay-buys.com/report/".</comment>
197
  <config_path>laybuy/fetch_reports/ftp_ip</config_path>
198
  <frontend_type>text</frontend_type>
199
- <sort_order>78</sort_order>
200
  <show_in_default>1</show_in_default>
201
  <show_in_website>1</show_in_website>
202
  <shared>1</shared>
@@ -204,7 +234,7 @@
204
  <heading_schedule translate="label">
205
  <label>Scheduled Fetching</label>
206
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
207
- <sort_order>79</sort_order>
208
  <show_in_default>1</show_in_default>
209
  <show_in_website>1</show_in_website>
210
  <shared>1</shared>
@@ -214,7 +244,7 @@
214
  <config_path>laybuy/fetch_reports/active</config_path>
215
  <frontend_type>select</frontend_type>
216
  <source_model>adminhtml/system_config_source_yesno</source_model>
217
- <sort_order>80</sort_order>
218
  <show_in_default>1</show_in_default>
219
  <show_in_website>1</show_in_website>
220
  <shared>1</shared>
@@ -225,7 +255,7 @@
225
  <frontend_type>select</frontend_type>
226
  <source_model>laybuy/system_config_source_fetchingSchedule</source_model>
227
  <backend_model>laybuy/system_config_backend_cron</backend_model>
228
- <sort_order>90</sort_order>
229
  <show_in_default>1</show_in_default>
230
  <shared>1</shared>
231
  </settlement_reports_schedule>
99
  <show_in_store>1</show_in_store>
100
  <comment>Maximum Number of Months to pay Balance (defaults to 3)</comment>
101
  </months>
102
+ <adminfee translate="label comment">
103
+ <label>Lay-Buy Admin Fees</label>
104
+ <frontend_type>select</frontend_type>
105
+ <source_model>adminhtml/system_config_source_yesno</source_model>
106
+ <sort_order>65</sort_order>
107
+ <show_in_default>1</show_in_default>
108
+ <show_in_website>1</show_in_website>
109
+ <show_in_store>0</show_in_store>
110
+ <comment><![CDATA[ A 0.9% admin fee is payable to Lay-Buys. For more detail please login to <a href="https://www.lay-buys.com/vtmob/login/" target="_blank" title="https://www.lay-buys.com/vtmob/login/">merchant panel</a> using your merchant credentials.]]></comment>
111
+ </adminfee>
112
  <conditional_criteria_total translate="label comment">
113
  <label>Minimum Cart Total</label>
114
  <config_path>laybuy/conditional_criteria/total</config_path>
115
  <frontend_type>text</frontend_type>
116
  <comment>The checkout total the order must reach before this payment method becomes active.</comment>
117
+ <sort_order>67</sort_order>
118
  <show_in_default>1</show_in_default>
119
  <show_in_website>1</show_in_website>
120
  <show_in_store>1</show_in_store>
121
  <shared>1</shared>
122
  </conditional_criteria_total>
123
+ <allowspecificcategory translate="label comment">
124
  <label>Allowed Categories</label>
125
+ <config_path>laybuy/conditional_criteria/allowspecificcategory</config_path>
126
+ <frontend_type>select</frontend_type>
127
+ <sort_order>69</sort_order>
128
+ <source_model>laybuy/system_config_source_allowspecificcategory</source_model>
129
+ <show_in_default>1</show_in_default>
130
+ <show_in_website>1</show_in_website>
131
+ <show_in_store>1</show_in_store>
132
+ </allowspecificcategory>
133
+ <conditional_criteria_category translate="comment">
134
  <config_path>laybuy/conditional_criteria/categories</config_path>
135
  <frontend_type>multiselect</frontend_type>
136
  <source_model>laybuy/system_config_source_categories</source_model>
137
  <can_be_empty>1</can_be_empty>
138
  <comment>The checkout products of the orders must be in these categories before this payment method becomes active.</comment>
139
+ <sort_order>71</sort_order>
140
+ <depends><allowspecificcategory>1</allowspecificcategory></depends>
141
  <show_in_default>1</show_in_default>
142
  <show_in_website>1</show_in_website>
143
  <show_in_store>1</show_in_store>
144
  <shared>1</shared>
145
  </conditional_criteria_category>
146
+ <allowspecificgroup translate="label comment">
147
+ <label>Allowed Customer Groups</label>
148
+ <config_path>laybuy/conditional_criteria/allowspecificgroup</config_path>
149
+ <frontend_type>select</frontend_type>
150
+ <sort_order>72</sort_order>
151
+ <source_model>laybuy/system_config_source_allowspecificgroup</source_model>
 
152
  <show_in_default>1</show_in_default>
153
  <show_in_website>1</show_in_website>
154
  <show_in_store>1</show_in_store>
155
+ </allowspecificgroup>
156
+ <conditional_criteria_customergroup translate="comment">
 
 
157
  <config_path>laybuy/conditional_criteria/customergroup</config_path>
158
  <frontend_type>multiselect</frontend_type>
159
  <source_model>laybuy/system_config_source_groups</source_model>
160
  <comment>The checkout customer must be in these customer groups before this payment method becomes active.</comment>
161
+ <sort_order>73</sort_order>
162
+ <depends><allowspecificgroup>1</allowspecificgroup></depends>
163
  <show_in_default>1</show_in_default>
164
  <show_in_website>1</show_in_website>
165
  <show_in_store>1</show_in_store>
166
  <shared>1</shared>
167
  </conditional_criteria_customergroup>
168
+ <conditional_criteria_exclude_products translate="label comment">
169
+ <label>Excluded Product Ids</label>
170
+ <config_path>laybuy/conditional_criteria/xproducts</config_path>
171
+ <frontend_type>textarea</frontend_type>
172
+ <can_be_empty>1</can_be_empty>
173
+ <comment>Add product ids separated by comma(,) for which method will not available.</comment>
174
+ <sort_order>75</sort_order>
175
+ <show_in_default>1</show_in_default>
176
+ <show_in_website>1</show_in_website>
177
+ <show_in_store>1</show_in_store>
178
+ <shared>1</shared>
179
+ </conditional_criteria_exclude_products>
180
  <image translate="label comment">
181
  <label>Image/Logo</label>
182
  <frontend_type>image</frontend_type>
183
  <backend_model>adminhtml/system_config_backend_image</backend_model>
184
  <upload_dir config="system/filesystem/media" scope_info="1">laybuy</upload_dir>
185
  <base_url type="media" scope_info="1">laybuy</base_url>
186
+ <sort_order>77</sort_order>
187
  <show_in_default>1</show_in_default>
188
  <show_in_website>1</show_in_website>
189
  <show_in_store>1</show_in_store>
190
+ <comment>logo or image (max. 750x90) to appear on Lay-Buys page for your branding or white-labeling.</comment>
191
  </image>
192
  <allowspecific translate="label comment">
193
  <label>Payment Applicable From</label>
194
  <frontend_type>select</frontend_type>
195
+ <sort_order>79</sort_order>
196
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
197
  <show_in_default>1</show_in_default>
198
  <show_in_website>1</show_in_website>
200
  <specificcountry translate="label comment">
201
  <label>Countries Payment Applicable From</label>
202
  <frontend_type>multiselect</frontend_type>
203
+ <sort_order>81</sort_order>
204
  <source_model>adminhtml/system_config_source_country</source_model>
205
  <show_in_default>1</show_in_default>
206
  <show_in_website>1</show_in_website>
209
  <sort_order translate="label comment">
210
  <label>Sort Order</label>
211
  <frontend_type>text</frontend_type>
212
+ <sort_order>82</sort_order>
213
  <show_in_default>1</show_in_default>
214
  <show_in_website>1</show_in_website>
215
  <show_in_store>1</show_in_store>
217
  <heading_sftp translate="label">
218
  <label>Api Credentials</label>
219
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
220
+ <sort_order>83</sort_order>
221
  <show_in_default>1</show_in_default>
222
  <show_in_website>1</show_in_website>
223
  </heading_sftp>
226
  <comment>By default it is "https://lay-buys.com/report/".</comment>
227
  <config_path>laybuy/fetch_reports/ftp_ip</config_path>
228
  <frontend_type>text</frontend_type>
229
+ <sort_order>85</sort_order>
230
  <show_in_default>1</show_in_default>
231
  <show_in_website>1</show_in_website>
232
  <shared>1</shared>
234
  <heading_schedule translate="label">
235
  <label>Scheduled Fetching</label>
236
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
237
+ <sort_order>87</sort_order>
238
  <show_in_default>1</show_in_default>
239
  <show_in_website>1</show_in_website>
240
  <shared>1</shared>
244
  <config_path>laybuy/fetch_reports/active</config_path>
245
  <frontend_type>select</frontend_type>
246
  <source_model>adminhtml/system_config_source_yesno</source_model>
247
+ <sort_order>89</sort_order>
248
  <show_in_default>1</show_in_default>
249
  <show_in_website>1</show_in_website>
250
  <shared>1</shared>
255
  <frontend_type>select</frontend_type>
256
  <source_model>laybuy/system_config_source_fetchingSchedule</source_model>
257
  <backend_model>laybuy/system_config_backend_cron</backend_model>
258
+ <sort_order>91</sort_order>
259
  <show_in_default>1</show_in_default>
260
  <shared>1</shared>
261
  </settlement_reports_schedule>
app/code/local/Ced/LayBuy/sql/laybuy_setup/mysql4-upgrade-0.9.0-1.0.0.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ /* @var $installer Mage_Customer_Model_Entity_Setup */
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ ALTER TABLE `{$installer->getTable('sales/quote_payment')}` ADD `laybuy_init` VARCHAR( 255 ) NOT NULL ;
10
+ ALTER TABLE `{$installer->getTable('sales/quote_payment')}` ADD `laybuy_months` VARCHAR( 255 ) NOT NULL ;
11
+
12
+
13
+
14
+ ALTER TABLE `{$installer->getTable('sales/order_payment')}` ADD `laybuy_init` VARCHAR( 255 ) NOT NULL ;
15
+ ALTER TABLE `{$installer->getTable('sales/order_payment')}` ADD `laybuy_months` VARCHAR( 255 ) NOT NULL ;
16
+
17
+ ");
18
+
19
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/laybuy.xml CHANGED
@@ -5,9 +5,9 @@
5
  <block type="adminhtml/notification_window" name="notification_laybuy" as="notification_laybuy" acl="system/adminnotification/show_toolbar" template="laybuy/notification.phtml" />
6
  </reference>
7
  </default>
8
- <laybuy_adminhtml_report_docalc>
9
  <block type="core/text_list" name="root" output="toHtml">
10
  <block type="laybuy/adminhtml_docalc" name="laybuy.adminhtml.docalc"/>
11
  </block>
12
- </laybuy_adminhtml_report_docalc>
13
  </layout>
5
  <block type="adminhtml/notification_window" name="notification_laybuy" as="notification_laybuy" acl="system/adminnotification/show_toolbar" template="laybuy/notification.phtml" />
6
  </reference>
7
  </default>
8
+ <!-- <laybuy_adminhtml_report_docalc>
9
  <block type="core/text_list" name="root" output="toHtml">
10
  <block type="laybuy/adminhtml_docalc" name="laybuy.adminhtml.docalc"/>
11
  </block>
12
+ </laybuy_adminhtml_report_docalc> -->
13
  </layout>
app/design/adminhtml/default/default/template/laybuy/notification.phtml CHANGED
@@ -26,9 +26,9 @@
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  */
28
  ?>
 
29
  <div class="notification-global">
30
- <?php if(!Mage::getStoreConfig('paymnet/laybuy/cronenabled')){ ?>
31
- <strong class="label">Cron must be enabled for "Automated Fetch Updates".</strong>
32
- <?php } ?>
33
  Click here to go to <a href="<?php echo Mage::helper("adminhtml")->getUrl("laybuy/adminhtml_report/",array('_secure'=>true)); ?>">Lay-Buys Instalment Reports</a>.
34
- </div>
 
26
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
  */
28
  ?>
29
+ <?php if(!Mage::getStoreConfig('payment/laybuy/cronenabled') && Mage::getStoreConfig('laybuy/fetch_reports/active')) { ?>
30
  <div class="notification-global">
31
+ <strong class="label">Cron must be enabled for "Automated Fetch Updates".</strong>
 
 
32
  Click here to go to <a href="<?php echo Mage::helper("adminhtml")->getUrl("laybuy/adminhtml_report/",array('_secure'=>true)); ?>">Lay-Buys Instalment Reports</a>.
33
+ </div>
34
+ <?php } ?>
app/design/frontend/base/default/layout/laybuy.xml CHANGED
@@ -7,20 +7,22 @@
7
  </reference>
8
  </default>
9
  <checkout_onepage_review>
10
- <reference name="checkout.onepage.review.button">
11
- <action method="setTemplate" ifconfig="payment/laybuy/active">
 
12
  <template>laybuy/checkout/onepage/review/button.phtml</template>
13
  </action>
 
14
  </reference>
15
  </checkout_onepage_review>
16
- <laybuy_standard_docalc>
17
  <block type="core/text_list" name="root" output="toHtml">
18
  <block type="laybuy/standard_docalc" name="laybuy.standard.docalc"/>
19
  </block>
20
- </laybuy_standard_docalc>
21
  <laybuy_report_details>
22
  <update handle="customer_account"/>
23
- <reference name="head">
24
  <action method="setTitle" translate="title" module="customer"><title>View Transaction Details</title></action>
25
  </reference>
26
  <reference name="customer_account_navigation">
7
  </reference>
8
  </default>
9
  <checkout_onepage_review>
10
+ <reference name="checkout.onepage.review.info.items.after">
11
+ <block type="core/template" name="laybuy.checkout.onepage.review.button" as="laybuy_button" template="laybuy/checkout/onepage/review/button.phtml"/>
12
+ <!--<action method="setTemplate" ifconfig="payment/laybuy/active">
13
  <template>laybuy/checkout/onepage/review/button.phtml</template>
14
  </action>
15
+ <action method="insert" ifconfig="payment/laybuy/active"><template>laybuy/checkout/onepage/review/button.phtml</template></action> -->
16
  </reference>
17
  </checkout_onepage_review>
18
+ <!-- <laybuy_standard_docalc>
19
  <block type="core/text_list" name="root" output="toHtml">
20
  <block type="laybuy/standard_docalc" name="laybuy.standard.docalc"/>
21
  </block>
22
+ </laybuy_standard_docalc> -->
23
  <laybuy_report_details>
24
  <update handle="customer_account"/>
25
+ <reference name="head">
26
  <action method="setTitle" translate="title" module="customer"><title>View Transaction Details</title></action>
27
  </reference>
28
  <reference name="customer_account_navigation">
app/design/frontend/base/default/template/laybuy/checkout/onepage/review/button.phtml CHANGED
@@ -30,20 +30,19 @@
30
  ->setPaymentAcceptanceMarkHref('http://lay-buys.com/');
31
  $sessionPayment = Mage::getSingleton('checkout/session')->getQuote()->getPayment();
32
  $method = $sessionPayment->getData('method');
33
- $customerOptions = $sessionPayment->getData('additional_information');
34
-
35
  $totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
36
  $grandtotal = $totals["grand_total"]->getValue();
37
  ?>
38
  <?php if($method == 'laybuy'){ ?>
39
- <br/>
40
- <div class="input-box" id="laybuy-preview-wrapper" style="clear: both !important;">
41
- <span style="text-align: center !important; display: block !important;"><strong><?php echo $this->__('Plan Preview'); ?></strong></span>
42
- <iframe src="<?php echo $this->getUrl('laybuy/standard/docalc',array('_secure' => true)); ?>?currency=<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>&amt=<?php echo $grandtotal; ?>&init=<?php echo $customerOptions['INIT']; ?>&mnth=<?php echo $customerOptions['MONTHS']; ?>&html=1" name="preview-tbl" id="preview-tbl" style="width:100%; height:157px; border:0; margin:0; overflow:hidden" marginheight="0" marginwidth="0" noscroll></iframe>
 
 
43
  </div>
44
- <button type="submit" style="float: none !important; background: none repeat scroll 0 0 rgba(0, 0, 0, 0); border: 0 none; cursor: pointer; margin: 0; overflow: visible; padding: 0; width: auto;" class="button btn-checkout" onclick="review.save();"><img src="<?php echo $this->escapeHtml($this->getPaymentAcceptanceMarkSrc())?>" alt="<?php echo Mage::helper('laybuy')->__('LAY-BUY') ?>" title="<?php echo $this->escapeHtml($this->getLayBuyTitle()) ?>" class="v-middle" />&nbsp;</button>
45
- <button type="button" style="float: none ! important; background: none repeat scroll 0px 0px transparent; border: 0px none; cursor: default; margin: 0px; overflow: visible; padding: 0px; width: auto; color: rgb(47, 47, 47); text-transform: none;" class="button btn-checkout">&nbsp;-OR-&nbsp;</button>
46
  <?php } ?>
47
- <?php echo $this->getLayout()->createBlock("core/template")->setTemplate("checkout/onepage/review/button.phtml")->toHtml();
48
 
49
 
30
  ->setPaymentAcceptanceMarkHref('http://lay-buys.com/');
31
  $sessionPayment = Mage::getSingleton('checkout/session')->getQuote()->getPayment();
32
  $method = $sessionPayment->getData('method');
33
+ $customerOptions = Mage::helper('laybuy')->getInstalmentData($sessionPayment);
 
34
  $totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
35
  $grandtotal = $totals["grand_total"]->getValue();
36
  ?>
37
  <?php if($method == 'laybuy'){ ?>
38
+ <div class="buttons-set">
39
+ <br/>
40
+ <div class="input-box" id="laybuy-preview-wrapper" style="clear: both !important;">
41
+ <span style="text-align: center !important; display: block !important;"><strong><?php echo $this->__('Plan Preview'); ?></strong></span>
42
+ <iframe src="<?php echo $this->getUrl('laybuy/standard/docalc',array('_secure' => true)); ?>?currency=<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>&amt=<?php echo $grandtotal; ?>&init=<?php echo $customerOptions['INIT']; ?>&mnth=<?php echo $customerOptions['MONTHS']; ?>&html=1" name="preview-tbl" id="preview-tbl" style="width:100%; height:157px; border:0; margin:0; overflow:hidden" marginheight="0" marginwidth="0" noscroll></iframe>
43
+ </div>
44
  </div>
 
 
45
  <?php } ?>
46
+ <?php //echo $this->getLayout()->createBlock("core/template")->setTemplate("checkout/onepage/review/button.phtml")->toHtml();
47
 
48
 
app/design/frontend/base/default/template/laybuy/form/extra.phtml CHANGED
@@ -33,7 +33,9 @@
33
  <?php $_code=$this->getMethodCode() ?>
34
  <?php
35
  $sessionPayment = Mage::getSingleton('checkout/session')->getQuote()->getPayment();
36
- $customerOptions = $sessionPayment->getData('additional_information');
 
 
37
 
38
  $totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
39
  $grandtotal = $totals["grand_total"]->getValue();
@@ -43,7 +45,7 @@
43
  <li>
44
  <label for="<?php echo $_code ?>_init" class="required"><em>*</em><?php echo $this->__('Initial Payment') ?> : </label>
45
  <div class="input-box">
46
- <select onChange="document.getElementById('preview-tbl1').src = '<?php echo $this->getUrl('laybuy/standard/docalc',array('_secure'=>true)); ?>?currency=<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>&amt=<?php echo $grandtotal; ?>&init='+document.getElementById('<?php echo $_code ?>_init').value+'&mnth='+document.getElementById('<?php echo $_code ?>_months').value+'&rnd='+Math.random()+'&html=1';" id="<?php echo $_code ?>_init" name="payment[additional_information][INIT]" title="<?php echo $this->__('Initial Payment') ?>" class="required-entry">
47
  <?php foreach ($this->getArray('dp_amount') as $_data): ?>
48
  <option value="<?php echo $_data['value'] ?>" <?php if(isset($customerOptions['INIT']) && $customerOptions['INIT'] && $customerOptions['INIT']==$_data['value']){ ?> selected="selected" <?php } ?>><?php echo $_data['label'] ?></option>
49
  <?php endforeach ?>
@@ -53,8 +55,8 @@
53
  <li>
54
  <label for="<?php echo $_code ?>_months" class="required"><em>*</em><?php echo $this->__('Months to Pay') ?> : </label>
55
  <div class="input-box">
56
- <select onChange="document.getElementById('preview-tbl1').src = '<?php echo $this->getUrl('laybuy/standard/docalc',array('_secure'=>true)); ?>?currency=<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>&amt=<?php echo $grandtotal; ?>&init='+document.getElementById('<?php echo $_code ?>_init').value+'&mnth='+document.getElementById('<?php echo $_code ?>_months').value+'&rnd='+Math.random()+'&html=1';" id="<?php echo $_code ?>_months" name="payment[additional_information][MONTHS]" title="<?php echo $this->__('Months to Pay') ?>" class="required-entry">
57
- <?php $_recommendedMonth = isset($customerOptions['MONTHS'])?$customerOptions['MONTHS']:$this->getConfigData('months'); ?>
58
  <?php foreach ($this->getArray('months') as $_data): ?>
59
  <option value="<?php echo $_data['value'] ?>"<?php if($_data['value']==$_recommendedMonth): ?> selected="selected"<?php endif ?>><?php echo $_data['label'] ?></option>
60
  <?php endforeach ?>
@@ -64,8 +66,9 @@
64
  <li>
65
  <label for="preview-tbl1"><?php echo $this->__('Plan Preview') ?></label>
66
  <div id="preview-tbl1-wrapper" class="input-box" style="width:100% !important">
67
- <iframe src="<?php echo $this->getUrl('laybuy/standard/docalc',array('_secure'=>true)); ?>?currency=<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>&amt=<?php echo $grandtotal; ?>&init=<?php echo $this->getConfigData('mind'); ?>&mnth=<?php echo $this->getConfigData('months'); ?>&html=1" name="preview-tbl1" id="preview-tbl1" style="width:100%; height:157px; border:0; margin:0; overflow:hidden" marginheight="0" marginwidth="0" noscroll></iframe>
68
- </div>
 
69
  </li>
70
  <li>
71
  <label for="preview-tbl12"><?php echo $this->__('Your goods/services will be delivered once your final payment has been received.') ?></label>
33
  <?php $_code=$this->getMethodCode() ?>
34
  <?php
35
  $sessionPayment = Mage::getSingleton('checkout/session')->getQuote()->getPayment();
36
+ $customerOptions = Mage::helper('laybuy')->getInstalmentData($sessionPayment);
37
+ /* $customerOptions['INIT'] = $sessionPayment->getData('laybuy_init');
38
+ $customerOptions['MONTHS'] = $sessionPayment->getData('laybuy_months'); */
39
 
40
  $totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
41
  $grandtotal = $totals["grand_total"]->getValue();
45
  <li>
46
  <label for="<?php echo $_code ?>_init" class="required"><em>*</em><?php echo $this->__('Initial Payment') ?> : </label>
47
  <div class="input-box">
48
+ <select onChange="document.getElementById('preview-tbl1').src = '<?php echo $this->getUrl('laybuy/standard/docalc',array('_secure'=>true)); ?>?currency=<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>&amt=<?php echo $grandtotal; ?>&init='+document.getElementById('<?php echo $_code ?>_init').value+'&mnth='+document.getElementById('<?php echo $_code ?>_months').value+'&rnd='+Math.random()+'&html=1';" id="<?php echo $_code ?>_init" name="payment[laybuy_init]" title="<?php echo $this->__('Initial Payment') ?>" class="required-entry">
49
  <?php foreach ($this->getArray('dp_amount') as $_data): ?>
50
  <option value="<?php echo $_data['value'] ?>" <?php if(isset($customerOptions['INIT']) && $customerOptions['INIT'] && $customerOptions['INIT']==$_data['value']){ ?> selected="selected" <?php } ?>><?php echo $_data['label'] ?></option>
51
  <?php endforeach ?>
55
  <li>
56
  <label for="<?php echo $_code ?>_months" class="required"><em>*</em><?php echo $this->__('Months to Pay') ?> : </label>
57
  <div class="input-box">
58
+ <select onChange="document.getElementById('preview-tbl1').src = '<?php echo $this->getUrl('laybuy/standard/docalc',array('_secure'=>true)); ?>?currency=<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>&amt=<?php echo $grandtotal; ?>&init='+document.getElementById('<?php echo $_code ?>_init').value+'&mnth='+document.getElementById('<?php echo $_code ?>_months').value+'&rnd='+Math.random()+'&html=1';" id="<?php echo $_code ?>_months" name="payment[laybuy_months]" title="<?php echo $this->__('Months to Pay') ?>" class="required-entry">
59
+ <?php $_recommendedMonth = isset($customerOptions['MONTHS']) && $customerOptions['MONTHS']?$customerOptions['MONTHS']:$this->getConfigData('months'); ?>
60
  <?php foreach ($this->getArray('months') as $_data): ?>
61
  <option value="<?php echo $_data['value'] ?>"<?php if($_data['value']==$_recommendedMonth): ?> selected="selected"<?php endif ?>><?php echo $_data['label'] ?></option>
62
  <?php endforeach ?>
66
  <li>
67
  <label for="preview-tbl1"><?php echo $this->__('Plan Preview') ?></label>
68
  <div id="preview-tbl1-wrapper" class="input-box" style="width:100% !important">
69
+ <iframe src="<?php echo $this->getUrl('laybuy/standard/docalc',array('_secure'=>true)); ?>?currency=<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>&amt=<?php echo $grandtotal; ?>&init=<?php if(isset($customerOptions['INIT']) && $customerOptions['INIT']){ echo $customerOptions['INIT']; } else { echo $this->getConfigData('mind'); } ?>&mnth=<?php echo $_recommendedMonth; ?>&html=1" name="preview-tbl1" id="preview-tbl1" style="width:100%; height:157px; border:0; margin:0; overflow:hidden" marginheight="0" marginwidth="0" noscroll></iframe>
70
+
71
+ </div>
72
  </li>
73
  <li>
74
  <label for="preview-tbl12"><?php echo $this->__('Your goods/services will be delivered once your final payment has been received.') ?></label>
app/design/frontend/base/default/template/laybuy/form/laybuy.phtml CHANGED
@@ -31,11 +31,17 @@
31
  * @see Mage_Core_Block_Template
32
  */
33
  ?>
 
 
 
 
 
 
34
  <link media="all" rel="stylesheet" href="<?php echo Mage::getBaseUrl('skin'); ?>frontend/base/default/css/laybuy/tooltip.css" type="text/css">
35
  <!--<script type="text/javascript" src="<?php //echo Mage::getBaseUrl('js'); ?>laybuy/jquery.min.js"></script>
36
  <script type="text/javascript" src="<?php //echo Mage::getBaseUrl('js'); ?>laybuy/jquery.atooltip.js"></script>-->
37
  <img src="<?php echo $this->escapeHtml($this->getPaymentAcceptanceMarkSrc())?>" alt="<?php echo Mage::helper('laybuy')->__('LAY-BUY') ?>" title="<?php echo $this->escapeHtml($this->getLayBuyTitle()) ?>" class="v-middle" />&nbsp;
38
- <a href="#" class="callBackTip" title="<?php echo Mage::helper('laybuy')->__('Lay-Buy is an affordable payment plan option that allows you to pay-off a product or service via one down payment, with the balance paid over 1, 2 or 3 monthly instalments. Your purchase is delivered to you after the final instalment payment is completed. A 0.9% admin fee is payable to Lay-Buys.') ?>"><?php echo Mage::helper('laybuy')->__('What is LAY-BUY?') ?></a>
39
  <script type="text/javscript">
40
  // initiate the plugin after DOM has loaded
41
  //var laybuy = jQuery.noConflict();
@@ -51,7 +57,7 @@
51
  clickIt: true, // set to true for click activated tooltip
52
  inSpeed: 200, // Speed tooltip fades in
53
  outSpeed: 100, // Speed tooltip fades out
54
- tipContent: '<?php echo Mage::helper('laybuy')->__('Lay-Buy is an affordable payment plan option that allows you to pay-off a product or service via one down payment, with the balance paid over 1, 2 or 3 monthly instalments. Your purchase is delivered to you after the final instalment payment is completed. A 0.9% admin fee is payable to Lay-Buys.') ?>', // Pass in content or it will use objects 'title' attribute
55
  toolTipClass: 'defaultTheme', // Set class name for custom theme/styles
56
  xOffset: 5, // x position
57
  yOffset: 5, // y position
31
  * @see Mage_Core_Block_Template
32
  */
33
  ?>
34
+ <?php
35
+ $adminFeeDescription = '';
36
+ if(Mage::getStoreConfig('payment/laybuy/adminfee',$storeId)) {
37
+ $adminFeeDescription = " A 0.9% admin fee is payable to Lay-Buys.";
38
+ }
39
+ ?>
40
  <link media="all" rel="stylesheet" href="<?php echo Mage::getBaseUrl('skin'); ?>frontend/base/default/css/laybuy/tooltip.css" type="text/css">
41
  <!--<script type="text/javascript" src="<?php //echo Mage::getBaseUrl('js'); ?>laybuy/jquery.min.js"></script>
42
  <script type="text/javascript" src="<?php //echo Mage::getBaseUrl('js'); ?>laybuy/jquery.atooltip.js"></script>-->
43
  <img src="<?php echo $this->escapeHtml($this->getPaymentAcceptanceMarkSrc())?>" alt="<?php echo Mage::helper('laybuy')->__('LAY-BUY') ?>" title="<?php echo $this->escapeHtml($this->getLayBuyTitle()) ?>" class="v-middle" />&nbsp;
44
+ <a href="#" class="callBackTip" title="<?php echo Mage::helper('laybuy')->__('Lay-Buy is an affordable payment plan option that allows you to pay-off a product or service via one down payment, with the balance paid over 1, 2 or 3 monthly instalments. Your purchase is delivered to you after the final instalment payment is completed.'.$adminFeeDescription) ?>"><?php echo Mage::helper('laybuy')->__('What is LAY-BUY?') ?></a>
45
  <script type="text/javscript">
46
  // initiate the plugin after DOM has loaded
47
  //var laybuy = jQuery.noConflict();
57
  clickIt: true, // set to true for click activated tooltip
58
  inSpeed: 200, // Speed tooltip fades in
59
  outSpeed: 100, // Speed tooltip fades out
60
+ tipContent: '<?php echo Mage::helper('laybuy')->__('Lay-Buy is an affordable payment plan option that allows you to pay-off a product or service via one down payment, with the balance paid over 1, 2 or 3 monthly instalments. Your purchase is delivered to you after the final instalment payment is completed.'.$adminFeeDescription) ?>', // Pass in content or it will use objects 'title' attribute
61
  toolTipClass: 'defaultTheme', // Set class name for custom theme/styles
62
  xOffset: 5, // x position
63
  yOffset: 5, // y position
app/design/frontend/base/default/template/laybuy/info/default.phtml CHANGED
@@ -33,16 +33,16 @@
33
  <p><strong><?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?></strong></p>
34
  <?php if($_specificInfo = $this->getSpecificInformation() && $this->getRequest()->getModuleName()=='sales' && $this->getRequest()->getControllerName()=='order' && $this->getRequest()->getActionName()=='view'):?>
35
  <table>
36
- <tbody>
37
- <tr>
38
- <th><strong><a href="<?php echo $this->getUrl('laybuy/report/grid',array('_secure' => true,'order_id'=>$this->getRequest()->getParam('order_id'))); ?>" ><?php echo Mage::helper('laybuy')->__('View Instalment Plan'); ?></a></strong></th>
39
  </tr>
40
  </tbody>
41
  </table>
42
  <?php else:?>
43
  <p>
44
  <?php
45
- $laybuy = $this->getInfo()->getAdditionalInformation();
46
  echo "<b>Down Payment % : </b>".$laybuy['INIT'];
47
  echo "<br/>";
48
  echo "<b>Months : </b>".$laybuy['MONTHS'];
33
  <p><strong><?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?></strong></p>
34
  <?php if($_specificInfo = $this->getSpecificInformation() && $this->getRequest()->getModuleName()=='sales' && $this->getRequest()->getControllerName()=='order' && $this->getRequest()->getActionName()=='view'):?>
35
  <table>
36
+ <tbody>
37
+ <tr>
38
+ <th><strong><a href="<?php echo $this->getUrl('laybuy/report/grid',array('_secure' => true,'order_id'=>$this->getRequest()->getParam('order_id'))); ?>" ><?php echo Mage::helper('laybuy')->__('View Instalment Plan'); ?></a></strong></th>
39
  </tr>
40
  </tbody>
41
  </table>
42
  <?php else:?>
43
  <p>
44
  <?php
45
+ $laybuy = Mage::helper('laybuy')->getInstalmentData($this->getInfo());
46
  echo "<b>Down Payment % : </b>".$laybuy['INIT'];
47
  echo "<br/>";
48
  echo "<b>Months : </b>".$laybuy['MONTHS'];
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ced_LayBuy</name>
4
- <version>2.1.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -18,23 +18,12 @@ PUT IT ON LAY-BUY enables online shoppers to pay-off a product or service via a
18
  Merchants however only deliver the product or service after receipt of the final instalment payment&#xD;
19
  &#xD;
20
  This effectively increases sales and radically improves cash flow where all the customer monies are paid directly into your PayPal account</description>
21
- <notes>1. Order page modified with installment plans details in payment information section.&#xD;
22
- 2. Customer can view there installment plans of a order from account panel for detail read the user guide&#xD;
23
- 3. Enhance the payment association with order&#xD;
24
- 4. Installment plan can be canceled on order cancellation&#xD;
25
- 5. admin Interfaces are modified.&#xD;
26
- 6. payment method only active at checkout per:&#xD;
27
- - min. checkout cart total&#xD;
28
- - allowed categories&#xD;
29
- - allowed customer groups&#xD;
30
- - excluded by product ids &#xD;
31
- 7. SSL compatible&#xD;
32
- 8. Round off problem removed&#xD;
33
- 9. Date problem resolved</notes>
34
  <authors><author><name>Warrin</name><user>Warrin</user><email>warrin@lay-buys.com</email></author><author><name>Asheesh Singh</name><user>asheeshsingh</user><email>asheeshsingh@cedcoss.com</email></author></authors>
35
- <date>2014-04-14</date>
36
- <time>05:13:49</time>
37
- <contents><target name="magelocal"><dir name="Ced"><dir name="LayBuy"><dir name="Block"><dir name="Adminhtml"><file name="Docalc.php" hash="c12af05bee0d480ac49835b46ca8011e"/><dir name="Report"><dir name="Details"><file name="Form.php" hash="e0ce57d85efc14656d4294021e5f5257"/></dir><file name="Details.php" hash="8e333a635b831b6335f7b959a06eef9a"/><dir name="Edit"><file name="Form.php" hash="34ca36479122455bb9b0b1ccaf5d175b"/></dir><file name="Edit.php" hash="9f7eecb6e5c7ae03378b49089ea9a6c0"/><file name="Grid.php" hash="5492ab7536a608362860bc7c1bd1ac36"/><dir name="Renderer"><file name="Email.php" hash="8e6c0938d80f629cd285303018945ea1"/><file name="Order.php" hash="04257868d84c6eaccd79414ba09dcef6"/><file name="Record.php" hash="95eb9f836a50f3f80d254a7cdd8e1d6e"/></dir></dir><file name="Report.php" hash="addd972a4a28d141268f7cb3ad4a4ea6"/></dir><dir name="Customer"><dir name="Account"><file name="Details.php" hash="5bb9caf5b0a6e9584046f6af9ee4ae5f"/><file name="Grid.php" hash="3b170ed3f70422b3a64263535d3543e3"/></dir></dir><dir name="Form"><file name="Laybuy.php" hash="cbf8b96d0fa26d4b772bafd021e3fc83"/></dir><dir name="Info"><file name="Laybuy.php" hash="00dca1578594e6ec2d5f3ee9004d12fe"/></dir><dir name="Revise"><file name="Redirect.php" hash="6f63613d0fe5540a296804c14263a614"/></dir><dir name="Standard"><file name="Docalc.php" hash="42b2b63a23577c888cccc5f6c20b8867"/><file name="Redirect.php" hash="306a88ff75d35c18157dc5dceb02c06f"/></dir></dir><dir name="Helper"><file name="Config.php" hash="53fbdb4b5b16b587716c8073616b9cd2"/><file name="Data.php" hash="d8a8c87303f9cabc2760674b5431ab7a"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Report"><file name="Collection.php" hash="a3e133f1128200662330a5e21a94c809"/></dir><file name="Report.php" hash="25568238c401ab5e5768596fb76f7ef8"/><dir name="Revise"><file name="Collection.php" hash="2a502f75e4634e4f231f93226ef49b8a"/></dir><file name="Revise.php" hash="cd1a424882417e0ec94561a8cca378e8"/><file name="Setup.php" hash="261838defadf805c7ee29768f6ea8cec"/></dir><file name="Observer.php" hash="3c656455c97e1560a20dd0dc96cbea52"/><file name="Report.php" hash="d910a81e6b242cba1d4b58c72929f25e"/><file name="Revise.php" hash="225c67ee5ff3e9646785ee4342822c82"/><file name="Standard.php" hash="9001ad7fe1724ba74731e1332e900bb5"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="8d6e6dc1c3265307eed7a829031dd5f3"/></dir><dir name="Source"><file name="Categories.php" hash="92c61dba3c23e7838cddbaaee8f21d05"/><file name="FetchingSchedule.php" hash="4f3e5aec5a17991d1625d6f17c0f7d32"/><file name="Groups.php" hash="87a205676d93d59a26d1d7bb69266991"/></dir></dir></dir></dir><file name="README.txt" hash="7930d4ac1e8f9957bb2052983eab4340"/><dir name="controllers"><dir name="Adminhtml"><file name="ReportController.php" hash="9f6ad0f5236c656a02ed8bdc0508712f"/></dir><file name="ReportController.php" hash="0ae0fee6659f30a811f151c5007abaf8"/><file name="ReviseController.php" hash="17fdf479c5ca52306e3fb27bc832d37b"/><file name="StandardController.php" hash="954de8828f3adc8e6c2b9a14fb2e4be3"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5bf10fdf706702d95790a1f72d94c27f"/><file name="config.xml" hash="8be86c9f4964a1908753425867e6eef0"/><file name="system.xml" hash="5dbf398d7c13be1f181a0214c45cb43d"/></dir><dir name="sql"><dir name="laybuy_setup"><file name="mysql4-install-0.1.0.php" hash="68e359cd24b6051d0c2a91daad899d71"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="bec5e37090cb5a6da6c8ba3652a8bd32"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="97aa7a2a8c91e46c896a6d04d9554aeb"/><file name="mysql4-upgrade-0.3.0-0.4.0.php" hash="9b147158166b94d52e0cfff369ce965c"/><file name="mysql4-upgrade-0.4.0-0.5.0.php" hash="7626925b0cac03d0918eb6b1d51e6d19"/><file name="mysql4-upgrade-0.5.0-0.6.0.php" hash="bc96daed76ca1f04b1eb422508bc3a4b"/><file name="mysql4-upgrade-0.6.0-0.7.0.php" hash="6aa013f47e3b78e4d78e2cba9b471cd4"/><file name="mysql4-upgrade-0.7.0-0.8.0.php" hash="c2ea0f16c8f1e0dc7412a6a0fda1c622"/><file name="mysql4-upgrade-0.8.0-0.9.0.php" hash="d98ba6bef5f4f46ca741d5db014686f1"/></dir></dir><file name="README.txt" hash="7930d4ac1e8f9957bb2052983eab4340"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="laybuy.xml" hash="e84c7d0c08f1aa7505da3d1c812e5757"/></dir><dir name="template"><dir name="laybuy"><dir name="checkout"><dir name="onepage"><dir name="review"><file name="button.phtml" hash="097a1d7d5e5f7e3da67f2a7179d8c5bd"/></dir></dir></dir><dir name="customer"><dir name="account"><file name="details.phtml" hash="965a58454b4b3cdcc115d78e595f7c33"/><file name="grid.phtml" hash="2dc802991a69b459f263f4e78c657549"/></dir></dir><dir name="form"><file name="extra.phtml" hash="9765d41880b42cb54aaf8ff6e2e4ce65"/><file name="laybuy.phtml" hash="a08d460805905b8b930808d18493afee"/></dir><dir name="info"><file name="default.phtml" hash="3efc2eb9f35b47e6e888a726236bf273"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="laybuy.xml" hash="6b0e4b3c2d316ab76f1bd9b95732e84e"/></dir><dir name="template"><dir name="laybuy"><dir name="info"><file name="default.phtml" hash="a9dfb322a83df7bc53bb2a64c6f192e3"/></dir><file name="notification.phtml" hash="3b1d4be6c68480b0637e805214725372"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ced_LayBuy.xml" hash="394d4e115e1955ba12681f6a81cb118d"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Ced_LayBuy.csv" hash="f79a1a6ca61c5e7a7463c380eb00896d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="laybuy"><file name="tooltip.css" hash="ece078bf3d8bb27db4a616fdad505671"/></dir></dir><dir name="images"><dir name="laybuy"><file name="closeBtn.png" hash="b0be9d9ef1053c79b0ebdcef83b53f44"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="laybuy"><file name="jquery.atooltip.js" hash="5ad78b7e8ac539053ff56a2ea25e4d4c"/><file name="jquery.min.js" hash="41ab3fafa358a66f764b91d072f16615"/></dir></dir></target></contents>
38
  <compatible/>
39
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
40
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ced_LayBuy</name>
4
+ <version>2.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
18
  Merchants however only deliver the product or service after receipt of the final instalment payment&#xD;
19
  &#xD;
20
  This effectively increases sales and radically improves cash flow where all the customer monies are paid directly into your PayPal account</description>
21
+ <notes>1. New secure communication protocal,&#xD;
22
+ .</notes>
 
 
 
 
 
 
 
 
 
 
 
23
  <authors><author><name>Warrin</name><user>Warrin</user><email>warrin@lay-buys.com</email></author><author><name>Asheesh Singh</name><user>asheeshsingh</user><email>asheeshsingh@cedcoss.com</email></author></authors>
24
+ <date>2014-09-30</date>
25
+ <time>05:33:43</time>
26
+ <contents><target name="magelocal"><dir name="Ced"><dir name="LayBuy"><dir name="Block"><dir name="Adminhtml"><file name="Docalc.php" hash="c12af05bee0d480ac49835b46ca8011e"/><dir name="Report"><dir name="Details"><file name="Form.php" hash="e0ce57d85efc14656d4294021e5f5257"/></dir><file name="Details.php" hash="c0762893abdbf1b2116fce3e53c44c6e"/><dir name="Edit"><file name="Form.php" hash="4aec5647464253d46fbe16a6c50f53b6"/></dir><file name="Edit.php" hash="c8ce824adb2cbea4f8d487b9618a50cb"/><file name="Grid.php" hash="66ce8aee59763c2aa430c3952c463701"/><dir name="Renderer"><file name="Email.php" hash="8e6c0938d80f629cd285303018945ea1"/><file name="Order.php" hash="51a2ba685b652f69df633ccfa4b5900a"/><file name="Record.php" hash="95eb9f836a50f3f80d254a7cdd8e1d6e"/></dir></dir><file name="Report.php" hash="addd972a4a28d141268f7cb3ad4a4ea6"/></dir><dir name="Customer"><dir name="Account"><file name="Details.php" hash="5bb9caf5b0a6e9584046f6af9ee4ae5f"/><file name="Grid.php" hash="3b170ed3f70422b3a64263535d3543e3"/></dir></dir><dir name="Form"><file name="Laybuy.php" hash="cbf8b96d0fa26d4b772bafd021e3fc83"/></dir><dir name="Info"><file name="Laybuy.php" hash="00dca1578594e6ec2d5f3ee9004d12fe"/></dir><dir name="Revise"><file name="Redirect.php" hash="6f63613d0fe5540a296804c14263a614"/></dir><dir name="Standard"><file name="Docalc.php" hash="42b2b63a23577c888cccc5f6c20b8867"/><file name="Redirect.php" hash="bdf403ef8c7c290ce0af83cdd172dcb7"/></dir></dir><dir name="Helper"><file name="Config.php" hash="360b6125612be9de5cd0e3b69f4422c2"/><file name="Data.php" hash="4fdcb50125cb26a6325d6631535cec2d"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Report"><file name="Collection.php" hash="a3e133f1128200662330a5e21a94c809"/></dir><file name="Report.php" hash="25568238c401ab5e5768596fb76f7ef8"/><dir name="Revise"><file name="Collection.php" hash="2a502f75e4634e4f231f93226ef49b8a"/></dir><file name="Revise.php" hash="cd1a424882417e0ec94561a8cca378e8"/><file name="Setup.php" hash="261838defadf805c7ee29768f6ea8cec"/></dir><file name="Observer.php" hash="a0f4557a58810d2b133e9dcfbdcb3528"/><file name="Report.php" hash="b64e12d511c88627128624b87588340a"/><file name="Revise.php" hash="225c67ee5ff3e9646785ee4342822c82"/><file name="Standard.php" hash="4a0f34e27e569f89d02e33f1193ca10d"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="24c8fcf93531c9877d03f2eebde2e2dd"/></dir><dir name="Source"><file name="Allowspecificcategory.php" hash="0463f2be60a2695e4f76411c979b6bc8"/><file name="Allowspecificgroup.php" hash="a27c9bf1231a59a8f38668b525c420ba"/><file name="Categories.php" hash="92c61dba3c23e7838cddbaaee8f21d05"/><file name="FetchingSchedule.php" hash="4f3e5aec5a17991d1625d6f17c0f7d32"/><file name="Groups.php" hash="87a205676d93d59a26d1d7bb69266991"/></dir></dir></dir></dir><file name="README.txt" hash="7930d4ac1e8f9957bb2052983eab4340"/><dir name="controllers"><dir name="Adminhtml"><file name="ReportController.php" hash="fede1f1074b42ced99ec53b554b295ad"/></dir><file name="ReportController.php" hash="e2c5e9ce734b2c3320eb503e05baecae"/><file name="ReviseController.php" hash="184c41ea0fe81914707cdc460b8d69b9"/><file name="StandardController.php" hash="0c4233798441091d6749766c0a894789"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5bf10fdf706702d95790a1f72d94c27f"/><file name="config.xml" hash="238880a096018f7c72d5dfaa6b4d2e89"/><file name="system.xml" hash="40199bed5b280a9db3152ac2ab9214a9"/></dir><dir name="sql"><dir name="laybuy_setup"><file name="mysql4-install-0.1.0.php" hash="68e359cd24b6051d0c2a91daad899d71"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="bec5e37090cb5a6da6c8ba3652a8bd32"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="97aa7a2a8c91e46c896a6d04d9554aeb"/><file name="mysql4-upgrade-0.3.0-0.4.0.php" hash="9b147158166b94d52e0cfff369ce965c"/><file name="mysql4-upgrade-0.4.0-0.5.0.php" hash="7626925b0cac03d0918eb6b1d51e6d19"/><file name="mysql4-upgrade-0.5.0-0.6.0.php" hash="bc96daed76ca1f04b1eb422508bc3a4b"/><file name="mysql4-upgrade-0.6.0-0.7.0.php" hash="6aa013f47e3b78e4d78e2cba9b471cd4"/><file name="mysql4-upgrade-0.7.0-0.8.0.php" hash="c2ea0f16c8f1e0dc7412a6a0fda1c622"/><file name="mysql4-upgrade-0.8.0-0.9.0.php" hash="d98ba6bef5f4f46ca741d5db014686f1"/><file name="mysql4-upgrade-0.9.0-1.0.0.php" hash="a20364c9f3a1b2a6a7e33a2e2f03bd60"/></dir></dir><file name="README.txt" hash="7930d4ac1e8f9957bb2052983eab4340"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="laybuy.xml" hash="963cc90317ac79c032f2530eca1813ba"/></dir><dir name="template"><dir name="laybuy"><dir name="checkout"><dir name="onepage"><dir name="review"><file name="button.phtml" hash="a1e678a76d674b223e944bdd4de0625a"/></dir></dir></dir><dir name="customer"><dir name="account"><file name="details.phtml" hash="965a58454b4b3cdcc115d78e595f7c33"/><file name="grid.phtml" hash="2dc802991a69b459f263f4e78c657549"/></dir></dir><dir name="form"><file name="extra.phtml" hash="e089ba0a3bd4ff1c0bc631c88ba32dd2"/><file name="laybuy.phtml" hash="5e82c6add5420c3b17f4a48a18536d3a"/></dir><dir name="info"><file name="default.phtml" hash="bda3ccbd6cc907da7238a2d5c25a2fc7"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="laybuy.xml" hash="b60d76e466dac9154654041350d5e829"/></dir><dir name="template"><dir name="laybuy"><dir name="info"><file name="default.phtml" hash="a9dfb322a83df7bc53bb2a64c6f192e3"/></dir><file name="notification.phtml" hash="87dfcd44b9900cef1a665b3debf22f96"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ced_LayBuy.xml" hash="394d4e115e1955ba12681f6a81cb118d"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Ced_LayBuy.csv" hash="f79a1a6ca61c5e7a7463c380eb00896d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="laybuy"><file name="tooltip.css" hash="ece078bf3d8bb27db4a616fdad505671"/></dir></dir><dir name="images"><dir name="laybuy"><file name="closeBtn.png" hash="b0be9d9ef1053c79b0ebdcef83b53f44"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="laybuy"><file name="jquery.atooltip.js" hash="5ad78b7e8ac539053ff56a2ea25e4d4c"/><file name="jquery.min.js" hash="41ab3fafa358a66f764b91d072f16615"/></dir></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
29
  </package>