HC_PayByFinance - Version 1.0.5.1

Version Notes

Change Log:
* Remove JavaScript warnings
* HC-195 Deposit rounding issue
* HC-188 Rounding Down the finance amount
* HC-175 Fix illegal chars in product name
* HC-156 Finance offer on product lists
* HC-173 implement changes according to updated specification (notification url)
* HC-201 Invoice base_grand_total calculation fix

Download this release

Release Info

Developer Sandor Czettner
Extension HC_PayByFinance
Version 1.0.5.1
Comparing to
See all releases


Code changes from version 1.0.4.1 to 1.0.5.1

app/code/local/HC/PayByFinance/Block/Product/List/Finance.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Hitachi Capital Pay By Finance
4
+ *
5
+ * Hitachi Capital Pay By Finance Extension
6
+ *
7
+ * PHP version >= 5.3.*
8
+ *
9
+ * @category HC
10
+ * @package PayByFinance
11
+ * @author Healthy Websites <support@healthywebsites.co.uk>
12
+ * @copyright 2014 Hitachi Capital
13
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
14
+ * @link http://www.healthywebsites.co.uk/
15
+ *
16
+ */
17
+
18
+ /**
19
+ * Finance display on product lists
20
+ *
21
+ * @uses Mage_Core_Block_Template
22
+ *
23
+ * @category HC
24
+ * @package PayByFinance
25
+ * @author Healthy Websites <support@healthywebsites.co.uk>
26
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
27
+ * @link http://www.healthywebsites.co.uk/
28
+ */
29
+ class HC_PayByFinance_Block_Product_List_Finance extends Mage_Core_Block_Template
30
+ {
31
+
32
+ /**
33
+ * Current product has finance?
34
+ *
35
+ * @return bool
36
+ */
37
+ public function hasFinance()
38
+ {
39
+ $product = $this->getProduct();
40
+ $finaceFromPrice = $product->getData('finance_from_price');
41
+
42
+ return (bool) $finaceFromPrice;
43
+ }
44
+
45
+ /**
46
+ * Format the minimum installment price
47
+ *
48
+ * @return string
49
+ */
50
+ public function getFinanceFromPrice()
51
+ {
52
+ $product = $this->getProduct();
53
+ $finaceFromPrice = $product->getData('finance_from_price');
54
+ $price = Mage::helper('core')->currency($finaceFromPrice, true, false);
55
+
56
+ return $price;
57
+ }
58
+ }
app/code/local/HC/PayByFinance/Helper/Data.php CHANGED
@@ -35,6 +35,7 @@ class HC_PayByFinance_Helper_Data extends Mage_Core_Helper_Data
35
  const XML_PATH_INCLUDE_SHIPPING = 'hc_paybyfinance/general/include_shipping';
36
  const XML_PATH_ADDRESS_CHECKED = 'hc_paybyfinance/general/address_checked';
37
  const XML_PATH_WIZARD = 'hc_paybyfinance/general/wizard';
 
38
  const XML_PATH_STATUS_ACCEPTED = 'hc_paybyfinance/order_status/accepted';
39
  const XML_PATH_STATUS_REFERRED = 'hc_paybyfinance/order_status/referred';
40
  const XML_PATH_STATUS_DECLINED = 'hc_paybyfinance/order_status/declined';
@@ -212,15 +213,12 @@ class HC_PayByFinance_Helper_Data extends Mage_Core_Helper_Data
212
  if (!file_exists(Mage::getBaseDir('var').'/log/paybyfinance')) {
213
  mkdir(Mage::getBaseDir('var').'/log/paybyfinance');
214
  }
 
215
  if ($type == 'log') {
216
  Mage::log($data, null, self::ERROR_LOG_PATH_LOG);
217
- }
218
-
219
- if ($type == 'post') {
220
  Mage::log($data, null, self::ERROR_LOG_PATH_POST);
221
- }
222
-
223
- if ($type == 'notification') {
224
  Mage::log($data, null, self::ERROR_LOG_PATH_NOTIFICATION);
225
  }
226
 
@@ -296,6 +294,20 @@ class HC_PayByFinance_Helper_Data extends Mage_Core_Helper_Data
296
  return $text;
297
  }
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  /**
300
  * Processing user input for extra security, removing php open tags
301
  *
35
  const XML_PATH_INCLUDE_SHIPPING = 'hc_paybyfinance/general/include_shipping';
36
  const XML_PATH_ADDRESS_CHECKED = 'hc_paybyfinance/general/address_checked';
37
  const XML_PATH_WIZARD = 'hc_paybyfinance/general/wizard';
38
+ const XML_PATH_PROCESS_ORDER = 'hc_paybyfinance/general/process_order';
39
  const XML_PATH_STATUS_ACCEPTED = 'hc_paybyfinance/order_status/accepted';
40
  const XML_PATH_STATUS_REFERRED = 'hc_paybyfinance/order_status/referred';
41
  const XML_PATH_STATUS_DECLINED = 'hc_paybyfinance/order_status/declined';
213
  if (!file_exists(Mage::getBaseDir('var').'/log/paybyfinance')) {
214
  mkdir(Mage::getBaseDir('var').'/log/paybyfinance');
215
  }
216
+
217
  if ($type == 'log') {
218
  Mage::log($data, null, self::ERROR_LOG_PATH_LOG);
219
+ } elseif ($type == 'post') {
 
 
220
  Mage::log($data, null, self::ERROR_LOG_PATH_POST);
221
+ } elseif ($type == 'notification') {
 
 
222
  Mage::log($data, null, self::ERROR_LOG_PATH_NOTIFICATION);
223
  }
224
 
294
  return $text;
295
  }
296
 
297
+ /**
298
+ * Sanitize Product Name
299
+ * Allow chars: 0-9 A-Z a-z . - _ ( ) + @ : / ? '
300
+ *
301
+ * @param string $productName Product name
302
+ *
303
+ * @return string Cleaned string
304
+ */
305
+ public function sanitizeProductName($productName)
306
+ {
307
+ $cleanedName = preg_replace('/[^a-zA-Z0-9\s@\.\-\(\)\+:\/\?\']/', '', $productName);
308
+ return $cleanedName;
309
+ }
310
+
311
  /**
312
  * Processing user input for extra security, removing php open tags
313
  *
app/code/local/HC/PayByFinance/Helper/Notification.php CHANGED
@@ -29,6 +29,44 @@
29
  class HC_PayByFinance_Helper_Notification extends Mage_Core_Helper_Data
30
  {
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * Process notification requests
34
  *
@@ -40,48 +78,37 @@ class HC_PayByFinance_Helper_Notification extends Mage_Core_Helper_Data
40
  */
41
  public function processOrder($order, $parameters)
42
  {
 
43
  $orderStatus = $order->getStatus();
44
  $orderState = $order->getState();
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- switch ($parameters['status']) {
47
- case 'S':
48
- $message = 'Status: Awaiting dispatch of goods. authorisationcode: '
49
- . $parameters['authorisationcode'];
50
- $orderStatus = Mage_Sales_Model_Order::STATE_PROCESSING;
51
- $order->setTotalPaid(
52
- $order->getTotalPaid() + abs($order->getFinanceAmount())
53
- );
54
- $order->setBaseTotalPaid(
55
- $order->getBaseTotalPaid() + abs($order->getFinanceAmount())
56
- );
57
- break;
58
- case 'A':
59
- $message = 'Status: Accepted';
60
- break;
61
- case 'R':
62
- $message = 'Status: Referred for manual underwriting';
63
- break;
64
- case 'D':
65
- $message = 'Status: Declined';
66
- break;
67
- case 'G':
68
- $message = 'Status: Goods dispatched';
69
- break;
70
- case 'C':
71
- $message = 'Status: Cancelled';
72
- $orderState = $orderStatus = Mage_Sales_Model_Order::STATE_CANCELED;
73
- break;
74
- case 'F':
75
- $message = 'Status: Fraud';
76
- $orderState = $orderStatus = Mage_Sales_Model_Order::STATE_CANCELED;
77
- break;
78
- default:
79
- $message = 'Status: Unknown: ' . $parameters['status'];
80
- break;
81
  }
82
 
83
  $message = "<strong>Hitachi Capital Pay By Finance"
84
- . "</strong> notification received: " . $message;
85
  $order->setFinanceStatus($status)
86
  ->setFinanceApplicationNo($applicationNo)
87
  ->setState($orderState, $orderStatus)
29
  class HC_PayByFinance_Helper_Notification extends Mage_Core_Helper_Data
30
  {
31
 
32
+ private $statuses = array(
33
+ 'PENDING' => 'An Application decision has not yet been reached.',
34
+ 'ACCEPT' => 'The application has been accepted.',
35
+ 'DECLINE' => 'The application has been declined.',
36
+ 'REFER' => 'The application has been referred to the underwriting
37
+ department.',
38
+ 'CONDITIONAL_ACCEPT' => 'The application has been accepted but further
39
+ information is needed before it can be completed.',
40
+ 'FATAL_ERROR' => 'A fatal error has occured.',
41
+ 'SUPPLIER_CANCELLED' => 'The supplier/retailer has cancelled the application.',
42
+ 'HCCF_CANCELLED' => 'Hitachi Capital has cancelled the application.',
43
+ 'CONSUMER_CANCELLED' => 'The customer has cancelled the application.',
44
+ 'AMEND_CANCELLED' => 'This application has been cancelled since a new
45
+ one has been created sa an amendment of this application.',
46
+ 'PAID' => 'The application has been paid.',
47
+ 'COOLING_OFF' => 'The application is in a cooling off period.',
48
+ 'ON_HOLD' => 'The application is on hold.',
49
+ 'SEND_BACK' => 'Documents have been sent back; awaiting their return',
50
+ );
51
+
52
+ // These statuses will cancel the order.
53
+ protected $cancelStatus = array(
54
+ 'SUPPLIER_CANCELLED',
55
+ 'HCCF_CANCELLED',
56
+ 'CONSUMER_CANCELLED',
57
+ 'AMEND_CANCELLED',
58
+ );
59
+
60
+ /**
61
+ * Get notification statuses
62
+ *
63
+ * @return array Statuses
64
+ */
65
+ public function getStatuses()
66
+ {
67
+ return $this->statuses;
68
+ }
69
+
70
  /**
71
  * Process notification requests
72
  *
78
  */
79
  public function processOrder($order, $parameters)
80
  {
81
+ $helper = Mage::helper('paybyfinance');
82
  $orderStatus = $order->getStatus();
83
  $orderState = $order->getState();
84
+ $applicationNo = $parameters['applicationNumber'];
85
+ $status = strtoupper($parameters['status']);
86
+
87
+ if (!array_key_exists($status, $this->statuses)) {
88
+ $message = 'Status Unknown: "' . $parameters['status'].'"';
89
+ } else {
90
+ $message = $this->statuses[$status];
91
+ }
92
+
93
+ if (in_array($status, $this->cancelStatus)) {
94
+ $orderState = $orderStatus = Mage_Sales_Model_Order::STATE_CANCELED;
95
+ }
96
 
97
+ $canShipStatus = Mage::getStoreConfig($helper::XML_PATH_PROCESS_ORDER);
98
+ if ($status == $canShipStatus) {
99
+ $message .= ' Awaiting dispatch of goods. authorisationNumber: '
100
+ . $parameters['authorisationNumber'];
101
+ $orderState = $orderStatus = Mage_Sales_Model_Order::STATE_PROCESSING;
102
+ $order->setTotalPaid(
103
+ $order->getTotalPaid() + abs($order->getFinanceAmount())
104
+ );
105
+ $order->setBaseTotalPaid(
106
+ $order->getBaseTotalPaid() + abs($order->getFinanceAmount())
107
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  }
109
 
110
  $message = "<strong>Hitachi Capital Pay By Finance"
111
+ . "</strong> notification received: " . $status . ': ' . $message;
112
  $order->setFinanceStatus($status)
113
  ->setFinanceApplicationNo($applicationNo)
114
  ->setState($orderState, $orderStatus)
app/code/local/HC/PayByFinance/Model/Calculator.php CHANGED
@@ -29,6 +29,7 @@
29
  class HC_PayByFinance_Model_Calculator extends Varien_Object
30
  {
31
  private $_service;
 
32
 
33
  /**
34
  * Set service by id
@@ -82,13 +83,16 @@ class HC_PayByFinance_Model_Calculator extends Varien_Object
82
  /**
83
  * Calculating monthly payments
84
  *
85
- * @param float $amount Credit amount
 
86
  *
87
  * @return float Monthly installment
88
  */
89
- public function calcMonthlyPayment($amount)
90
  {
91
- $service = $this->getService();
 
 
92
  // No rounding issues, rounding always down.
93
  $monthlyPayment = floor(($amount * $service->getMultiplier()) * 100) / 100;
94
 
@@ -98,13 +102,16 @@ class HC_PayByFinance_Model_Calculator extends Varien_Object
98
  /**
99
  * Calculating monthly payments (Interst Free, type=32)
100
  *
101
- * @param float $amount Credit amount
 
102
  *
103
  * @return float Monthly installment
104
  */
105
- public function calcMonthlyPaymentInterestFree($amount)
106
  {
107
- $service = $this->getService();
 
 
108
  $monthlyPayment = floor(($amount / $service->getTerm()) * 100) / 100;
109
 
110
  return $monthlyPayment;
@@ -124,7 +131,9 @@ class HC_PayByFinance_Model_Calculator extends Varien_Object
124
  $giftcard = abs($this->getGiftcard()); // Giftcard (EE) is a positive value
125
 
126
  $depositAmount = ($amount - $discount - $giftcard) * ($deposit / 100);
 
127
  $financeAmount = $amount - $depositAmount - $discount - $giftcard;
 
128
 
129
  if ($service->getType() == 32) {
130
  $monthlyPayment = $this->calcMonthlyPaymentInterestFree($financeAmount);
@@ -141,4 +150,48 @@ class HC_PayByFinance_Model_Calculator extends Varien_Object
141
 
142
  return $results;
143
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
29
  class HC_PayByFinance_Model_Calculator extends Varien_Object
30
  {
31
  private $_service;
32
+ private $_allServices;
33
 
34
  /**
35
  * Set service by id
83
  /**
84
  * Calculating monthly payments
85
  *
86
+ * @param float $amount Credit amount
87
+ * @param HC_PayByFinance_Model_Service $service Service
88
  *
89
  * @return float Monthly installment
90
  */
91
+ public function calcMonthlyPayment($amount, $service = null)
92
  {
93
+ if ($service === null) {
94
+ $service = $this->getService();
95
+ }
96
  // No rounding issues, rounding always down.
97
  $monthlyPayment = floor(($amount * $service->getMultiplier()) * 100) / 100;
98
 
102
  /**
103
  * Calculating monthly payments (Interst Free, type=32)
104
  *
105
+ * @param float $amount Credit amount
106
+ * @param HC_PayByFinance_Model_Service $service Service
107
  *
108
  * @return float Monthly installment
109
  */
110
+ public function calcMonthlyPaymentInterestFree($amount, $service = null)
111
  {
112
+ if ($service === null) {
113
+ $service = $this->getService();
114
+ }
115
  $monthlyPayment = floor(($amount / $service->getTerm()) * 100) / 100;
116
 
117
  return $monthlyPayment;
131
  $giftcard = abs($this->getGiftcard()); // Giftcard (EE) is a positive value
132
 
133
  $depositAmount = ($amount - $discount - $giftcard) * ($deposit / 100);
134
+ $depositAmount = round($depositAmount, 2);
135
  $financeAmount = $amount - $depositAmount - $discount - $giftcard;
136
+ $financeAmount = floor($financeAmount * 100) / 100;
137
 
138
  if ($service->getType() == 32) {
139
  $monthlyPayment = $this->calcMonthlyPaymentInterestFree($financeAmount);
150
 
151
  return $results;
152
  }
153
+
154
+ /**
155
+ * Get cached all services collection instance
156
+ *
157
+ * @return HC_PayByFinance_Model_Mysql4_Service_Collection Services collection
158
+ */
159
+ public function getAllServices()
160
+ {
161
+ if (!$this->_allServices) {
162
+ $this->_allServices = Mage::getModel('paybyfinance/service')->getCollection();
163
+ }
164
+
165
+ return $this->_allServices;
166
+ }
167
+
168
+ /**
169
+ * Get lowest monthly installment based on product price from all available services
170
+ *
171
+ * @param float $price Product price
172
+ *
173
+ * @return float|bool Cheapest monthly installment, false if no service available
174
+ */
175
+ public function getLowestMonthlyInstallment($price)
176
+ {
177
+ $minInstallment = false;
178
+ foreach ($this->getAllServices() as $service) {
179
+ $depositAmount = ($price) * ($service->getDeposit() / 100);
180
+ $depositAmount = round($depositAmount, 2);
181
+ $financeAmount = $price - $depositAmount;
182
+ $financeAmount = floor($financeAmount * 100) / 100;
183
+
184
+ if ($service->getType() == 32) {
185
+ $installment = $this->calcMonthlyPaymentInterestFree($financeAmount, $service);
186
+ } else {
187
+ $installment = $this->calcMonthlyPayment($financeAmount, $service);
188
+ }
189
+
190
+ if ($minInstallment === false || $minInstallment > $installment) {
191
+ $minInstallment = $installment;
192
+ }
193
+ }
194
+
195
+ return $minInstallment;
196
+ }
197
  }
app/code/local/HC/PayByFinance/Model/Config/Source/Notification/Status.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Hitachi Capital Pay By Finance
4
+ *
5
+ * Hitachi Capital Pay By Finance Extension
6
+ *
7
+ * PHP version >= 5.3.*
8
+ *
9
+ * @category HC
10
+ * @package PayByFinance
11
+ * @author Healthy Websites <support@healthywebsites.co.uk>
12
+ * @copyright 2015 Hitachi Capital
13
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
14
+ * @link http://www.healthywebsites.co.uk/
15
+ *
16
+ */
17
+
18
+ /**
19
+ * Provides the list statuses sent by Hitachi Capital during notification.
20
+ *
21
+ * @category HC
22
+ * @package PayByFinance
23
+ * @author Healthy Websites <support@healthywebsites.co.uk>
24
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
25
+ * @link http://www.healthywebsites.co.uk/
26
+ */
27
+ class HC_PayByFinance_Model_Config_Source_Notification_Status
28
+ {
29
+ /**
30
+ * toOptionArray
31
+ *
32
+ * @return array Indexed array of options.
33
+ */
34
+ public function toOptionArray()
35
+ {
36
+ $options = array(
37
+ 'PAID' => 'PAID: The application has been paid.',
38
+ 'COOLING_OFF' => 'COOLING_OFF: The application is in a cooling off period.',
39
+ );
40
+
41
+ return $options;
42
+ }
43
+ }
app/code/local/HC/PayByFinance/Model/Observer.php CHANGED
@@ -215,4 +215,28 @@ class HC_PayByFinance_Model_Observer
215
  return $this;
216
  }
217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  }
215
  return $this;
216
  }
217
 
218
+ /**
219
+ * Calculate lowest finance instalment based on product price and available
220
+ * services.
221
+ *
222
+ * @param Varien_Event_Observer $observer Observer
223
+ *
224
+ * @return void
225
+ */
226
+ public function collectionLoadAfter(Varien_Event_Observer $observer)
227
+ {
228
+ $helper = Mage::helper('paybyfinance');
229
+ $calculator = Mage::getModel('paybyfinance/calculator');
230
+
231
+ $collection = $observer->getCollection();
232
+
233
+ foreach ($collection as $product) {
234
+ if ($helper->isProductEligible($product)) {
235
+ $product->setData('has_finance', true);
236
+ $minInstallment = $calculator->getLowestMonthlyInstallment($product->getPrice());
237
+ $product->setData('finance_from_price', $minInstallment);
238
+ }
239
+ }
240
+ }
241
+
242
  }
app/code/local/HC/PayByFinance/Model/Sales/Order/Creditmemo/Financeamount.php CHANGED
@@ -56,7 +56,7 @@ class HC_PayByFinance_Model_Sales_Order_Creditmemo_FInanceamount
56
 
57
  $creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $creditmemo->getFinanceAmount());
58
  $creditmemo->setBaseGrandTotal(
59
- $creditmemo->getBaseGrandTotal() - $creditmemo->getBaseFinanceAmount()
60
  );
61
 
62
  return $this;
56
 
57
  $creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $creditmemo->getFinanceAmount());
58
  $creditmemo->setBaseGrandTotal(
59
+ $creditmemo->getBaseGrandTotal() + $creditmemo->getBaseFinanceAmount()
60
  );
61
 
62
  return $this;
app/code/local/HC/PayByFinance/Model/Sales/Order/Invoice/Financeamount.php CHANGED
@@ -56,7 +56,7 @@ class HC_PayByFinance_Model_Sales_Order_Invoice_Financeamount
56
 
57
  $invoice->setGrandTotal($invoice->getGrandTotal() + $invoice->getFinanceAmount());
58
  $invoice->setBaseGrandTotal(
59
- $invoice->getBaseGrandTotal() - $invoice->getBaseFinanceAmount()
60
  );
61
 
62
  return $this;
56
 
57
  $invoice->setGrandTotal($invoice->getGrandTotal() + $invoice->getFinanceAmount());
58
  $invoice->setBaseGrandTotal(
59
+ $invoice->getBaseGrandTotal() + $invoice->getBaseFinanceAmount()
60
  );
61
 
62
  return $this;
app/code/local/HC/PayByFinance/controllers/CheckoutController.php CHANGED
@@ -74,9 +74,10 @@ class HC_PayByFinance_CheckoutController extends Mage_Core_Controller_Front_Acti
74
  $productCount = 0;
75
  $additionalItems = 0;
76
  foreach ($eligibleProducts as $key => $product) {
 
77
  $productsInForm['gc' . $productCount] = $product->getSku();
78
  $productsInForm['pc' . $productCount] = $product->getSku();
79
- $productsInForm['gd' . $productCount] = $product->getName();
80
  $productsInForm['q' . $productCount] = intval($product->getQtyOrdered());
81
  $productsInForm['gp' . $productCount] =
82
  floor($product->getPriceInclTax() * 10000) / 10000;
74
  $productCount = 0;
75
  $additionalItems = 0;
76
  foreach ($eligibleProducts as $key => $product) {
77
+ $productName = $helper->sanitizeProductName($product->getName());
78
  $productsInForm['gc' . $productCount] = $product->getSku();
79
  $productsInForm['pc' . $productCount] = $product->getSku();
80
+ $productsInForm['gd' . $productCount] = $productName;
81
  $productsInForm['q' . $productCount] = intval($product->getQtyOrdered());
82
  $productsInForm['gp' . $productCount] =
83
  floor($product->getPriceInclTax() * 10000) / 10000;
app/code/local/HC/PayByFinance/controllers/NotificationController.php CHANGED
@@ -38,10 +38,10 @@ class HC_PayByFinance_NotificationController extends Mage_Core_Controller_Front_
38
  $parameters = $this->getRequest()->getParams();
39
  $helper = Mage::helper('paybyfinance');
40
 
41
- if (!array_key_exists('order_ref', $parameters)
42
- || !is_numeric($parameters['order_ref'])
43
  || !array_key_exists('status', $parameters)
44
- || !array_key_exists('applicationNo', $parameters)
45
  ) {
46
  $helper->log(
47
  'Error in notification parameters: ' . $helper->arrayDump($parameters),
@@ -51,7 +51,7 @@ class HC_PayByFinance_NotificationController extends Mage_Core_Controller_Front_
51
  die();
52
  }
53
 
54
- $orderId = $parameters['order_ref'];
55
 
56
  $order = Mage::getModel('sales/order')->load($orderId);
57
  if (!$order->getId()) {
38
  $parameters = $this->getRequest()->getParams();
39
  $helper = Mage::helper('paybyfinance');
40
 
41
+ if (!array_key_exists('supplierReference', $parameters)
42
+ || !is_numeric($parameters['supplierReference'])
43
  || !array_key_exists('status', $parameters)
44
+ || !array_key_exists('applicationNumber', $parameters)
45
  ) {
46
  $helper->log(
47
  'Error in notification parameters: ' . $helper->arrayDump($parameters),
51
  die();
52
  }
53
 
54
+ $orderId = $parameters['supplierReference'];
55
 
56
  $order = Mage::getModel('sales/order')->load($orderId);
57
  if (!$order->getId()) {
app/code/local/HC/PayByFinance/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <HC_PayByFinance>
5
- <version>1.0.4</version>
6
  </HC_PayByFinance>
7
  </modules>
8
  <global>
@@ -205,6 +205,17 @@
205
  </args>
206
  </hc_paybyfinance>
207
  </routers>
 
 
 
 
 
 
 
 
 
 
 
208
  </frontend>
209
 
210
  <adminhtml>
@@ -251,6 +262,7 @@
251
  <include_shipping>1</include_shipping>
252
  <address_checked>0</address_checked>
253
  <wizard>0</wizard>
 
254
  </general>
255
  <order_status>
256
  <accepted>finance_accepted</accepted>
2
  <config>
3
  <modules>
4
  <HC_PayByFinance>
5
+ <version>1.0.5</version>
6
  </HC_PayByFinance>
7
  </modules>
8
  <global>
205
  </args>
206
  </hc_paybyfinance>
207
  </routers>
208
+ <events>
209
+ <catalog_product_collection_load_after>
210
+ <observers>
211
+ <hc_paybyfinance_product_collection_load_after>
212
+ <type>singleton</type>
213
+ <class>paybyfinance/observer</class>
214
+ <method>collectionLoadAfter</method>
215
+ </hc_paybyfinance_product_collection_load_after>
216
+ </observers>
217
+ </catalog_product_collection_load_after>
218
+ </events>
219
  </frontend>
220
 
221
  <adminhtml>
262
  <include_shipping>1</include_shipping>
263
  <address_checked>0</address_checked>
264
  <wizard>0</wizard>
265
+ <process_order>PAID</process_order>
266
  </general>
267
  <order_status>
268
  <accepted>finance_accepted</accepted>
app/code/local/HC/PayByFinance/etc/system.xml CHANGED
@@ -102,6 +102,16 @@
102
  <show_in_website>1</show_in_website>
103
  <show_in_store>1</show_in_store>
104
  </wizard>
 
 
 
 
 
 
 
 
 
 
105
  </fields>
106
  </general>
107
  <order_status>
102
  <show_in_website>1</show_in_website>
103
  <show_in_store>1</show_in_store>
104
  </wizard>
105
+ <process_order>
106
+ <label>Process orders after received status</label>
107
+ <comment>Hitachi Capital sends statuses in notification, then this status will process the order</comment>
108
+ <frontend_type>select</frontend_type>
109
+ <source_model>paybyfinance/config_source_notification_status</source_model>
110
+ <sort_order>9</sort_order>
111
+ <show_in_default>1</show_in_default>
112
+ <show_in_website>1</show_in_website>
113
+ <show_in_store>1</show_in_store>
114
+ </process_order>
115
  </fields>
116
  </general>
117
  <order_status>
app/code/local/HC/PayByFinance/sql/paybyfinance_setup/{mysql4-install-1.0.4.php → mysql4-install-1.0.5.php} RENAMED
@@ -190,7 +190,7 @@ $setup->addAttribute(
190
  'comparable' => true,
191
  'visible_on_front' => false,
192
  'visible_in_advanced_search' => false,
193
- 'used_in_product_listing' => false,
194
  'used_for_sort_by' => false,
195
  'unique' => false,
196
  'apply_to' => '',
190
  'comparable' => true,
191
  'visible_on_front' => false,
192
  'visible_in_advanced_search' => false,
193
+ 'used_in_product_listing' => true,
194
  'used_for_sort_by' => false,
195
  'unique' => false,
196
  'apply_to' => '',
app/code/local/HC/PayByFinance/sql/paybyfinance_setup/mysql4-upgrade-1.0.4-1.0.5.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Hitachi Capital Pay By Finance
4
+ *
5
+ * Hitachi Capital Pay By Finance Extension
6
+ *
7
+ * PHP version >= 5.3.*
8
+ *
9
+ * @category HC
10
+ * @package PayByFinance
11
+ * @author Healthy Websites <support@healthywebsites.co.uk>
12
+ * @copyright 2014 Hitachi Capital
13
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
14
+ * @link http://www.healthywebsites.co.uk/
15
+ *
16
+ */
17
+
18
+ $updater = $this; // $this is class Mage_Eav_Model_Entity_Setup
19
+ $updater->startSetup();
20
+
21
+ $installer = Mage::getModel('eav/entity_setup', 'core_setup');
22
+ $entityTypeId = $installer->getEntityTypeId('catalog_product');
23
+
24
+ // replace <my_attribute_code> with your attribute code
25
+ $idAttribute = $installer->getAttribute($entityTypeId, 'paybyfinance_enable', 'attribute_id');
26
+ $installer->updateAttribute(
27
+ $entityTypeId,
28
+ $idAttribute,
29
+ array(
30
+ 'used_in_product_listing' => 1
31
+ )
32
+ );
33
+
34
+ $updater->endSetup();
app/design/frontend/base/default/layout/paybyfinance.xml CHANGED
@@ -39,6 +39,12 @@
39
  </reference>
40
  </default>
41
 
 
 
 
 
 
 
42
  <catalog_product_view>
43
  <reference name="product.info">
44
  <block type="paybyfinance/selector" name="paybyfinance.selector" as="pbfselector" template="paybyfinance/selector.phtml">
39
  </reference>
40
  </default>
41
 
42
+ <product_list>
43
+ <reference name="product_list.name.after">
44
+ <block type="paybyfinance/product_list_finance" name="product_list.paybyfinance" template="paybyfinance/catalog/product/list/finance.phtml"/>
45
+ </reference>
46
+ </product_list>
47
+
48
  <catalog_product_view>
49
  <reference name="product.info">
50
  <block type="paybyfinance/selector" name="paybyfinance.selector" as="pbfselector" template="paybyfinance/selector.phtml">
app/design/frontend/base/default/template/paybyfinance/catalog/product/list/finance.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php if ($this->hasFinance()) : ?>
2
+ <div class="productlist-paybyfinance-label">
3
+ <?php echo $this->__('Finance Available From %s', $this->getFinanceFromPrice()) ?>
4
+ </div>
5
+ <?php endif; ?>
app/design/frontend/base/default/template/paybyfinance/selector.phtml CHANGED
@@ -172,7 +172,7 @@ $_secure = $this->getRequest()->isSecure();
172
  var value = $("pbf-input-deposit").value * 10;
173
  var service_id = $$('#paybyfinance input:checked[name=service]')[0].value;
174
  var service = pbf_selector_data.services[service_id];
175
- var deposit = ((value / 100) * pbf_selector_data.amount);
176
  var credit = (pbf_selector_data.amount - deposit);
177
  var monthly = Math.floor((credit * service.multiplier) * 100) / 100; // No rounding issues, rounding always down
178
  if (service.type == '32') {
172
  var value = $("pbf-input-deposit").value * 10;
173
  var service_id = $$('#paybyfinance input:checked[name=service]')[0].value;
174
  var service = pbf_selector_data.services[service_id];
175
+ var deposit = Math.round(((value / 100) * pbf_selector_data.amount) * 100) / 100;
176
  var credit = (pbf_selector_data.amount - deposit);
177
  var monthly = Math.floor((credit * service.multiplier) * 100) / 100; // No rounding issues, rounding always down
178
  if (service.type == '32') {
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>HC_PayByFinance</name>
4
- <version>1.0.4.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.healthywebsites.co.uk/license.html">Healthy Websites</license>
7
  <channel>community</channel>
@@ -9,13 +9,17 @@
9
  <summary>Hitachi Capital Pay By Finance</summary>
10
  <description>Hitachi Capital Pay By Finance</description>
11
  <notes>Change Log:&#xD;
12
- * Wizard type flag: old, new rather than Y, N&#xD;
13
- * HC-187 Fixed deposit when there's only one service&#xD;
14
- * Tests against CE 1.9.1.9 and EE 1.14.1.0</notes>
 
 
 
 
15
  <authors><author><name>Sandor Czettner</name><user>MAG000003395</user><email>support@healthywebsites.co.uk</email></author><author><name>Alistair Macneil</name><user>MAG000006529</user><email>support@healthywebsites.co.uk</email></author><author><name>Rhuaridh Clark</name><user>MAG002562063</user><email>support@healthywebsites.co.uk</email></author></authors>
16
- <date>2015-05-19</date>
17
- <time>09:39:30</time>
18
- <contents><target name="magelocal"><dir><dir name="HC"><dir name="PayByFinance"><dir name="Block"><dir name="Adminhtml"><dir name="Paybyfinance"><file name="Redirect.php" hash="b7aadc98068529d4fb08219a83b2e69b"/><dir name="Service"><dir name="Edit"><file name="Form.php" hash="19f94b6405f5ec45510022c5aff868c2"/><dir name="Tab"><file name="Form.php" hash="77316baf7e8d387037007b97067fff8b"/></dir><file name="Tabs.php" hash="5af9151c310841d8dd0b6f7e8f984625"/></dir><file name="Edit.php" hash="d73f958b0abaebff8aff703f650c5a01"/><file name="Grid.php" hash="38f482f561c0be60b8a7ac6f49e74df9"/></dir><file name="Service.php" hash="26112ba2733a9db951addfef4e0152e8"/></dir><file name="Version.php" hash="a5781fa3cd366242d76295b7b62ab43f"/></dir><dir name="Checkout"><file name="Redirect.php" hash="30f1cf1f682abc985e872619b67a86d7"/></dir><dir name="Sales"><dir name="Order"><file name="Totals.php" hash="1fe522dd0d6a4c890374b2602b840d3b"/></dir></dir><file name="Selector.php" hash="cec4b9a148b8b06458bddc03f3a7747d"/><file name="Status.php" hash="338f52aa781e3e7703862e180339a1aa"/></dir><dir name="Helper"><file name="Cart.php" hash="121aa99b2d5ceb953a1e790e244d02eb"/><file name="Checkout.php" hash="2e5c242b333cda10fa0993b036b9cbf4"/><file name="Data.php" hash="bbdcce22dbde9bf9f001fdf4f7ff1c86"/><file name="Notification.php" hash="33ccf56e7edf87f44c5eb55b11408b67"/></dir><dir name="Model"><file name="Calculator.php" hash="8424176b514b955b6414037c6835ceb2"/><dir name="Config"><dir name="Source"><dir name="Catalog"><dir name="Product"><file name="Finance.php" hash="68dfc0233403f61c82aa62009cdd2da7"/><file name="Type.php" hash="4494b3f46eddc7455e363281072df315"/></dir></dir><dir name="Cms"><file name="Block.php" hash="a4302b47926c40f480ea84f81420070f"/></dir><file name="Connectionmode.php" hash="a734e5ae89d3dd72ba80c97b358d3923"/><file name="Type.php" hash="ce4604dccb55c6ce450fd34d4fa8ad4d"/></dir></dir><file name="Log.php" hash="446fc48510a09b279ad725bf87b839ff"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="6ebe6b95b2565601cd77f1d4db264ff4"/></dir><file name="Log.php" hash="914cb47c3274c2cce6a3913302a2d4e3"/><dir name="Service"><file name="Collection.php" hash="c68147d484d42d4b6b6f4fedc2ac6cc7"/></dir><file name="Service.php" hash="3dac2e956f57c9a1467e52a0f008fefd"/></dir><file name="Observer.php" hash="c6be6a9eea07d67c1a3e936447abf39b"/><dir name="Paypal"><dir name="Api"><file name="Nvp.php" hash="5d1f7b687e2ca293ac1dc0c0425d1b8f"/></dir><dir name="Hostedpro"><file name="Request.php" hash="11ba073df9037d899eecb211c062d5f5"/></dir></dir><dir name="PaypalUk"><dir name="Api"><file name="Nvp.php" hash="49ba8cbd3145939a3d78e4964d1fe27e"/></dir></dir><dir name="Post"><file name="Abstract.php" hash="f6eeda7e77637957a68071f10b9954ce"/><file name="Live.php" hash="dd7b6a145f11ac7e5521541ba9a04111"/><file name="Simulation.php" hash="cb9b14475150e9303cd92831bb1eff6d"/><file name="Test.php" hash="749fb1a3384695e9f24f2fbf5fd82d47"/><file name="Unittest.php" hash="fe5d5590d720d4d2c824bcaf3ca83e55"/></dir><file name="Post.php" hash="c45665581817d711048d37bed0ecb67b"/><dir name="Resource"><file name="Setup.php" hash="c20cba205135fbfb01055518102b4681"/></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Financeamount.php" hash="d74d023597dbd720e084fb908612c41c"/></dir><dir name="Invoice"><file name="Financeamount.php" hash="26d5a2333800c4850b75e83a852121e5"/></dir></dir><dir name="Quote"><file name="Financeamount.php" hash="6ab0b4a17a0e2b09cc17e4bf58f080e1"/><file name="Totalcost.php" hash="54d35aa594ede6d873b17ef3df180b9b"/></dir></dir><file name="Service.php" hash="5cc3d5959b8e08b11ca754da67776efd"/><file name="Session.php" hash="c2cdc285f6297ad2dc100973022ec6d4"/><file name="Sessionobserver.php" hash="b7ec4aa8a95845dd731522eb7f66196a"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Paybyfinance"><file name="RedirectController.php" hash="8098982cfa01371e3427d0b7a8da6829"/><file name="ServiceController.php" hash="0f394469d41e6b37f9f39d3e666a719f"/></dir></dir><file name="CheckoutController.php" hash="2a505b23cae454ad7ee6a4d6d0c88979"/><file name="NotificationController.php" hash="0ddbe6b181ac9a961340d69263c6a3db"/><file name="SelectorController.php" hash="42a24424f721f425fca70de6dbeff767"/><file name="SessionController.php" hash="b3756993e0d8e6e49434354c824f837e"/><file name="StatusController.php" hash="9e8681654954590f2694780f18ab0675"/></dir><dir name="etc"><file name="adminhtml.xml" hash="216df222a5f5d9fdcf29c238cfd78bd5"/><file name="config.xml" hash="46692d1909b3c9394bd1552631a986ed"/><file name="system.xml" hash="28c240d36d67c0f8d4df44ad7744b37b"/></dir><dir name="sql"><dir name="paybyfinance_setup"><dir name="html"><file name="abandoned.html" hash="424f900dbddc267f7dac72e67752df25"/><file name="accepted.html" hash="5a12318275410a8bf62d7508422d9503"/><file name="declined.html" hash="bd3e7565c3d98645629d9f6274e4bf24"/><file name="error.html" hash="4a448b052f101b2648dfe84423ad1313"/><file name="information.html" hash="b364458ba3d9ad7579fa4935e3449b46"/><file name="page-finance-options.html" hash="d6786a27e4bf82a73e3134df0f98888b"/><file name="referred.html" hash="5955befddbb2e274f350ba71458b6151"/></dir><file name="mysql4-install-1.0.4.php" hash="7e01a596e50329e9a09838df68ba98b1"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="35e40e56f4eaa482cf76861bf268b9d7"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="f88bb5dae696c130c0038c05e86dfd9c"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="abd3f7c7e68120a6bcad82470f62db25"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="paybyfinance"><file name="form.phtml" hash="6f583d5629e39fe564d4b86535242c7a"/><dir><dir name="sales"><dir name="order"><file name="totals.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir><file name="selector-no.phtml" hash="b54c570f68254a2e879464a0b761c7db"/><file name="selector.phtml" hash="c8e62bdb58571e448e44cf81ec630f75"/><file name="status.phtml" hash="9e02cb668c470d72612bccc09e34c51a"/></dir><dir name="checkout"><dir name="cart"><file name="totals-pbf.phtml" hash="f14878e618aa3c8943f3728128aadaa6"/></dir><dir name="onepage"><dir name="review"><file name="info-pbf.phtml" hash="e4c7c70c798f1956ae7aaa5c09114fab"/><file name="totals-pbf.phtml" hash="f26e488359433c3814a1cd416006869a"/></dir></dir><file name="cart-pbf.phtml" hash="9f6b1873ed02e5e2ae1966e3e5a1910d"/></dir></dir><dir name="layout"><file name="paybyfinance.xml" hash="7260a6fd47c42aec9bdd1d3acb7d9a26"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="paybyfinance.xml" hash="6dd419ed31a10c3fc409a5a58f89fe01"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="paybyfinance"><file name="checkout.js" hash="21051d8691dd773427d3e761403896ab"/><file name="functions.js" hash="98c27381b3f7eaeaa845271dbe763f05"/><file name="slider.js" hash="16d83f4f0faa449276c926d2afac75fb"/></dir></dir><dir name="css"><file name="paybyfinance.css" hash="25d02dc5cf228662c30d908d7c2f1356"/><file name="paybyfinance-ie8.css" hash="a6be9c7af8b95300bc62e4fe9ef252ac"/></dir><dir name="images"><dir name="paybyfinance"><file name="bullet.png" hash="ea2baab34b2eb7d0aacb7a67d5b080f1"/><file name="pointer-toggle.png" hash="e661d42aed7a5562f75828312c7a635a"/><file name="pointer.png" hash="68c58b28d6ebd77d415f8666c301a199"/><file name="progress.png" hash="6d46a109cc9e38a663678918142d89f2"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="HC_PayByFinance.xml" hash="7cbf54af53b5b2fe9047988444fd407c"/></dir></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.4.26</min><max>5.6.7</max></php></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>HC_PayByFinance</name>
4
+ <version>1.0.5.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.healthywebsites.co.uk/license.html">Healthy Websites</license>
7
  <channel>community</channel>
9
  <summary>Hitachi Capital Pay By Finance</summary>
10
  <description>Hitachi Capital Pay By Finance</description>
11
  <notes>Change Log:&#xD;
12
+ * Remove JavaScript warnings&#xD;
13
+ * HC-195 Deposit rounding issue&#xD;
14
+ * HC-188 Rounding Down the finance amount&#xD;
15
+ * HC-175 Fix illegal chars in product name&#xD;
16
+ * HC-156 Finance offer on product lists&#xD;
17
+ * HC-173 implement changes according to updated specification (notification url)&#xD;
18
+ * HC-201 Invoice base_grand_total calculation fix</notes>
19
  <authors><author><name>Sandor Czettner</name><user>MAG000003395</user><email>support@healthywebsites.co.uk</email></author><author><name>Alistair Macneil</name><user>MAG000006529</user><email>support@healthywebsites.co.uk</email></author><author><name>Rhuaridh Clark</name><user>MAG002562063</user><email>support@healthywebsites.co.uk</email></author></authors>
20
+ <date>2015-06-12</date>
21
+ <time>14:23:19</time>
22
+ <contents><target name="magelocal"><dir><dir name="HC"><dir name="PayByFinance"><dir name="Block"><dir name="Adminhtml"><dir name="Paybyfinance"><file name="Redirect.php" hash="b7aadc98068529d4fb08219a83b2e69b"/><dir name="Service"><dir name="Edit"><file name="Form.php" hash="19f94b6405f5ec45510022c5aff868c2"/><dir name="Tab"><file name="Form.php" hash="77316baf7e8d387037007b97067fff8b"/></dir><file name="Tabs.php" hash="5af9151c310841d8dd0b6f7e8f984625"/></dir><file name="Edit.php" hash="d73f958b0abaebff8aff703f650c5a01"/><file name="Grid.php" hash="38f482f561c0be60b8a7ac6f49e74df9"/></dir><file name="Service.php" hash="26112ba2733a9db951addfef4e0152e8"/></dir><file name="Version.php" hash="a5781fa3cd366242d76295b7b62ab43f"/></dir><dir name="Checkout"><file name="Redirect.php" hash="30f1cf1f682abc985e872619b67a86d7"/></dir><dir name="Product"><dir name="List"><file name="Finance.php" hash="a9dd554c1c95fc4c912f71ab3ac94d2c"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Totals.php" hash="1fe522dd0d6a4c890374b2602b840d3b"/></dir></dir><file name="Selector.php" hash="cec4b9a148b8b06458bddc03f3a7747d"/><file name="Status.php" hash="338f52aa781e3e7703862e180339a1aa"/></dir><dir name="Helper"><file name="Cart.php" hash="121aa99b2d5ceb953a1e790e244d02eb"/><file name="Checkout.php" hash="2e5c242b333cda10fa0993b036b9cbf4"/><file name="Data.php" hash="4a3797487c6128b07f3502266e2862eb"/><file name="Notification.php" hash="a72c5a8885a83051e28fe77d6a8f36a7"/></dir><dir name="Model"><file name="Calculator.php" hash="a81e3a8a548a349660d513e79ba521f2"/><dir name="Config"><dir name="Source"><dir name="Catalog"><dir name="Product"><file name="Finance.php" hash="68dfc0233403f61c82aa62009cdd2da7"/><file name="Type.php" hash="4494b3f46eddc7455e363281072df315"/></dir></dir><dir name="Cms"><file name="Block.php" hash="a4302b47926c40f480ea84f81420070f"/></dir><file name="Connectionmode.php" hash="a734e5ae89d3dd72ba80c97b358d3923"/><dir name="Notification"><file name="Status.php" hash="0e9792c4ea7e27e61472d60e07227c5e"/></dir><file name="Type.php" hash="ce4604dccb55c6ce450fd34d4fa8ad4d"/></dir></dir><file name="Log.php" hash="446fc48510a09b279ad725bf87b839ff"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="6ebe6b95b2565601cd77f1d4db264ff4"/></dir><file name="Log.php" hash="914cb47c3274c2cce6a3913302a2d4e3"/><dir name="Service"><file name="Collection.php" hash="c68147d484d42d4b6b6f4fedc2ac6cc7"/></dir><file name="Service.php" hash="3dac2e956f57c9a1467e52a0f008fefd"/></dir><file name="Observer.php" hash="3e51b9b64e9f7882478d43d4500ea89a"/><dir name="Paypal"><dir name="Api"><file name="Nvp.php" hash="5d1f7b687e2ca293ac1dc0c0425d1b8f"/></dir><dir name="Hostedpro"><file name="Request.php" hash="11ba073df9037d899eecb211c062d5f5"/></dir></dir><dir name="PaypalUk"><dir name="Api"><file name="Nvp.php" hash="49ba8cbd3145939a3d78e4964d1fe27e"/></dir></dir><dir name="Post"><file name="Abstract.php" hash="f6eeda7e77637957a68071f10b9954ce"/><file name="Live.php" hash="dd7b6a145f11ac7e5521541ba9a04111"/><file name="Simulation.php" hash="cb9b14475150e9303cd92831bb1eff6d"/><file name="Test.php" hash="749fb1a3384695e9f24f2fbf5fd82d47"/><file name="Unittest.php" hash="fe5d5590d720d4d2c824bcaf3ca83e55"/></dir><file name="Post.php" hash="c45665581817d711048d37bed0ecb67b"/><dir name="Resource"><file name="Setup.php" hash="c20cba205135fbfb01055518102b4681"/></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Financeamount.php" hash="d21bf32738a9cd371cfd2140c5e8d5d6"/></dir><dir name="Invoice"><file name="Financeamount.php" hash="f6515a9330b30eab9254f2f34e6d1cfb"/></dir></dir><dir name="Quote"><file name="Financeamount.php" hash="6ab0b4a17a0e2b09cc17e4bf58f080e1"/><file name="Totalcost.php" hash="54d35aa594ede6d873b17ef3df180b9b"/></dir></dir><file name="Service.php" hash="5cc3d5959b8e08b11ca754da67776efd"/><file name="Session.php" hash="c2cdc285f6297ad2dc100973022ec6d4"/><file name="Sessionobserver.php" hash="b7ec4aa8a95845dd731522eb7f66196a"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Paybyfinance"><file name="RedirectController.php" hash="8098982cfa01371e3427d0b7a8da6829"/><file name="ServiceController.php" hash="0f394469d41e6b37f9f39d3e666a719f"/></dir></dir><file name="CheckoutController.php" hash="8597b8ce4ce0b3564996e636358ac693"/><file name="NotificationController.php" hash="3a1ad67da91acc34a623ad52d12fcf44"/><file name="SelectorController.php" hash="42a24424f721f425fca70de6dbeff767"/><file name="SessionController.php" hash="b3756993e0d8e6e49434354c824f837e"/><file name="StatusController.php" hash="9e8681654954590f2694780f18ab0675"/></dir><dir name="etc"><file name="adminhtml.xml" hash="216df222a5f5d9fdcf29c238cfd78bd5"/><file name="config.xml" hash="8b67383c26c3856e76b2b1bd0bfee0a8"/><file name="system.xml" hash="f399289f1632bd5476543ff47e61359a"/></dir><dir name="sql"><dir name="paybyfinance_setup"><dir name="html"><file name="abandoned.html" hash="424f900dbddc267f7dac72e67752df25"/><file name="accepted.html" hash="5a12318275410a8bf62d7508422d9503"/><file name="declined.html" hash="bd3e7565c3d98645629d9f6274e4bf24"/><file name="error.html" hash="4a448b052f101b2648dfe84423ad1313"/><file name="information.html" hash="b364458ba3d9ad7579fa4935e3449b46"/><file name="page-finance-options.html" hash="d6786a27e4bf82a73e3134df0f98888b"/><file name="referred.html" hash="5955befddbb2e274f350ba71458b6151"/></dir><file name="mysql4-install-1.0.5.php" hash="36e8a0c020334703bf748374129cb566"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="35e40e56f4eaa482cf76861bf268b9d7"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="f88bb5dae696c130c0038c05e86dfd9c"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="abd3f7c7e68120a6bcad82470f62db25"/><file name="mysql4-upgrade-1.0.4-1.0.5.php" hash="54fa31133574e43e44b3a9694bdb729f"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="paybyfinance"><dir><dir name="catalog"><dir name="product"><dir name="list"><file name="finance.phtml" hash="30f6500bc535bdf851ff6d5768e383dc"/></dir></dir></dir><dir name="sales"><dir name="order"><file name="totals.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir><file name="form.phtml" hash="6f583d5629e39fe564d4b86535242c7a"/><file name="selector-no.phtml" hash="b54c570f68254a2e879464a0b761c7db"/><file name="selector.phtml" hash="2a4c293be0ec3b13d40a6080725dd8eb"/><file name="status.phtml" hash="9e02cb668c470d72612bccc09e34c51a"/></dir><dir name="checkout"><dir name="cart"><file name="totals-pbf.phtml" hash="f14878e618aa3c8943f3728128aadaa6"/></dir><dir name="onepage"><dir name="review"><file name="info-pbf.phtml" hash="e4c7c70c798f1956ae7aaa5c09114fab"/><file name="totals-pbf.phtml" hash="f26e488359433c3814a1cd416006869a"/></dir></dir><file name="cart-pbf.phtml" hash="9f6b1873ed02e5e2ae1966e3e5a1910d"/></dir></dir><dir name="layout"><file name="paybyfinance.xml" hash="2e607a75275674c94d13869b6f1eaac6"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="paybyfinance.xml" hash="6dd419ed31a10c3fc409a5a58f89fe01"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="paybyfinance"><file name="checkout.js" hash="21051d8691dd773427d3e761403896ab"/><file name="functions.js" hash="98c27381b3f7eaeaa845271dbe763f05"/><file name="slider.js" hash="16d83f4f0faa449276c926d2afac75fb"/></dir></dir><dir name="css"><file name="paybyfinance.css" hash="25d02dc5cf228662c30d908d7c2f1356"/><file name="paybyfinance-ie8.css" hash="a6be9c7af8b95300bc62e4fe9ef252ac"/></dir><dir name="images"><dir name="paybyfinance"><file name="bullet.png" hash="ea2baab34b2eb7d0aacb7a67d5b080f1"/><file name="pointer-toggle.png" hash="e661d42aed7a5562f75828312c7a635a"/><file name="pointer.png" hash="68c58b28d6ebd77d415f8666c301a199"/><file name="progress.png" hash="6d46a109cc9e38a663678918142d89f2"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="HC_PayByFinance.xml" hash="7cbf54af53b5b2fe9047988444fd407c"/></dir></dir></target></contents>
23
  <compatible/>
24
  <dependencies><required><php><min>5.4.26</min><max>5.6.7</max></php></required></dependencies>
25
  </package>