Version Notes
Change Log:
* HC-131 Additional transactional email templates for Finance Accepted, Referred, Declined, Abandon, Error
* HC-280 Add maximum finance limit for service
* HC-302 Fix for minimum basket price setting in admin being ignored
* HC-310 Fix for shipment notification using “Default Config” settings for notifying PaybyFinance
Download this release
Release Info
Developer | Sandor Czettner |
Extension | HC_PayByFinance |
Version | 2.0.3.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.0.1 to 2.0.3.0
- app/code/local/HC/PayByFinance/Block/Adminhtml/Paybyfinance/Service/Edit/Tab/Form.php +9 -1
- app/code/local/HC/PayByFinance/Block/Adminhtml/Paybyfinance/Service/Grid.php +10 -1
- app/code/local/HC/PayByFinance/Block/Adminhtml/Version.php +1 -1
- app/code/local/HC/PayByFinance/Block/Selector.php +1 -1
- app/code/local/HC/PayByFinance/Helper/Cart.php +1 -1
- app/code/local/HC/PayByFinance/Helper/Checkout.php +20 -0
- app/code/local/HC/PayByFinance/Helper/Data.php +6 -0
- app/code/local/HC/PayByFinance/Helper/Notification.php +8 -0
- app/code/local/HC/PayByFinance/Helper/Order.php +330 -0
- app/code/local/HC/PayByFinance/Model/Calculator.php +3 -0
- app/code/local/HC/PayByFinance/Model/Mysql4/Service/Collection.php +13 -4
- app/code/local/HC/PayByFinance/Model/Observer.php +10 -1
- app/code/local/HC/PayByFinance/Model/Post.php +44 -11
- app/code/local/HC/PayByFinance/Model/Sessionobserver.php +77 -0
- app/code/local/HC/PayByFinance/controllers/Adminhtml/Paybyfinance/ServiceController.php +10 -2
- app/code/local/HC/PayByFinance/controllers/NotificationController.php +1 -1
- app/code/local/HC/PayByFinance/controllers/SelectorController.php +1 -1
- app/code/local/HC/PayByFinance/etc/config.xml +47 -1
- app/code/local/HC/PayByFinance/etc/system.xml +37 -9
- app/code/local/HC/PayByFinance/sql/paybyfinance_setup/html/information.html +0 -24
- app/code/local/HC/PayByFinance/sql/paybyfinance_setup/{mysql4-install-2.0.0.php → mysql4-install-2.0.3.php} +14 -1
- app/code/local/HC/PayByFinance/sql/paybyfinance_setup/mysql4-upgrade-2.0.0-2.0.1.php +34 -0
- app/code/local/HC/PayByFinance/sql/paybyfinance_setup/mysql4-upgrade-2.0.1-2.0.2.php +28 -0
- app/code/local/HC/PayByFinance/sql/paybyfinance_setup/mysql4-upgrade-2.0.2-2.0.3.php +34 -0
- app/design/frontend/base/default/template/paybyfinance/selector.phtml +11 -1
- app/locale/en_US/template/email/paybyfinance/order_declined.html +106 -0
- app/locale/en_US/template/email/paybyfinance/order_declined_guest.html +106 -0
- app/locale/en_US/template/email/paybyfinance/order_referred.html +105 -0
- app/locale/en_US/template/email/paybyfinance/order_referred_guest.html +105 -0
- package.xml +9 -11
app/code/local/HC/PayByFinance/Block/Adminhtml/Paybyfinance/Service/Edit/Tab/Form.php
CHANGED
@@ -119,13 +119,21 @@ class HC_PayByFinance_Block_Adminhtml_Paybyfinance_Service_Edit_Tab_Form
|
|
119 |
|
120 |
$fieldset->addField(
|
121 |
'min_amount', 'text', array(
|
122 |
-
'label' => $helper->__('Minimum Amount'),
|
123 |
'class' => 'required-entry',
|
124 |
'required' => true,
|
125 |
'name' => 'min_amount',
|
126 |
)
|
127 |
);
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
$fieldset->addField(
|
130 |
'multiplier', 'text', array(
|
131 |
'label' => $helper->__('Multiplier'),
|
119 |
|
120 |
$fieldset->addField(
|
121 |
'min_amount', 'text', array(
|
122 |
+
'label' => $helper->__('Minimum Loan Amount'),
|
123 |
'class' => 'required-entry',
|
124 |
'required' => true,
|
125 |
'name' => 'min_amount',
|
126 |
)
|
127 |
);
|
128 |
|
129 |
+
$fieldset->addField(
|
130 |
+
'max_amount', 'text', array(
|
131 |
+
'label' => $helper->__('Maximum Loan Amount'),
|
132 |
+
'required' => false,
|
133 |
+
'name' => 'max_amount',
|
134 |
+
)
|
135 |
+
);
|
136 |
+
|
137 |
$fieldset->addField(
|
138 |
'multiplier', 'text', array(
|
139 |
'label' => $helper->__('Multiplier'),
|
app/code/local/HC/PayByFinance/Block/Adminhtml/Paybyfinance/Service/Grid.php
CHANGED
@@ -147,13 +147,22 @@ class HC_PayByFInance_Block_Adminhtml_Paybyfinance_Service_Grid
|
|
147 |
|
148 |
$this->addColumn(
|
149 |
'minimum_amount', array(
|
150 |
-
'header' => $helper->__('Minimum Amount'),
|
151 |
'align' => 'right',
|
152 |
'type' => 'number',
|
153 |
'index' => 'min_amount',
|
154 |
)
|
155 |
);
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
$this->addColumn(
|
158 |
'multiplier', array(
|
159 |
'header' => $helper->__('Multiplier'),
|
147 |
|
148 |
$this->addColumn(
|
149 |
'minimum_amount', array(
|
150 |
+
'header' => $helper->__('Minimum Loan Amount'),
|
151 |
'align' => 'right',
|
152 |
'type' => 'number',
|
153 |
'index' => 'min_amount',
|
154 |
)
|
155 |
);
|
156 |
|
157 |
+
$this->addColumn(
|
158 |
+
'maximum_amount', array(
|
159 |
+
'header' => $helper->__('Maximum Loan Amount'),
|
160 |
+
'align' => 'right',
|
161 |
+
'type' => 'number',
|
162 |
+
'index' => 'max_amount',
|
163 |
+
)
|
164 |
+
);
|
165 |
+
|
166 |
$this->addColumn(
|
167 |
'multiplier', array(
|
168 |
'header' => $helper->__('Multiplier'),
|
app/code/local/HC/PayByFinance/Block/Adminhtml/Version.php
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
class HC_PayByFinance_Block_Adminhtml_Version extends Mage_Adminhtml_Block_Template
|
30 |
implements Varien_Data_Form_Element_Renderer_Interface
|
31 |
{
|
32 |
-
const PATCH_LEVEL =
|
33 |
|
34 |
protected $_template = "paybyfinance/version.phtml";
|
35 |
|
29 |
class HC_PayByFinance_Block_Adminhtml_Version extends Mage_Adminhtml_Block_Template
|
30 |
implements Varien_Data_Form_Element_Renderer_Interface
|
31 |
{
|
32 |
+
const PATCH_LEVEL = 0;
|
33 |
|
34 |
protected $_template = "paybyfinance/version.phtml";
|
35 |
|
app/code/local/HC/PayByFinance/Block/Selector.php
CHANGED
@@ -44,7 +44,7 @@ class HC_PayByFinance_Block_Selector extends Mage_Core_Block_Template
|
|
44 |
$this->_services = Mage::getModel('paybyfinance/service')
|
45 |
->getCollection()
|
46 |
->storeFilter(Mage::app()->getStore()->getStoreId())
|
47 |
-
->addPriceFilter($amount)
|
48 |
->load();
|
49 |
}
|
50 |
|
44 |
$this->_services = Mage::getModel('paybyfinance/service')
|
45 |
->getCollection()
|
46 |
->storeFilter(Mage::app()->getStore()->getStoreId())
|
47 |
+
->addPriceFilter($amount, $amount)
|
48 |
->load();
|
49 |
}
|
50 |
|
app/code/local/HC/PayByFinance/Helper/Cart.php
CHANGED
@@ -38,8 +38,8 @@ class HC_PayByFinance_Helper_Cart extends Mage_Core_Helper_Data
|
|
38 |
*/
|
39 |
public function getEligibleProducts($items = null)
|
40 |
{
|
41 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
42 |
if ($items === null) {
|
|
|
43 |
$items = $cart->getAllItems();
|
44 |
}
|
45 |
$helper = Mage::helper('paybyfinance');
|
38 |
*/
|
39 |
public function getEligibleProducts($items = null)
|
40 |
{
|
|
|
41 |
if ($items === null) {
|
42 |
+
$cart = Mage::getModel('checkout/cart')->getQuote();
|
43 |
$items = $cart->getAllItems();
|
44 |
}
|
45 |
$helper = Mage::helper('paybyfinance');
|
app/code/local/HC/PayByFinance/Helper/Checkout.php
CHANGED
@@ -39,6 +39,7 @@ class HC_PayByFinance_Helper_Checkout extends Mage_Core_Helper_Data
|
|
39 |
*
|
40 |
* @return string Redirect URL.
|
41 |
*/
|
|
|
42 |
public function processReturnStatus($order, $parameters)
|
43 |
{
|
44 |
$helper = Mage::helper('paybyfinance');
|
@@ -81,11 +82,29 @@ class HC_PayByFinance_Helper_Checkout extends Mage_Core_Helper_Data
|
|
81 |
if ($financeStatus == 'ACCEPT') {
|
82 |
$financeStatus = 'ACCEPTED';
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
if ($parameters['decision'] != $financeStatus // Don't change status if not modified.
|
85 |
&& !$order->getPaybyfinanceEnable() // Don't change status on second return.
|
86 |
) {
|
87 |
$order->setState($state, $status);
|
88 |
$order->setFinanceStatus($parameters['decision']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
$order->addStatusHistoryComment(nl2br(trim($message), false));
|
91 |
$order->setPaybyfinanceEnable(true);
|
@@ -93,6 +112,7 @@ class HC_PayByFinance_Helper_Checkout extends Mage_Core_Helper_Data
|
|
93 |
|
94 |
return $redirectUrl;
|
95 |
}
|
|
|
96 |
|
97 |
/**
|
98 |
* Get parmeter by it's id with text and semicolon.
|
39 |
*
|
40 |
* @return string Redirect URL.
|
41 |
*/
|
42 |
+
// @codingStandardsIgnoreStart -- Cyclomatic complexity, consider refactoring this
|
43 |
public function processReturnStatus($order, $parameters)
|
44 |
{
|
45 |
$helper = Mage::helper('paybyfinance');
|
82 |
if ($financeStatus == 'ACCEPT') {
|
83 |
$financeStatus = 'ACCEPTED';
|
84 |
}
|
85 |
+
|
86 |
+
if ($parameters['decision'] == 'ACCEPTED') {
|
87 |
+
$order->sendNewOrderEmail();
|
88 |
+
$helper->log(
|
89 |
+
'New order email has been sent for order: ' . $order->getIncrementId(),
|
90 |
+
'post'
|
91 |
+
);
|
92 |
+
}
|
93 |
+
|
94 |
if ($parameters['decision'] != $financeStatus // Don't change status if not modified.
|
95 |
&& !$order->getPaybyfinanceEnable() // Don't change status on second return.
|
96 |
) {
|
97 |
$order->setState($state, $status);
|
98 |
$order->setFinanceStatus($parameters['decision']);
|
99 |
+
if ($parameters['decision'] != 'ACCEPTED') {
|
100 |
+
$orderHelper = Mage::helper('paybyfinance/order');
|
101 |
+
$orderHelper->sendFailedEmail($order, $parameters['decision']);
|
102 |
+
$helper->log(
|
103 |
+
'Failed order email has been sent for order: ' . $order->getIncrementId() . "\n"
|
104 |
+
. 'Finance status: ' . $parameters['decision'],
|
105 |
+
'post'
|
106 |
+
);
|
107 |
+
}
|
108 |
}
|
109 |
$order->addStatusHistoryComment(nl2br(trim($message), false));
|
110 |
$order->setPaybyfinanceEnable(true);
|
112 |
|
113 |
return $redirectUrl;
|
114 |
}
|
115 |
+
// @codingStandardsIgnoreEnd
|
116 |
|
117 |
/**
|
118 |
* Get parmeter by it's id with text and semicolon.
|
app/code/local/HC/PayByFinance/Helper/Data.php
CHANGED
@@ -57,6 +57,10 @@ class HC_PayByFinance_Helper_Data extends Mage_Core_Helper_Data
|
|
57 |
const XML_PATH_ERROR_NOTIFY_EMAIL = 'hc_paybyfinance/account/erroremail';
|
58 |
const XML_PATH_ACCOUNT_RETAILERNAME = 'hc_paybyfinance/account/retailername';
|
59 |
const XML_PATH_ACCOUNT_TRADINGNAME = 'hc_paybyfinance/account/tradingname';
|
|
|
|
|
|
|
|
|
60 |
const ERROR_LOG_PATH_LOG = 'paybyfinance/paybyfinance-log.log';
|
61 |
const ERROR_LOG_PATH_POST = 'paybyfinance/paybyfinance-post.log';
|
62 |
const ERROR_LOG_PATH_NOTIFICATION = 'paybyfinance/paybyfinance-notification.log';
|
@@ -80,6 +84,7 @@ class HC_PayByFinance_Helper_Data extends Mage_Core_Helper_Data
|
|
80 |
$session = Mage::getSingleton('paybyfinance/session');
|
81 |
$json = array(
|
82 |
'services' => array(),
|
|
|
83 |
'amount' => $amount,
|
84 |
'enabled' => $session->getData('enabled'),
|
85 |
'service' => $session->getData('service'),
|
@@ -102,6 +107,7 @@ class HC_PayByFinance_Helper_Data extends Mage_Core_Helper_Data
|
|
102 |
'deposit' => $service->getDeposit(),
|
103 |
'fee' => $service->getFee(),
|
104 |
'min_amount' => $service->getMinAmount(),
|
|
|
105 |
'multiplier' => $service->getMultiplier(),
|
106 |
'rpm' => $service->getRpm(),
|
107 |
);
|
57 |
const XML_PATH_ERROR_NOTIFY_EMAIL = 'hc_paybyfinance/account/erroremail';
|
58 |
const XML_PATH_ACCOUNT_RETAILERNAME = 'hc_paybyfinance/account/retailername';
|
59 |
const XML_PATH_ACCOUNT_TRADINGNAME = 'hc_paybyfinance/account/tradingname';
|
60 |
+
const XML_PATH_EMAIL_TEMPLATE = 'hc_paybyfinance/general/declined_email';
|
61 |
+
const XML_PATH_EMAIL_TEMPLATE_GUEST = 'hc_paybyfinance/general/declined_email_guest';
|
62 |
+
const XML_PATH_EMAIL_REFERRED = 'hc_paybyfinance/general/referred_email';
|
63 |
+
const XML_PATH_EMAIL_REFERRED_GUEST = 'hc_paybyfinance/general/referred_email_guest';
|
64 |
const ERROR_LOG_PATH_LOG = 'paybyfinance/paybyfinance-log.log';
|
65 |
const ERROR_LOG_PATH_POST = 'paybyfinance/paybyfinance-post.log';
|
66 |
const ERROR_LOG_PATH_NOTIFICATION = 'paybyfinance/paybyfinance-notification.log';
|
84 |
$session = Mage::getSingleton('paybyfinance/session');
|
85 |
$json = array(
|
86 |
'services' => array(),
|
87 |
+
'terms' => array(),
|
88 |
'amount' => $amount,
|
89 |
'enabled' => $session->getData('enabled'),
|
90 |
'service' => $session->getData('service'),
|
107 |
'deposit' => $service->getDeposit(),
|
108 |
'fee' => $service->getFee(),
|
109 |
'min_amount' => $service->getMinAmount(),
|
110 |
+
'max_amount' => $service->getMaxAmount(),
|
111 |
'multiplier' => $service->getMultiplier(),
|
112 |
'rpm' => $service->getRpm(),
|
113 |
);
|
app/code/local/HC/PayByFinance/Helper/Notification.php
CHANGED
@@ -92,6 +92,14 @@ class HC_PayByFinance_Helper_Notification extends Mage_Core_Helper_Data
|
|
92 |
$message = $this->statuses[$status];
|
93 |
}
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
if (in_array($status, $this->cancelStatus)) {
|
96 |
$orderState = $orderStatus = Mage_Sales_Model_Order::STATE_CANCELED;
|
97 |
}
|
92 |
$message = $this->statuses[$status];
|
93 |
}
|
94 |
|
95 |
+
if ($status == 'PAID' && $orderState != 'complete') {
|
96 |
+
/* There's a race condition when Hitachi sends PAID notification the same
|
97 |
+
time we send shipment (inbound) notification. They will re-try later. */
|
98 |
+
throw new Exception(
|
99 |
+
'PAID Notification received too early for order: ' . $order->getId(), 1
|
100 |
+
);
|
101 |
+
}
|
102 |
+
|
103 |
if (in_array($status, $this->cancelStatus)) {
|
104 |
$orderState = $orderStatus = Mage_Sales_Model_Order::STATE_CANCELED;
|
105 |
}
|
app/code/local/HC/PayByFinance/Helper/Order.php
ADDED
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Hitachi Capital Pay By Finance
|
4 |
+
*
|
5 |
+
* Hitachi Capital Pay By Finance Extension
|
6 |
+
*
|
7 |
+
* PHP version >= 5.4.*
|
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 |
+
* Helper for Order object manipulations
|
20 |
+
*
|
21 |
+
* @uses Mage_Core_Helper_Order
|
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_Helper_Order extends Mage_Core_Helper_Data
|
30 |
+
{
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Send email based on Magento version
|
34 |
+
*
|
35 |
+
* @param Mage_Sales_Model_Order $order Order object
|
36 |
+
* @param String $financeStatus Finance status
|
37 |
+
*
|
38 |
+
* @return HC_PayByFinance_Helper_Order
|
39 |
+
*/
|
40 |
+
public function sendFailedEmail($order, $financeStatus)
|
41 |
+
{
|
42 |
+
if (Mage::getEdition() == "Enterprise") {
|
43 |
+
$this->queueFailedOrderEmail($order, $financeStatus, true);
|
44 |
+
} else {
|
45 |
+
$this->sendFailedOrderEmail($order, $financeStatus);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Queue email with new order data (Magento EE)
|
51 |
+
*
|
52 |
+
* @param Mage_Sales_Model_Order $order Order object
|
53 |
+
* @param String $financeStatus Finance status
|
54 |
+
* @param bool $forceMode Force to send email
|
55 |
+
*
|
56 |
+
* @return HC_PayByFinance_Helper_Order
|
57 |
+
* @throws Exception
|
58 |
+
*/
|
59 |
+
public function queueFailedOrderEmail($order, $financeStatus, $forceMode = false)
|
60 |
+
{
|
61 |
+
$helper = mage::helper('paybyfinance');
|
62 |
+
$storeId = $order->getStore()->getId();
|
63 |
+
|
64 |
+
if (!Mage::helper('sales')->canSendNewOrderEmail($storeId)) {
|
65 |
+
return $this;
|
66 |
+
}
|
67 |
+
|
68 |
+
// Get the destination email addresses to send copies to
|
69 |
+
$copyTo = $this->_getEmails(Mage_Sales_Model_Order::XML_PATH_EMAIL_COPY_TO);
|
70 |
+
$copyMethod = Mage::getStoreConfig(
|
71 |
+
Mage_Sales_Model_Order::XML_PATH_EMAIL_COPY_METHOD, $storeId
|
72 |
+
);
|
73 |
+
|
74 |
+
// Start store emulation process
|
75 |
+
$appEmulation = Mage::getSingleton('core/app_emulation');
|
76 |
+
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
|
77 |
+
|
78 |
+
try {
|
79 |
+
// Retrieve specified view block from appropriate design package
|
80 |
+
// (depends on emulated store)
|
81 |
+
$paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment())
|
82 |
+
->setIsSecureMode(true);
|
83 |
+
$paymentBlock->getMethod()->setStore($storeId);
|
84 |
+
$paymentBlockHtml = $paymentBlock->toHtml();
|
85 |
+
} catch (Exception $exception) {
|
86 |
+
// Stop store emulation process
|
87 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
88 |
+
throw $exception;
|
89 |
+
}
|
90 |
+
|
91 |
+
// Stop store emulation process
|
92 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
93 |
+
|
94 |
+
if ($financeStatus == 'REFERRED') {
|
95 |
+
// Retrieve corresponding email template id and customer name
|
96 |
+
if (!$order->getCustomerIsGuest()) {
|
97 |
+
$templateId = Mage::getStoreConfig($helper::XML_PATH_EMAIL_REFERRED, $storeId);
|
98 |
+
$customerName = $order->getBillingAddress()->getName();
|
99 |
+
} else {
|
100 |
+
$templateId = Mage::getStoreConfig(
|
101 |
+
$helper::XML_PATH_EMAIL_REFERRED_GUEST, $storeId
|
102 |
+
);
|
103 |
+
$customerName = $order->getCustomerName();
|
104 |
+
}
|
105 |
+
} else {
|
106 |
+
// Retrieve corresponding email template id and customer name
|
107 |
+
if (!$order->getCustomerIsGuest()) {
|
108 |
+
$templateId = Mage::getStoreConfig($helper::XML_PATH_EMAIL_TEMPLATE, $storeId);
|
109 |
+
$customerName = $order->getBillingAddress()->getName();
|
110 |
+
} else {
|
111 |
+
$templateId = Mage::getStoreConfig(
|
112 |
+
$helper::XML_PATH_EMAIL_TEMPLATE_GUEST, $storeId
|
113 |
+
);
|
114 |
+
$customerName = $order->getCustomerName();
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
$mailer = Mage::getModel('core/email_template_mailer');
|
119 |
+
$emailInfo = Mage::getModel('core/email_info');
|
120 |
+
$emailInfo->addTo($order->getCustomerEmail(), $customerName);
|
121 |
+
if ($copyTo && $copyMethod == 'bcc') {
|
122 |
+
// Add bcc to customer email
|
123 |
+
foreach ($copyTo as $email) {
|
124 |
+
$emailInfo->addBcc($email);
|
125 |
+
}
|
126 |
+
}
|
127 |
+
$mailer->addEmailInfo($emailInfo);
|
128 |
+
|
129 |
+
// Email copies are sent as separated emails if their copy method is 'copy'
|
130 |
+
if ($copyTo && $copyMethod == 'copy') {
|
131 |
+
foreach ($copyTo as $email) {
|
132 |
+
$emailInfo = Mage::getModel('core/email_info');
|
133 |
+
$emailInfo->addTo($email);
|
134 |
+
$mailer->addEmailInfo($emailInfo);
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
// Set all required params and send emails
|
139 |
+
$mailer->setSender(
|
140 |
+
Mage::getStoreConfig(Mage_Sales_Model_Order::XML_PATH_EMAIL_IDENTITY, $storeId)
|
141 |
+
);
|
142 |
+
$mailer->setStoreId($storeId);
|
143 |
+
$mailer->setTemplateId($templateId);
|
144 |
+
$mailer->setTemplateParams(
|
145 |
+
array(
|
146 |
+
'order' => $order,
|
147 |
+
'billing' => $order->getBillingAddress(),
|
148 |
+
'payment_html' => $paymentBlockHtml,
|
149 |
+
'financeerror' => $this->getFinanceErrorText($financeStatus)
|
150 |
+
)
|
151 |
+
);
|
152 |
+
|
153 |
+
$emailQueue = Mage::getModel('core/email_queue');
|
154 |
+
$emailQueue->setEntityId($order->getId())
|
155 |
+
->setEntityType(Mage_Sales_Model_Order::ENTITY)
|
156 |
+
->setEventType(Mage_Sales_Model_Order::EMAIL_EVENT_NAME_NEW_ORDER)
|
157 |
+
->setIsForceCheck(!$forceMode);
|
158 |
+
|
159 |
+
$mailer->setQueue($emailQueue)->send();
|
160 |
+
|
161 |
+
$order->setEmailSent(true);
|
162 |
+
$order->getResource()->saveAttribute($order, 'email_sent');
|
163 |
+
|
164 |
+
return $this;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Send email with order data (Magento CE)
|
169 |
+
*
|
170 |
+
* @param Mage_Sales_Model_Order $order Order object
|
171 |
+
* @param String $financeStatus Finance status
|
172 |
+
*
|
173 |
+
* @return HC_PayByFinance_Helper_Order
|
174 |
+
* @throws Exception
|
175 |
+
*/
|
176 |
+
// @codingStandardsIgnoreStart
|
177 |
+
public function sendFailedOrderEmail($order, $financeStatus)
|
178 |
+
{
|
179 |
+
$storeId = $order->getStore()->getId();
|
180 |
+
$helper = mage::helper('paybyfinance');
|
181 |
+
|
182 |
+
if (!Mage::helper('sales')->canSendNewOrderEmail($storeId)) {
|
183 |
+
return $order;
|
184 |
+
}
|
185 |
+
|
186 |
+
$emailSentAttributeValue = $order->hasEmailSent()
|
187 |
+
? $order->getEmailSent()
|
188 |
+
: Mage::getModel('sales/order')->load($order->getId())->getData('email_sent');
|
189 |
+
$order->setEmailSent((bool) $emailSentAttributeValue);
|
190 |
+
if ($order->getEmailSent()) {
|
191 |
+
return $order;
|
192 |
+
}
|
193 |
+
|
194 |
+
// Get the destination email addresses to send copies to
|
195 |
+
$copyTo = $this->_getEmails(Mage_Sales_Model_Order::XML_PATH_EMAIL_COPY_TO);
|
196 |
+
$copyMethod = Mage::getStoreConfig(
|
197 |
+
Mage_Sales_Model_Order::XML_PATH_EMAIL_COPY_METHOD, $storeId
|
198 |
+
);
|
199 |
+
|
200 |
+
// Start store emulation process
|
201 |
+
$appEmulation = Mage::getSingleton('core/app_emulation');
|
202 |
+
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
|
203 |
+
|
204 |
+
try {
|
205 |
+
// Retrieve specified view block from appropriate design package
|
206 |
+
// (depends on emulated store)
|
207 |
+
$paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment())
|
208 |
+
->setIsSecureMode(true);
|
209 |
+
$paymentBlock->getMethod()->setStore($storeId);
|
210 |
+
$paymentBlockHtml = $paymentBlock->toHtml();
|
211 |
+
} catch (Exception $exception) {
|
212 |
+
// Stop store emulation process
|
213 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
214 |
+
throw $exception;
|
215 |
+
}
|
216 |
+
|
217 |
+
// Stop store emulation process
|
218 |
+
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
|
219 |
+
|
220 |
+
if ($financeStatus == 'REFERRED') {
|
221 |
+
// Retrieve corresponding email template id and customer name
|
222 |
+
if (!$order->getCustomerIsGuest()) {
|
223 |
+
$templateId = Mage::getStoreConfig($helper::XML_PATH_EMAIL_REFERRED, $storeId);
|
224 |
+
$customerName = $order->getBillingAddress()->getName();
|
225 |
+
} else {
|
226 |
+
$templateId = Mage::getStoreConfig(
|
227 |
+
$helper::XML_PATH_EMAIL_REFERRED_GUEST, $storeId
|
228 |
+
);
|
229 |
+
$customerName = $order->getCustomerName();
|
230 |
+
}
|
231 |
+
} else {
|
232 |
+
// Retrieve corresponding email template id and customer name
|
233 |
+
if (!$order->getCustomerIsGuest()) {
|
234 |
+
$templateId = Mage::getStoreConfig($helper::XML_PATH_EMAIL_TEMPLATE, $storeId);
|
235 |
+
$customerName = $order->getBillingAddress()->getName();
|
236 |
+
} else {
|
237 |
+
$templateId = Mage::getStoreConfig(
|
238 |
+
$helper::XML_PATH_EMAIL_TEMPLATE_GUEST, $storeId
|
239 |
+
);
|
240 |
+
$customerName = $order->getCustomerName();
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
$mailer = Mage::getModel('core/email_template_mailer');
|
245 |
+
$emailInfo = Mage::getModel('core/email_info');
|
246 |
+
$emailInfo->addTo($order->getCustomerEmail(), $customerName);
|
247 |
+
if ($copyTo && $copyMethod == 'bcc') {
|
248 |
+
// Add bcc to customer email
|
249 |
+
foreach ($copyTo as $email) {
|
250 |
+
$emailInfo->addBcc($email);
|
251 |
+
}
|
252 |
+
}
|
253 |
+
$mailer->addEmailInfo($emailInfo);
|
254 |
+
|
255 |
+
// Email copies are sent as separated emails if their copy method is 'copy'
|
256 |
+
if ($copyTo && $copyMethod == 'copy') {
|
257 |
+
foreach ($copyTo as $email) {
|
258 |
+
$emailInfo = Mage::getModel('core/email_info');
|
259 |
+
$emailInfo->addTo($email);
|
260 |
+
$mailer->addEmailInfo($emailInfo);
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
// Set all required params and send emails
|
265 |
+
$mailer->setSender(
|
266 |
+
Mage::getStoreConfig(Mage_Sales_Model_Order::XML_PATH_EMAIL_IDENTITY, $storeId)
|
267 |
+
);
|
268 |
+
$mailer->setStoreId($storeId);
|
269 |
+
$mailer->setTemplateId($templateId);
|
270 |
+
$mailer->setTemplateParams(
|
271 |
+
array(
|
272 |
+
'order' => $order,
|
273 |
+
'billing' => $order->getBillingAddress(),
|
274 |
+
'payment_html' => $paymentBlockHtml,
|
275 |
+
'financeerror' => $this->getFinanceErrorText($financeStatus)
|
276 |
+
)
|
277 |
+
);
|
278 |
+
$mailer->send();
|
279 |
+
|
280 |
+
$order->setEmailSent(true);
|
281 |
+
Mage::getResourceSingleton('sales/order')->saveAttribute($order, 'email_sent');
|
282 |
+
|
283 |
+
return $this;
|
284 |
+
}
|
285 |
+
// @codingStandardsIgnoreEnd
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Finance status text to be used in the email
|
289 |
+
*
|
290 |
+
* @param string $financeStatus Status
|
291 |
+
*
|
292 |
+
* @return string Status text
|
293 |
+
*/
|
294 |
+
protected function getFinanceErrorText($financeStatus)
|
295 |
+
{
|
296 |
+
$helper = mage::helper('paybyfinance');
|
297 |
+
switch ($financeStatus) {
|
298 |
+
case 'ABANDON':
|
299 |
+
$financeError = $helper->__('been Abandoned');
|
300 |
+
break;
|
301 |
+
case 'DECLINED':
|
302 |
+
$financeError = $helper->__('been Declined');
|
303 |
+
break;
|
304 |
+
case 'REFERRED':
|
305 |
+
$financeError = $helper->__('REFERRED');
|
306 |
+
break;
|
307 |
+
default:
|
308 |
+
$financeError = $helper->__('experienced an error');
|
309 |
+
break;
|
310 |
+
}
|
311 |
+
|
312 |
+
return $financeError;
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Get emails to send order confirmation email
|
317 |
+
*
|
318 |
+
* @param string $configPath Config path
|
319 |
+
*
|
320 |
+
* @return array Emails or false
|
321 |
+
*/
|
322 |
+
protected function _getEmails($configPath)
|
323 |
+
{
|
324 |
+
$data = Mage::getStoreConfig($configPath, $this->getStoreId());
|
325 |
+
if (!empty($data)) {
|
326 |
+
return explode(',', $data);
|
327 |
+
}
|
328 |
+
return false;
|
329 |
+
}
|
330 |
+
}
|
app/code/local/HC/PayByFinance/Model/Calculator.php
CHANGED
@@ -187,6 +187,9 @@ class HC_PayByFinance_Model_Calculator extends Varien_Object
|
|
187 |
if ($financeAmount < $service->getMinAmount()) {
|
188 |
continue;
|
189 |
}
|
|
|
|
|
|
|
190 |
|
191 |
if ($service->getType() == 32) {
|
192 |
$installment = $this->calcMonthlyPaymentInterestFree($financeAmount, $service);
|
187 |
if ($financeAmount < $service->getMinAmount()) {
|
188 |
continue;
|
189 |
}
|
190 |
+
if (($service->getMaxAmount() !== null) && $financeAmount > $service->getMaxAmount()) {
|
191 |
+
continue;
|
192 |
+
}
|
193 |
|
194 |
if ($service->getType() == 32) {
|
195 |
$installment = $this->calcMonthlyPaymentInterestFree($financeAmount, $service);
|
app/code/local/HC/PayByFinance/Model/Mysql4/Service/Collection.php
CHANGED
@@ -40,14 +40,23 @@ class HC_PayByFinance_Model_Mysql4_Service_Collection
|
|
40 |
/**
|
41 |
* Add collection filter by price
|
42 |
*
|
43 |
-
* @param float $
|
|
|
|
|
44 |
*
|
45 |
* @return HC_PayByFinance_Model_Mysql4_Service_Collection
|
46 |
*/
|
47 |
-
public function addPriceFilter($
|
48 |
{
|
49 |
-
$
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
return $this;
|
53 |
}
|
40 |
/**
|
41 |
* Add collection filter by price
|
42 |
*
|
43 |
+
* @param float $minimumAmount minimum amount that service should offer
|
44 |
+
*
|
45 |
+
* @param float $maximalAmount maximal amount that service should offer
|
46 |
*
|
47 |
* @return HC_PayByFinance_Model_Mysql4_Service_Collection
|
48 |
*/
|
49 |
+
public function addPriceFilter($minimumAmount, $maximalAmount = null)
|
50 |
{
|
51 |
+
$this->addFieldToFilter('min_amount', array('lteq' => $minimumAmount));
|
52 |
+
|
53 |
+
if ($maximalAmount !== null) {
|
54 |
+
$this->addFieldToFilter(
|
55 |
+
array('max_amount', 'max_amount'), array(
|
56 |
+
array('gteq' => $maximalAmount), array('null' => true)
|
57 |
+
)
|
58 |
+
);
|
59 |
+
}
|
60 |
|
61 |
return $this;
|
62 |
}
|
app/code/local/HC/PayByFinance/Model/Observer.php
CHANGED
@@ -35,6 +35,10 @@ class HC_PayByFinance_Model_Observer
|
|
35 |
*/
|
36 |
public function enterpriseCacheClear($observer)
|
37 |
{
|
|
|
|
|
|
|
|
|
38 |
$cache = Mage::getModel('enterprise_pagecache/cache');
|
39 |
if ($cache) {
|
40 |
$cache::getCacheInstance()->clean();
|
@@ -81,6 +85,7 @@ class HC_PayByFinance_Model_Observer
|
|
81 |
|
82 |
$amt = $finance->getFinanceAmount() * -1;
|
83 |
if ($amt) {
|
|
|
84 |
$finance->setUpdateTotals(true);
|
85 |
// Use $finance->setUpdateTotals(false) to avoid Total Due to change
|
86 |
Mage::dispatchEvent(
|
@@ -191,7 +196,11 @@ class HC_PayByFinance_Model_Observer
|
|
191 |
'applicationNo' => $order->getFinanceApplicationNo(),
|
192 |
);
|
193 |
$post = Mage::getModel('paybyfinance/post');
|
194 |
-
$post->
|
|
|
|
|
|
|
|
|
195 |
|
196 |
$post->setNotificationData($data);
|
197 |
$response = $post->post();
|
35 |
*/
|
36 |
public function enterpriseCacheClear($observer)
|
37 |
{
|
38 |
+
if (!method_exists('Mage', 'getEdition') || Mage::getEdition() != 'Enterprise') {
|
39 |
+
// Not enterprise, do nothing.
|
40 |
+
return;
|
41 |
+
}
|
42 |
$cache = Mage::getModel('enterprise_pagecache/cache');
|
43 |
if ($cache) {
|
44 |
$cache::getCacheInstance()->clean();
|
85 |
|
86 |
$amt = $finance->getFinanceAmount() * -1;
|
87 |
if ($amt) {
|
88 |
+
$order->setCanSendNewEmailFlag(false);
|
89 |
$finance->setUpdateTotals(true);
|
90 |
// Use $finance->setUpdateTotals(false) to avoid Total Due to change
|
91 |
Mage::dispatchEvent(
|
196 |
'applicationNo' => $order->getFinanceApplicationNo(),
|
197 |
);
|
198 |
$post = Mage::getModel('paybyfinance/post');
|
199 |
+
$post->setStoreId($order->getStoreId());
|
200 |
+
$post->setPostAdapter(
|
201 |
+
Mage::getStoreConfig($helper::XML_PATH_CONNECTION_MODE),
|
202 |
+
$order->getStoreId()
|
203 |
+
);
|
204 |
|
205 |
$post->setNotificationData($data);
|
206 |
$response = $post->post();
|
app/code/local/HC/PayByFinance/Model/Post.php
CHANGED
@@ -28,6 +28,15 @@ class HC_PayByFinance_Model_Post extends Mage_Core_Model_Abstract
|
|
28 |
{
|
29 |
private $_adapter;
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* Set post adapter
|
33 |
*
|
@@ -87,27 +96,43 @@ class HC_PayByFinance_Model_Post extends Mage_Core_Model_Abstract
|
|
87 |
$wizard = Mage::getStoreConfig($helper::XML_PATH_WIZARD);
|
88 |
|
89 |
$fields = array(
|
90 |
-
'id' => trim(
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
'ver' => $adapter::PROTOCOL_VERSION,
|
93 |
-
'eea' => Mage::getStoreConfig(
|
|
|
|
|
94 |
'eurl' => Mage::getUrl(
|
95 |
-
'paybyfinance/checkout/response',
|
|
|
96 |
),
|
97 |
'acceptedURL' => Mage::getUrl(
|
98 |
-
'paybyfinance/checkout/response',
|
|
|
99 |
),
|
100 |
'referredURL' => Mage::getUrl(
|
101 |
-
'paybyfinance/checkout/response',
|
|
|
102 |
),
|
103 |
'declinedURL' => Mage::getUrl(
|
104 |
-
'paybyfinance/checkout/response',
|
|
|
105 |
),
|
106 |
'toStoreURL' => Mage::getUrl(
|
107 |
-
'paybyfinance/checkout/response',
|
|
|
108 |
),
|
109 |
'notificationURL' => Mage::getUrl(
|
110 |
-
'paybyfinance/notification',
|
|
|
111 |
),
|
112 |
'address_checked' => $addressChecked == "1" ? 'Y' : 'N',
|
113 |
'wizard' => $wizard == "1" ? 'new' : 'old',
|
@@ -130,8 +155,16 @@ class HC_PayByFinance_Model_Post extends Mage_Core_Model_Abstract
|
|
130 |
$adapter = $this->_adapter;
|
131 |
|
132 |
$fields = array(
|
133 |
-
'id' => trim(
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
);
|
136 |
$data = array_merge($data, $fields);
|
137 |
|
28 |
{
|
29 |
private $_adapter;
|
30 |
|
31 |
+
/**
|
32 |
+
* Constructor, used to set current store.
|
33 |
+
*/
|
34 |
+
public function __construct()
|
35 |
+
{
|
36 |
+
$this->setStoreId(Mage::app()->getStore()->getStoreId());
|
37 |
+
parent::__construct();
|
38 |
+
}
|
39 |
+
|
40 |
/**
|
41 |
* Set post adapter
|
42 |
*
|
96 |
$wizard = Mage::getStoreConfig($helper::XML_PATH_WIZARD);
|
97 |
|
98 |
$fields = array(
|
99 |
+
'id' => trim(
|
100 |
+
(string) Mage::getStoreConfig(
|
101 |
+
$helper::XML_PATH_PBF_ACCOUNT_ID1, $this->getStoreId()
|
102 |
+
)
|
103 |
+
),
|
104 |
+
'id2' => trim(
|
105 |
+
(string) Mage::getStoreConfig(
|
106 |
+
$helper::XML_PATH_PBF_ACCOUNT_ID2, $this->getStoreId()
|
107 |
+
)
|
108 |
+
),
|
109 |
'ver' => $adapter::PROTOCOL_VERSION,
|
110 |
+
'eea' => Mage::getStoreConfig(
|
111 |
+
$helper::XML_PATH_ERROR_NOTIFY_EMAIL, $this->getStoreId()
|
112 |
+
),
|
113 |
'eurl' => Mage::getUrl(
|
114 |
+
'paybyfinance/checkout/response',
|
115 |
+
array('_secure' => true, 'store' => $this->getStoreId())
|
116 |
),
|
117 |
'acceptedURL' => Mage::getUrl(
|
118 |
+
'paybyfinance/checkout/response',
|
119 |
+
array('_secure' => true, 'store' => $this->getStoreId())
|
120 |
),
|
121 |
'referredURL' => Mage::getUrl(
|
122 |
+
'paybyfinance/checkout/response',
|
123 |
+
array('_secure' => true, 'store' => $this->getStoreId())
|
124 |
),
|
125 |
'declinedURL' => Mage::getUrl(
|
126 |
+
'paybyfinance/checkout/response',
|
127 |
+
array('_secure' => true, 'store' => $this->getStoreId())
|
128 |
),
|
129 |
'toStoreURL' => Mage::getUrl(
|
130 |
+
'paybyfinance/checkout/response',
|
131 |
+
array('_secure' => true, 'store' => $this->getStoreId())
|
132 |
),
|
133 |
'notificationURL' => Mage::getUrl(
|
134 |
+
'paybyfinance/notification',
|
135 |
+
array('_secure' => true, 'store' => $this->getStoreId())
|
136 |
),
|
137 |
'address_checked' => $addressChecked == "1" ? 'Y' : 'N',
|
138 |
'wizard' => $wizard == "1" ? 'new' : 'old',
|
155 |
$adapter = $this->_adapter;
|
156 |
|
157 |
$fields = array(
|
158 |
+
'id' => trim(
|
159 |
+
(string) Mage::getStoreConfig(
|
160 |
+
$helper::XML_PATH_PBF_ACCOUNT_ID1, $this->getStoreId()
|
161 |
+
)
|
162 |
+
),
|
163 |
+
'id2' => trim(
|
164 |
+
(string) Mage::getStoreConfig(
|
165 |
+
$helper::XML_PATH_PBF_ACCOUNT_ID2, $this->getStoreId()
|
166 |
+
)
|
167 |
+
)
|
168 |
);
|
169 |
$data = array_merge($data, $fields);
|
170 |
|
app/code/local/HC/PayByFinance/Model/Sessionobserver.php
CHANGED
@@ -53,6 +53,7 @@ class HC_PayByFinance_Model_Sessionobserver
|
|
53 |
);
|
54 |
|
55 |
$minAmount = $service->getMinAmount();
|
|
|
56 |
|
57 |
if ($includeShipping) {
|
58 |
$shippingCost = $address->getShippingInclTax();
|
@@ -69,6 +70,10 @@ class HC_PayByFinance_Model_Sessionobserver
|
|
69 |
$session->setData('enabled', false);
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
72 |
if (!$helper->isActive()) {
|
73 |
$session->setData('enabled', false);
|
74 |
}
|
@@ -76,4 +81,76 @@ class HC_PayByFinance_Model_Sessionobserver
|
|
76 |
|
77 |
return $this;
|
78 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
53 |
);
|
54 |
|
55 |
$minAmount = $service->getMinAmount();
|
56 |
+
$maxAmount = $service->getMaxAmount();
|
57 |
|
58 |
if ($includeShipping) {
|
59 |
$shippingCost = $address->getShippingInclTax();
|
70 |
$session->setData('enabled', false);
|
71 |
}
|
72 |
|
73 |
+
if (($maxAmount !== null) && ($eligibleAmount > $maxAmount)) {
|
74 |
+
$session->setData('enabled', false);
|
75 |
+
}
|
76 |
+
|
77 |
if (!$helper->isActive()) {
|
78 |
$session->setData('enabled', false);
|
79 |
}
|
81 |
|
82 |
return $this;
|
83 |
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Is the basket eligible based on minimum basket price?
|
87 |
+
*
|
88 |
+
* @return boolean Eligibility
|
89 |
+
*/
|
90 |
+
protected function minBasketPriceEligible()
|
91 |
+
{
|
92 |
+
$helper = Mage::helper('paybyfinance');
|
93 |
+
$cart = Mage::getModel('checkout/cart')->getQuote();
|
94 |
+
$eligibleAmount = Mage::helper('paybyfinance/cart')
|
95 |
+
->getEligibleAmount($cart->getAllItems());
|
96 |
+
|
97 |
+
$minBasketAmount = Mage::getStoreConfig(
|
98 |
+
$helper::XML_PATH_MINIMUM_PRICE_BASKET
|
99 |
+
);
|
100 |
+
|
101 |
+
return ($eligibleAmount >= $minBasketAmount);
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Is finance enabled?
|
106 |
+
*
|
107 |
+
* @return boolean Enabled
|
108 |
+
*/
|
109 |
+
protected function financeEnabled()
|
110 |
+
{
|
111 |
+
$session = $session = Mage::getSingleton('paybyfinance/session');
|
112 |
+
return $session->getData('enabled');
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Displaying a notice on the cart page if finance enabled and financed
|
117 |
+
* basket price is below minimum.
|
118 |
+
*
|
119 |
+
* @param Varien_Event_Observer $observer Observer
|
120 |
+
*
|
121 |
+
* @return void.
|
122 |
+
*/
|
123 |
+
public function predispatchCheckoutCartIndex(Varien_Event_Observer $observer)
|
124 |
+
{
|
125 |
+
$helper = Mage::helper('paybyfinance');
|
126 |
+
$minBasketAmount = Mage::getStoreConfig(
|
127 |
+
$helper::XML_PATH_MINIMUM_PRICE_BASKET
|
128 |
+
);
|
129 |
+
$minBasketAmountFormatted = Mage::helper('core')->currency($minBasketAmount, true, false);
|
130 |
+
|
131 |
+
if ($this->financeEnabled() && !$this->minBasketPriceEligible()) {
|
132 |
+
Mage::getSingleton('checkout/session')->addNotice(
|
133 |
+
$helper->__(
|
134 |
+
'The minimum Finance Amount is %s.',
|
135 |
+
$minBasketAmountFormatted
|
136 |
+
)
|
137 |
+
);
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Listening to the custom event to prevent baskets below minimum to
|
143 |
+
* proceed to checkout.
|
144 |
+
*
|
145 |
+
* @param Varien_Event_Observer $observer Observer
|
146 |
+
*
|
147 |
+
* @return void.
|
148 |
+
*/
|
149 |
+
public function predispatchCheckoutOnepageIndex(Varien_Event_Observer $observer)
|
150 |
+
{
|
151 |
+
if ($this->financeEnabled() && !$this->minBasketPriceEligible()) {
|
152 |
+
$url = Mage::getUrl('checkout/cart/index');
|
153 |
+
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
|
154 |
+
}
|
155 |
+
}
|
156 |
}
|
app/code/local/HC/PayByFinance/controllers/Adminhtml/Paybyfinance/ServiceController.php
CHANGED
@@ -149,8 +149,16 @@ class HC_PayByFinance_Adminhtml_Paybyfinance_ServiceController
|
|
149 |
->setMinAmount($postData['min_amount'])
|
150 |
->setMultiplier($postData['multiplier'])
|
151 |
->setRpm($postData['rpm'])
|
152 |
-
->setStoreId($storeId)
|
153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
Mage::getSingleton('adminhtml/session')->addSuccess(
|
156 |
Mage::helper('paybyfinance')
|
149 |
->setMinAmount($postData['min_amount'])
|
150 |
->setMultiplier($postData['multiplier'])
|
151 |
->setRpm($postData['rpm'])
|
152 |
+
->setStoreId($storeId);
|
153 |
+
|
154 |
+
|
155 |
+
if ($postData['max_amount'] === '') {
|
156 |
+
$serviceModel->setMaxAmount(null); //clear the value
|
157 |
+
} else {
|
158 |
+
$serviceModel->setMaxAmount($postData['max_amount']);
|
159 |
+
}
|
160 |
+
|
161 |
+
$serviceModel->save();
|
162 |
|
163 |
Mage::getSingleton('adminhtml/session')->addSuccess(
|
164 |
Mage::helper('paybyfinance')
|
app/code/local/HC/PayByFinance/controllers/NotificationController.php
CHANGED
@@ -74,7 +74,7 @@ class HC_PayByFinance_NotificationController extends Mage_Core_Controller_Front_
|
|
74 |
);
|
75 |
}
|
76 |
|
77 |
-
if ($result) {
|
78 |
$helper->log(
|
79 |
'Notification received successfully for order: ' . $orderId,
|
80 |
'notification'
|
74 |
);
|
75 |
}
|
76 |
|
77 |
+
if (isset($result) && $result) {
|
78 |
$helper->log(
|
79 |
'Notification received successfully for order: ' . $orderId,
|
80 |
'notification'
|
app/code/local/HC/PayByFinance/controllers/SelectorController.php
CHANGED
@@ -76,7 +76,7 @@ class HC_PayByFinance_SelectorController extends Mage_Core_Controller_Front_Acti
|
|
76 |
$this->_services = Mage::getModel('paybyfinance/service')
|
77 |
->getCollection()
|
78 |
->storeFilter(Mage::app()->getStore()->getStoreId())
|
79 |
-
->addPriceFilter($amount)
|
80 |
->load();
|
81 |
}
|
82 |
|
76 |
$this->_services = Mage::getModel('paybyfinance/service')
|
77 |
->getCollection()
|
78 |
->storeFilter(Mage::app()->getStore()->getStoreId())
|
79 |
+
->addPriceFilter($amount, $amount)
|
80 |
->load();
|
81 |
}
|
82 |
|
app/code/local/HC/PayByFinance/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<HC_PayByFinance>
|
5 |
-
<version>2.0.
|
6 |
</HC_PayByFinance>
|
7 |
</modules>
|
8 |
<global>
|
@@ -131,6 +131,24 @@
|
|
131 |
</paybyfinance>
|
132 |
</observers>
|
133 |
</paybyfinance_services_modified>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
<checkout_onepage_controller_success_action>
|
135 |
<observers>
|
136 |
<paybyfinance_checkout_success_action>
|
@@ -221,6 +239,30 @@
|
|
221 |
</observers>
|
222 |
</paybyfinance_status_controller_referred>
|
223 |
</events>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
</global>
|
226 |
|
@@ -300,6 +342,10 @@
|
|
300 |
<wizard>0</wizard>
|
301 |
<display_in_results>0</display_in_results>
|
302 |
<invoice_finance>0</invoice_finance>
|
|
|
|
|
|
|
|
|
303 |
</general>
|
304 |
<order_status>
|
305 |
<accepted>finance_accepted</accepted>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<HC_PayByFinance>
|
5 |
+
<version>2.0.3</version>
|
6 |
</HC_PayByFinance>
|
7 |
</modules>
|
8 |
<global>
|
131 |
</paybyfinance>
|
132 |
</observers>
|
133 |
</paybyfinance_services_modified>
|
134 |
+
<controller_action_predispatch_checkout_cart_index>
|
135 |
+
<observers>
|
136 |
+
<paybyfinance_checkout_cart_index>
|
137 |
+
<type>singleton</type>
|
138 |
+
<class>paybyfinance/sessionobserver</class>
|
139 |
+
<method>predispatchCheckoutCartIndex</method>
|
140 |
+
</paybyfinance_checkout_cart_index>
|
141 |
+
</observers>
|
142 |
+
</controller_action_predispatch_checkout_cart_index>
|
143 |
+
<controller_action_predispatch_checkout_onepage_index>
|
144 |
+
<observers>
|
145 |
+
<paybyfinance_checkout_onepage_index>
|
146 |
+
<type>singleton</type>
|
147 |
+
<class>paybyfinance/sessionobserver</class>
|
148 |
+
<method>predispatchCheckoutOnepageIndex</method>
|
149 |
+
</paybyfinance_checkout_onepage_index>
|
150 |
+
</observers>
|
151 |
+
</controller_action_predispatch_checkout_onepage_index>
|
152 |
<checkout_onepage_controller_success_action>
|
153 |
<observers>
|
154 |
<paybyfinance_checkout_success_action>
|
239 |
</observers>
|
240 |
</paybyfinance_status_controller_referred>
|
241 |
</events>
|
242 |
+
<template>
|
243 |
+
<email>
|
244 |
+
<hc_paybyfinance_general_declined_email translate="label" module="paybyfinance">
|
245 |
+
<label>New Order - PaybyFinance failed</label>
|
246 |
+
<file>paybyfinance/order_declined.html</file>
|
247 |
+
<type>html</type>
|
248 |
+
</hc_paybyfinance_general_declined_email>
|
249 |
+
<hc_paybyfinance_general_declined_email_guest translate="label" module="paybyfinance">
|
250 |
+
<label>New Order for Guest - PaybyFinance failed</label>
|
251 |
+
<file>paybyfinance/order_declined_guest.html</file>
|
252 |
+
<type>html</type>
|
253 |
+
</hc_paybyfinance_general_declined_email_guest>
|
254 |
+
<hc_paybyfinance_general_referred_email translate="label" module="paybyfinance">
|
255 |
+
<label>New Order - PaybyFinance referred</label>
|
256 |
+
<file>paybyfinance/order_referred.html</file>
|
257 |
+
<type>html</type>
|
258 |
+
</hc_paybyfinance_general_referred_email>
|
259 |
+
<hc_paybyfinance_general_referred_email_guest translate="label" module="paybyfinance">
|
260 |
+
<label>New Order for Guest - PaybyFinance referred</label>
|
261 |
+
<file>paybyfinance/order_referred_guest.html</file>
|
262 |
+
<type>html</type>
|
263 |
+
</hc_paybyfinance_general_referred_email_guest>
|
264 |
+
</email>
|
265 |
+
</template>
|
266 |
|
267 |
</global>
|
268 |
|
342 |
<wizard>0</wizard>
|
343 |
<display_in_results>0</display_in_results>
|
344 |
<invoice_finance>0</invoice_finance>
|
345 |
+
<declined_email>hc_paybyfinance_general_declined_email</declined_email>
|
346 |
+
<declined_email_guest>hc_paybyfinance_general_declined_email_guest</declined_email_guest>
|
347 |
+
<referred_email>hc_paybyfinance_general_referred_email</referred_email>
|
348 |
+
<referred_email_guest>hc_paybyfinance_general_referred_email_guest</referred_email_guest>
|
349 |
</general>
|
350 |
<order_status>
|
351 |
<accepted>finance_accepted</accepted>
|
app/code/local/HC/PayByFinance/etc/system.xml
CHANGED
@@ -126,6 +126,43 @@
|
|
126 |
<show_in_website>1</show_in_website>
|
127 |
<show_in_store>1</show_in_store>
|
128 |
</invoice_finance>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
</fields>
|
130 |
</general>
|
131 |
<order_status>
|
@@ -189,15 +226,6 @@
|
|
189 |
<show_in_store>1</show_in_store>
|
190 |
<sort_order>40</sort_order>
|
191 |
<fields>
|
192 |
-
<information>
|
193 |
-
<label>Information</label>
|
194 |
-
<frontend_type>select</frontend_type>
|
195 |
-
<source_model>paybyfinance/config_source_cms_block</source_model>
|
196 |
-
<sort_order>1</sort_order>
|
197 |
-
<show_in_default>1</show_in_default>
|
198 |
-
<show_in_website>1</show_in_website>
|
199 |
-
<show_in_store>1</show_in_store>
|
200 |
-
</information>
|
201 |
<accepted>
|
202 |
<label>Accepted</label>
|
203 |
<frontend_type>select</frontend_type>
|
126 |
<show_in_website>1</show_in_website>
|
127 |
<show_in_store>1</show_in_store>
|
128 |
</invoice_finance>
|
129 |
+
<referred_email>
|
130 |
+
<label>Order confirmation email for referred finance</label>
|
131 |
+
<frontend_type>select</frontend_type>
|
132 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
133 |
+
<sort_order>11</sort_order>
|
134 |
+
<show_in_default>1</show_in_default>
|
135 |
+
<show_in_website>1</show_in_website>
|
136 |
+
<show_in_store>1</show_in_store>
|
137 |
+
</referred_email>
|
138 |
+
<referred_email_guest>
|
139 |
+
<label>Order confirmation email for referred finance for Guest</label>
|
140 |
+
<frontend_type>select</frontend_type>
|
141 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
142 |
+
<sort_order>12</sort_order>
|
143 |
+
<show_in_default>1</show_in_default>
|
144 |
+
<show_in_website>1</show_in_website>
|
145 |
+
<show_in_store>1</show_in_store>
|
146 |
+
</referred_email_guest>
|
147 |
+
|
148 |
+
<declined_email>
|
149 |
+
<label>Order confirmation email for failed finance</label>
|
150 |
+
<frontend_type>select</frontend_type>
|
151 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
152 |
+
<sort_order>13</sort_order>
|
153 |
+
<show_in_default>1</show_in_default>
|
154 |
+
<show_in_website>1</show_in_website>
|
155 |
+
<show_in_store>1</show_in_store>
|
156 |
+
</declined_email>
|
157 |
+
<declined_email_guest>
|
158 |
+
<label>Order confirmation email for failed finance for Guest</label>
|
159 |
+
<frontend_type>select</frontend_type>
|
160 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
161 |
+
<sort_order>14</sort_order>
|
162 |
+
<show_in_default>1</show_in_default>
|
163 |
+
<show_in_website>1</show_in_website>
|
164 |
+
<show_in_store>1</show_in_store>
|
165 |
+
</declined_email_guest>
|
166 |
</fields>
|
167 |
</general>
|
168 |
<order_status>
|
226 |
<show_in_store>1</show_in_store>
|
227 |
<sort_order>40</sort_order>
|
228 |
<fields>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
<accepted>
|
230 |
<label>Accepted</label>
|
231 |
<frontend_type>select</frontend_type>
|
app/code/local/HC/PayByFinance/sql/paybyfinance_setup/html/information.html
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<div style="clear: both;" style="height: 15px;"></div>
|
2 |
-
<div id="main_information">
|
3 |
-
<h2>Financing Information</h2>
|
4 |
-
|
5 |
-
<p>Thanks for selecting to pay via finance. To complete this you will be directed to the checkout to pay the deposit and any non-finance products in your order.</p>
|
6 |
-
|
7 |
-
<p>Once you have completed this payment, you will be redirected to the Hitachi Capital Website to fill out your online credit application. This should not take more than 5 minutes and you will get an instant decision.</p>
|
8 |
-
<p><b><u>IMPORTANT</u>:</b> You will need print, sign and send the agreement provided by Hitachi Capital back to them before we can ship the products. Please do this as soon as possible after having the online application accepted to ensure we ship to you as soon as possible.</p>
|
9 |
-
|
10 |
-
<h2>Finance Criteria</h2>
|
11 |
-
<p>Before you continue, please ensure that you meet the following criteria:</p>
|
12 |
-
|
13 |
-
<ul>
|
14 |
-
<li>You are able to provide a residential address not a business address</li>
|
15 |
-
<li>You are a resident at this address</li>
|
16 |
-
<li>You are a UK resident for over 12 months and intend to stay in the UK</li>
|
17 |
-
<li>You are 18 or older</li>
|
18 |
-
<li>You or your partner is, in permanent paid employment (over 16 hours per week), retired and receiving a pension or are self employed</li>
|
19 |
-
<li>You are able to provide acceptable proof of address (if delivery address is different to that used in the credit agreement) and proof of signature</li>
|
20 |
-
<li>You are purchasing the product for consumer use and not business use</li>
|
21 |
-
</ul>
|
22 |
-
|
23 |
-
<p>If you fail to meet these criteria, please contact us</p>
|
24 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/HC/PayByFinance/sql/paybyfinance_setup/{mysql4-install-2.0.0.php → mysql4-install-2.0.3.php}
RENAMED
@@ -63,6 +63,7 @@ CREATE TABLE {$this->getTable('paybyfinance_service')} (
|
|
63 |
`min_amount` decimal(9,4) NOT NULL default '0',
|
64 |
`multiplier` double(10,8) NOT NULL default '0',
|
65 |
`rpm` double(10,8) NOT NULL default '0',
|
|
|
66 |
PRIMARY KEY (`service_id`),
|
67 |
CONSTRAINT `FK_paybyfinance_serice_core_store_store_id` FOREIGN KEY(`store_id`)
|
68 |
REFERENCES `{$this->getTable('core_store')}` (`store_id`)
|
@@ -129,7 +130,6 @@ $service->setName('Interest free')
|
|
129 |
|
130 |
// Blocks.
|
131 |
$blocks = array(
|
132 |
-
'information' => 'Finance Information',
|
133 |
'accepted' => 'Finance Accepted',
|
134 |
'referred' => 'Finance Referred',
|
135 |
'declined' => 'Finance Declined',
|
@@ -248,4 +248,17 @@ $cmsPage = array (
|
|
248 |
|
249 |
Mage::getModel('cms/page')->setData($cmsPage)->save();
|
250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
$installer->endSetup();
|
63 |
`min_amount` decimal(9,4) NOT NULL default '0',
|
64 |
`multiplier` double(10,8) NOT NULL default '0',
|
65 |
`rpm` double(10,8) NOT NULL default '0',
|
66 |
+
`max_amount` decimal(9,4) NULL,
|
67 |
PRIMARY KEY (`service_id`),
|
68 |
CONSTRAINT `FK_paybyfinance_serice_core_store_store_id` FOREIGN KEY(`store_id`)
|
69 |
REFERENCES `{$this->getTable('core_store')}` (`store_id`)
|
130 |
|
131 |
// Blocks.
|
132 |
$blocks = array(
|
|
|
133 |
'accepted' => 'Finance Accepted',
|
134 |
'referred' => 'Finance Referred',
|
135 |
'declined' => 'Finance Declined',
|
248 |
|
249 |
Mage::getModel('cms/page')->setData($cmsPage)->save();
|
250 |
|
251 |
+
// @codingStandardsIgnoreStart
|
252 |
+
$configValuesMap = array(
|
253 |
+
'hc_paybyfinance/general/referred_email' => 'hc_paybyfinance_general_referred_email',
|
254 |
+
'hc_paybyfinance/general/referred_email_guest' => 'hc_paybyfinance_general_referred_email_guest',
|
255 |
+
'hc_paybyfinance/general/declined_email' => 'hc_paybyfinance_general_declined_email',
|
256 |
+
'hc_paybyfinance/general/declined_email_guest' => 'hc_paybyfinance_general_declined_email_guest',
|
257 |
+
);
|
258 |
+
// @codingStandardsIgnoreEnd
|
259 |
+
|
260 |
+
foreach ($configValuesMap as $configPath=>$configValue) {
|
261 |
+
$resinstaller->setConfigData($configPath, $configValue);
|
262 |
+
}
|
263 |
+
|
264 |
$installer->endSetup();
|
app/code/local/HC/PayByFinance/sql/paybyfinance_setup/mysql4-upgrade-2.0.0-2.0.1.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.4.*
|
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;
|
19 |
+
|
20 |
+
$updater->startSetup();
|
21 |
+
|
22 |
+
$resinstaller = Mage::getModel('sales/resource_setup', 'core_setup');
|
23 |
+
|
24 |
+
$configValuesMap = array(
|
25 |
+
'hc_paybyfinance/general/declined_email' => 'hc_paybyfinance_general_declined_email',
|
26 |
+
'hc_paybyfinance/general/declined_email_guest' =>
|
27 |
+
'hc_paybyfinance_general_declined_email_guest',
|
28 |
+
);
|
29 |
+
|
30 |
+
foreach ($configValuesMap as $configPath=>$configValue) {
|
31 |
+
$resinstaller->setConfigData($configPath, $configValue);
|
32 |
+
}
|
33 |
+
|
34 |
+
$updater->endSetup();
|
app/code/local/HC/PayByFinance/sql/paybyfinance_setup/mysql4-upgrade-2.0.1-2.0.2.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Hitachi Capital Pay By Finance
|
4 |
+
*
|
5 |
+
* Hitachi Capital Pay By Finance Extension
|
6 |
+
*
|
7 |
+
* PHP version >= 5.4.*
|
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;
|
19 |
+
|
20 |
+
$updater->startSetup();
|
21 |
+
|
22 |
+
$updater->run(
|
23 |
+
"
|
24 |
+
ALTER TABLE {$this->getTable('paybyfinance_service')}
|
25 |
+
ADD COLUMN `max_amount` decimal(9,4) NULL;
|
26 |
+
"
|
27 |
+
);
|
28 |
+
$updater->endSetup();
|
app/code/local/HC/PayByFinance/sql/paybyfinance_setup/mysql4-upgrade-2.0.2-2.0.3.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.4.*
|
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 |
+
// @codingStandardsIgnoreFile
|
18 |
+
|
19 |
+
$updater = $this;
|
20 |
+
|
21 |
+
$updater->startSetup();
|
22 |
+
|
23 |
+
$resinstaller = Mage::getModel('sales/resource_setup', 'core_setup');
|
24 |
+
|
25 |
+
$configValuesMap = array(
|
26 |
+
'hc_paybyfinance/general/referred_email' => 'hc_paybyfinance_general_referred_email',
|
27 |
+
'hc_paybyfinance/general/referred_email_guest' => 'hc_paybyfinance_general_referred_email_guest',
|
28 |
+
);
|
29 |
+
|
30 |
+
foreach ($configValuesMap as $configPath=>$configValue) {
|
31 |
+
$resinstaller->setConfigData($configPath, $configValue);
|
32 |
+
}
|
33 |
+
|
34 |
+
$updater->endSetup();
|
app/design/frontend/base/default/template/paybyfinance/selector.phtml
CHANGED
@@ -226,7 +226,17 @@ $_secure = $this->getRequest()->isSecure();
|
|
226 |
if ($('pbf-cart-btn')) {
|
227 |
Form.Element.disable('pbf-cart-btn');
|
228 |
}
|
229 |
-
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
$('pbf-error-msg').update(null);
|
231 |
$('pbf-error').setStyle({height: 0, opacity: 0});
|
232 |
$('pbf-error-msg').hide();
|
226 |
if ($('pbf-cart-btn')) {
|
227 |
Form.Element.disable('pbf-cart-btn');
|
228 |
}
|
229 |
+
} else if (!(service.max_amount === undefined || service.max_amount === null) && (credit > service.max_amount)) {
|
230 |
+
$('pbf-error-msg').update("The maximum Finance Amount is £"+ currencyFormat(service.max_amount));
|
231 |
+
$('pbf-error').setStyle({height: 45+"px", opacity: 0.99});
|
232 |
+
$('pbf-error-msg').show();
|
233 |
+
if ($('pbf-productcart-btn')) {
|
234 |
+
Form.Element.disable('pbf-productcart-btn');
|
235 |
+
}
|
236 |
+
if ($('pbf-cart-btn')) {
|
237 |
+
Form.Element.disable('pbf-cart-btn');
|
238 |
+
}
|
239 |
+
} else {
|
240 |
$('pbf-error-msg').update(null);
|
241 |
$('pbf-error').setStyle({height: 0, opacity: 0});
|
242 |
$('pbf-error-msg').hide();
|
app/locale/en_US/template/email/paybyfinance/order_declined.html
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--@subject {{var store.getFrontendName()}}: New Order # {{var order.increment_id}} @-->
|
2 |
+
<!--@vars
|
3 |
+
{"store url=\"\"":"Store Url",
|
4 |
+
"var logo_url":"Email Logo Image Url",
|
5 |
+
"var logo_alt":"Email Logo Image Alt",
|
6 |
+
"htmlescape var=$order.getCustomerName()":"Customer Name",
|
7 |
+
"var store.getFrontendName()":"Store Name",
|
8 |
+
"store url=\"customer/account/\"":"Customer Account Url",
|
9 |
+
"var order.increment_id":"Order Id",
|
10 |
+
"var order.getCreatedAtFormated('long')":"Order Created At (datetime)",
|
11 |
+
"var order.getBillingAddress().format('html')":"Billing Address",
|
12 |
+
"var payment_html":"Payment Details",
|
13 |
+
"var order.getShippingAddress().format('html')":"Shipping Address",
|
14 |
+
"var order.getShippingDescription()":"Shipping Description",
|
15 |
+
"layout handle=\"sales_email_order_items\" order=$order":"Order Items Grid",
|
16 |
+
"var order.getEmailCustomerNote()":"Email Order Note"}
|
17 |
+
@-->
|
18 |
+
<!--@styles
|
19 |
+
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
|
20 |
+
@-->
|
21 |
+
|
22 |
+
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
23 |
+
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
24 |
+
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
25 |
+
<tr>
|
26 |
+
<td align="center" valign="top" style="padding:20px 0 20px 0">
|
27 |
+
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
|
28 |
+
<!-- [ header starts here] -->
|
29 |
+
<tr>
|
30 |
+
<td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
|
31 |
+
</tr>
|
32 |
+
<!-- [ middle starts here] -->
|
33 |
+
<tr>
|
34 |
+
<td valign="top">
|
35 |
+
<h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">Hello, {{htmlescape var=$order.getCustomerName()}}</h1>
|
36 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Thank you for your order at {{var store.getFrontendName()}}.</p>
|
37 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your finance application has {{var financeerror}}. Please call our Customer Service Team on {{config path="general/store_information/phone"}} to discuss your order.</p>
|
38 |
+
</p>
|
39 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your order confirmation is below. Thank you again for your business.</p>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td>
|
43 |
+
<h2 style="font-size:18px; font-weight:normal; margin:0;">Your Order #{{var order.increment_id}} <small>(placed on {{var order.getCreatedAtFormated('long')}})</small></h2>
|
44 |
+
</td>
|
45 |
+
</tr>
|
46 |
+
<tr>
|
47 |
+
<td>
|
48 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
49 |
+
<thead>
|
50 |
+
<tr>
|
51 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Billing Information:</th>
|
52 |
+
<th width="10"></th>
|
53 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Payment Method:</th>
|
54 |
+
</tr>
|
55 |
+
</thead>
|
56 |
+
<tbody>
|
57 |
+
<tr>
|
58 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
59 |
+
{{var order.getBillingAddress().format('html')}}
|
60 |
+
</td>
|
61 |
+
<td> </td>
|
62 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
63 |
+
{{var payment_html}}
|
64 |
+
</td>
|
65 |
+
</tr>
|
66 |
+
</tbody>
|
67 |
+
</table>
|
68 |
+
<br/>
|
69 |
+
{{depend order.getIsNotVirtual()}}
|
70 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
71 |
+
<thead>
|
72 |
+
<tr>
|
73 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Information:</th>
|
74 |
+
<th width="10"></th>
|
75 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Method:</th>
|
76 |
+
</tr>
|
77 |
+
</thead>
|
78 |
+
<tbody>
|
79 |
+
<tr>
|
80 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
81 |
+
{{var order.getShippingAddress().format('html')}}
|
82 |
+
|
83 |
+
</td>
|
84 |
+
<td> </td>
|
85 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
86 |
+
{{var order.getShippingDescription()}}
|
87 |
+
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
+
</tbody>
|
91 |
+
</table>
|
92 |
+
<br/>
|
93 |
+
{{/depend}}
|
94 |
+
{{layout handle="sales_email_order_items" order=$order}}
|
95 |
+
<p style="font-size:12px; margin:0 0 10px 0">{{var order.getEmailCustomerNote()}}</p>
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
<tr>
|
99 |
+
<td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
|
100 |
+
</tr>
|
101 |
+
</table>
|
102 |
+
</td>
|
103 |
+
</tr>
|
104 |
+
</table>
|
105 |
+
</div>
|
106 |
+
</body>
|
app/locale/en_US/template/email/paybyfinance/order_declined_guest.html
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--@subject {{var store.getFrontendName()}}: New Order # {{var order.increment_id}} @-->
|
2 |
+
<!--@vars
|
3 |
+
{"store url=\"\"":"Store Url",
|
4 |
+
"var logo_url":"Email Logo Image Url",
|
5 |
+
"var logo_alt":"Email Logo Image Alt",
|
6 |
+
"htmlescape var=$order.getBillingAddress().getName()":"Guest Customer Name",
|
7 |
+
"var store.getFrontendName()":"Store Name",
|
8 |
+
"var order.increment_id":"Order Id",
|
9 |
+
"var order.getCreatedAtFormated('long')":"Order Created At (datetime)",
|
10 |
+
"var order.getBillingAddress().format('html')":"Billing Address",
|
11 |
+
"var payment_html":"Payment Details",
|
12 |
+
"var order.getShippingAddress().format('html')":"Shipping Address",
|
13 |
+
"var order.getShippingDescription()":"Shipping Description",
|
14 |
+
"layout handle=\"sales_email_order_items\" order=$order":"Order Items Grid",
|
15 |
+
"var order.getEmailCustomerNote()":"Email Order Note"}
|
16 |
+
@-->
|
17 |
+
<!--@styles
|
18 |
+
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
|
19 |
+
@-->
|
20 |
+
|
21 |
+
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
22 |
+
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
23 |
+
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
24 |
+
<tr>
|
25 |
+
<td align="center" valign="top" style="padding:20px 0 20px 0">
|
26 |
+
<!-- [ header starts here] -->
|
27 |
+
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
|
28 |
+
<tr>
|
29 |
+
<td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
|
30 |
+
</tr>
|
31 |
+
<!-- [ middle starts here] -->
|
32 |
+
<tr>
|
33 |
+
<td valign="top">
|
34 |
+
<h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Hello, {{htmlescape var=$order.getBillingAddress().getName()}}</h1>
|
35 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Thank you for your order at {{var store.getFrontendName()}}.</p>
|
36 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your finance application has {{var financeerror}}. Please call our Customer Service Team on {{config path="general/store_information/phone"}} to discuss your order.</p>
|
37 |
+
</p>
|
38 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your order confirmation is below. Thank you again for your business.</p>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td>
|
43 |
+
<h2 style="font-size:18px; font-weight:normal; margin:0;">Your Order #{{var order.increment_id}} <small>(placed on {{var order.getCreatedAtFormated('long')}})</small></h2>
|
44 |
+
</td>
|
45 |
+
</tr>
|
46 |
+
<tr>
|
47 |
+
<td>
|
48 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
49 |
+
<thead>
|
50 |
+
<tr>
|
51 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Billing Information:</th>
|
52 |
+
<th width="10"></th>
|
53 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Payment Method:</th>
|
54 |
+
</tr>
|
55 |
+
</thead>
|
56 |
+
<tbody>
|
57 |
+
<tr>
|
58 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
59 |
+
{{var order.getBillingAddress().format('html')}}
|
60 |
+
</td>
|
61 |
+
<td> </td>
|
62 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
63 |
+
{{var payment_html}}
|
64 |
+
</td>
|
65 |
+
</tr>
|
66 |
+
</tbody>
|
67 |
+
</table>
|
68 |
+
<br/>
|
69 |
+
{{depend order.getIsNotVirtual()}}
|
70 |
+
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
71 |
+
<thead>
|
72 |
+
<tr>
|
73 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Information:</th>
|
74 |
+
<th width="10"></th>
|
75 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Method:</th>
|
76 |
+
</tr>
|
77 |
+
</thead>
|
78 |
+
<tbody>
|
79 |
+
<tr>
|
80 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
81 |
+
{{var order.getShippingAddress().format('html')}}
|
82 |
+
|
83 |
+
</td>
|
84 |
+
<td> </td>
|
85 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
86 |
+
{{var order.getShippingDescription()}}
|
87 |
+
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
+
</tbody>
|
91 |
+
</table>
|
92 |
+
<br/>
|
93 |
+
{{/depend}}
|
94 |
+
{{layout handle="sales_email_order_items" order=$order}}
|
95 |
+
<p style="font-size:12px; margin:0 10px 10px 0">{{var order.getEmailCustomerNote()}}</p>
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
<tr>
|
99 |
+
<td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you again, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
|
100 |
+
</tr>
|
101 |
+
</table>
|
102 |
+
</td>
|
103 |
+
</tr>
|
104 |
+
</table>
|
105 |
+
</div>
|
106 |
+
</body>
|
app/locale/en_US/template/email/paybyfinance/order_referred.html
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--@subject {{var store.getFrontendName()}}: New Order # {{var order.increment_id}} @-->
|
2 |
+
<!--@vars
|
3 |
+
{"store url=\"\"":"Store Url",
|
4 |
+
"var logo_url":"Email Logo Image Url",
|
5 |
+
"var logo_alt":"Email Logo Image Alt",
|
6 |
+
"htmlescape var=$order.getCustomerName()":"Customer Name",
|
7 |
+
"var store.getFrontendName()":"Store Name",
|
8 |
+
"store url=\"customer/account/\"":"Customer Account Url",
|
9 |
+
"var order.increment_id":"Order Id",
|
10 |
+
"var order.getCreatedAtFormated('long')":"Order Created At (datetime)",
|
11 |
+
"var order.getBillingAddress().format('html')":"Billing Address",
|
12 |
+
"var payment_html":"Payment Details",
|
13 |
+
"var order.getShippingAddress().format('html')":"Shipping Address",
|
14 |
+
"var order.getShippingDescription()":"Shipping Description",
|
15 |
+
"layout handle=\"sales_email_order_items\" order=$order":"Order Items Grid",
|
16 |
+
"var order.getEmailCustomerNote()":"Email Order Note"}
|
17 |
+
@-->
|
18 |
+
<!--@styles
|
19 |
+
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
|
20 |
+
@-->
|
21 |
+
|
22 |
+
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
23 |
+
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
24 |
+
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
25 |
+
<tr>
|
26 |
+
<td align="center" valign="top" style="padding:20px 0 20px 0">
|
27 |
+
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
|
28 |
+
<!-- [ header starts here] -->
|
29 |
+
<tr>
|
30 |
+
<td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
|
31 |
+
</tr>
|
32 |
+
<!-- [ middle starts here] -->
|
33 |
+
<tr>
|
34 |
+
<td valign="top">
|
35 |
+
<h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">Hello, {{htmlescape var=$order.getCustomerName()}}</h1>
|
36 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Thank you for your order at {{var store.getFrontendName()}}.</p>
|
37 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your finance application has been Referred.</p>
|
38 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your order confirmation is below. Thank you again for your business.</p>
|
39 |
+
</tr>
|
40 |
+
<tr>
|
41 |
+
<td>
|
42 |
+
<h2 style="font-size:18px; font-weight:normal; margin:0;">Your Order #{{var order.increment_id}} <small>(placed on {{var order.getCreatedAtFormated('long')}})</small></h2>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
<tr>
|
46 |
+
<td>
|
47 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
48 |
+
<thead>
|
49 |
+
<tr>
|
50 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Billing Information:</th>
|
51 |
+
<th width="10"></th>
|
52 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Payment Method:</th>
|
53 |
+
</tr>
|
54 |
+
</thead>
|
55 |
+
<tbody>
|
56 |
+
<tr>
|
57 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
58 |
+
{{var order.getBillingAddress().format('html')}}
|
59 |
+
</td>
|
60 |
+
<td> </td>
|
61 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
62 |
+
{{var payment_html}}
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
</tbody>
|
66 |
+
</table>
|
67 |
+
<br/>
|
68 |
+
{{depend order.getIsNotVirtual()}}
|
69 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
70 |
+
<thead>
|
71 |
+
<tr>
|
72 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Information:</th>
|
73 |
+
<th width="10"></th>
|
74 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Method:</th>
|
75 |
+
</tr>
|
76 |
+
</thead>
|
77 |
+
<tbody>
|
78 |
+
<tr>
|
79 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
80 |
+
{{var order.getShippingAddress().format('html')}}
|
81 |
+
|
82 |
+
</td>
|
83 |
+
<td> </td>
|
84 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
85 |
+
{{var order.getShippingDescription()}}
|
86 |
+
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
</tbody>
|
90 |
+
</table>
|
91 |
+
<br/>
|
92 |
+
{{/depend}}
|
93 |
+
{{layout handle="sales_email_order_items" order=$order}}
|
94 |
+
<p style="font-size:12px; margin:0 0 10px 0">{{var order.getEmailCustomerNote()}}</p>
|
95 |
+
</td>
|
96 |
+
</tr>
|
97 |
+
<tr>
|
98 |
+
<td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
|
99 |
+
</tr>
|
100 |
+
</table>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
</table>
|
104 |
+
</div>
|
105 |
+
</body>
|
app/locale/en_US/template/email/paybyfinance/order_referred_guest.html
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--@subject {{var store.getFrontendName()}}: New Order # {{var order.increment_id}} @-->
|
2 |
+
<!--@vars
|
3 |
+
{"store url=\"\"":"Store Url",
|
4 |
+
"var logo_url":"Email Logo Image Url",
|
5 |
+
"var logo_alt":"Email Logo Image Alt",
|
6 |
+
"htmlescape var=$order.getBillingAddress().getName()":"Guest Customer Name",
|
7 |
+
"var store.getFrontendName()":"Store Name",
|
8 |
+
"var order.increment_id":"Order Id",
|
9 |
+
"var order.getCreatedAtFormated('long')":"Order Created At (datetime)",
|
10 |
+
"var order.getBillingAddress().format('html')":"Billing Address",
|
11 |
+
"var payment_html":"Payment Details",
|
12 |
+
"var order.getShippingAddress().format('html')":"Shipping Address",
|
13 |
+
"var order.getShippingDescription()":"Shipping Description",
|
14 |
+
"layout handle=\"sales_email_order_items\" order=$order":"Order Items Grid",
|
15 |
+
"var order.getEmailCustomerNote()":"Email Order Note"}
|
16 |
+
@-->
|
17 |
+
<!--@styles
|
18 |
+
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
|
19 |
+
@-->
|
20 |
+
|
21 |
+
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
22 |
+
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
|
23 |
+
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
24 |
+
<tr>
|
25 |
+
<td align="center" valign="top" style="padding:20px 0 20px 0">
|
26 |
+
<!-- [ header starts here] -->
|
27 |
+
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
|
28 |
+
<tr>
|
29 |
+
<td valign="top"><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a></td>
|
30 |
+
</tr>
|
31 |
+
<!-- [ middle starts here] -->
|
32 |
+
<tr>
|
33 |
+
<td valign="top">
|
34 |
+
<h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Hello, {{htmlescape var=$order.getBillingAddress().getName()}}</h1>
|
35 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Thank you for your order at {{var store.getFrontendName()}}.</p>
|
36 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your finance application has been Referred.</p>
|
37 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your order confirmation is below. Thank you again for your business.</p>
|
38 |
+
</td>
|
39 |
+
</tr>
|
40 |
+
<tr>
|
41 |
+
<td>
|
42 |
+
<h2 style="font-size:18px; font-weight:normal; margin:0;">Your Order #{{var order.increment_id}} <small>(placed on {{var order.getCreatedAtFormated('long')}})</small></h2>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
<tr>
|
46 |
+
<td>
|
47 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
48 |
+
<thead>
|
49 |
+
<tr>
|
50 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Billing Information:</th>
|
51 |
+
<th width="10"></th>
|
52 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Payment Method:</th>
|
53 |
+
</tr>
|
54 |
+
</thead>
|
55 |
+
<tbody>
|
56 |
+
<tr>
|
57 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
58 |
+
{{var order.getBillingAddress().format('html')}}
|
59 |
+
</td>
|
60 |
+
<td> </td>
|
61 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
62 |
+
{{var payment_html}}
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
</tbody>
|
66 |
+
</table>
|
67 |
+
<br/>
|
68 |
+
{{depend order.getIsNotVirtual()}}
|
69 |
+
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
70 |
+
<thead>
|
71 |
+
<tr>
|
72 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Information:</th>
|
73 |
+
<th width="10"></th>
|
74 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Method:</th>
|
75 |
+
</tr>
|
76 |
+
</thead>
|
77 |
+
<tbody>
|
78 |
+
<tr>
|
79 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
80 |
+
{{var order.getShippingAddress().format('html')}}
|
81 |
+
|
82 |
+
</td>
|
83 |
+
<td> </td>
|
84 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
85 |
+
{{var order.getShippingDescription()}}
|
86 |
+
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
</tbody>
|
90 |
+
</table>
|
91 |
+
<br/>
|
92 |
+
{{/depend}}
|
93 |
+
{{layout handle="sales_email_order_items" order=$order}}
|
94 |
+
<p style="font-size:12px; margin:0 10px 10px 0">{{var order.getEmailCustomerNote()}}</p>
|
95 |
+
</td>
|
96 |
+
</tr>
|
97 |
+
<tr>
|
98 |
+
<td bgcolor="#EAEAEA" align="center" style="background:#EAEAEA; text-align:center;"><center><p style="font-size:12px; margin:0;">Thank you again, <strong>{{var store.getFrontendName()}}</strong></p></center></td>
|
99 |
+
</tr>
|
100 |
+
</table>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
</table>
|
104 |
+
</div>
|
105 |
+
</body>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>HC_PayByFinance</name>
|
4 |
-
<version>2.0.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.healthywebsites.co.uk/license.html">Healthy Websites</license>
|
7 |
<channel>community</channel>
|
@@ -9,16 +9,14 @@
|
|
9 |
<summary>Hitachi Capital PaybyFinance</summary>
|
10 |
<description>Hitachi Capital PaybyFinance</description>
|
11 |
<notes>Change Log:
|
12 |
-
*
|
13 |
-
*
|
14 |
-
* HC-
|
15 |
-
*
|
16 |
-
* Legacy PHP 5.3 support
|
17 |
-
* Undefined variable notice fix</notes>
|
18 |
<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></authors>
|
19 |
-
<date>2016-
|
20 |
-
<time>
|
21 |
-
<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="46d17d14a08b88ce3984c76cacb0e49b"/><dir name="Service"><dir name="Edit"><file name="Form.php" hash="795e6da10c09c6cdb0eb2b0efd12e411"/><dir name="Tab"><file name="Form.php" hash="
|
22 |
<compatible/>
|
23 |
-
<dependencies><required><php><min>5.4.45</min><max>7.0.
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>HC_PayByFinance</name>
|
4 |
+
<version>2.0.3.0</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 PaybyFinance</summary>
|
10 |
<description>Hitachi Capital PaybyFinance</description>
|
11 |
<notes>Change Log:
|
12 |
+
* HC-131 Additional transactional email templates for Finance Accepted, Referred, Declined, Abandon, Error
|
13 |
+
* HC-280 Add maximum finance limit for service
|
14 |
+
* HC-302 Fix for minimum basket price setting in admin being ignored
|
15 |
+
* HC-310 Fix for shipment notification using “Default Config” settings for notifying PaybyFinance</notes>
|
|
|
|
|
16 |
<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></authors>
|
17 |
+
<date>2016-03-22</date>
|
18 |
+
<time>16:33:42</time>
|
19 |
+
<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="46d17d14a08b88ce3984c76cacb0e49b"/><dir name="Service"><dir name="Edit"><file name="Form.php" hash="795e6da10c09c6cdb0eb2b0efd12e411"/><dir name="Tab"><file name="Form.php" hash="0ed11d49291ab6e557e22d89f59cb8fc"/></dir><file name="Tabs.php" hash="6bae46296191ce6117cf451b33845632"/></dir><file name="Edit.php" hash="e2b8f8e008230c1422affde245deeece"/><file name="Grid.php" hash="74fb7091efc51541ba1a2e6c59ab6058"/></dir><file name="Service.php" hash="47c7ad1303dc525e3739e85d79916615"/></dir><file name="Version.php" hash="fb008d66550d44f9a1d7a5b484c43ec7"/></dir><dir name="Checkout"><file name="Redirect.php" hash="3072817fc35701741a607735a258de49"/></dir><dir name="Product"><dir name="List"><file name="Finance.php" hash="d542ae3b6181d0d1fe7643a4466ecd71"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Totals.php" hash="2a21d61db9d09bc92f6c4e3f81e871e6"/></dir></dir><file name="Selector.php" hash="47a94d617091cd464be682b71700219f"/><file name="Status.php" hash="c32779b4fe38284bdd928ff8cbe773bd"/></dir><dir name="Helper"><file name="Cart.php" hash="5239ec52b11e526c2a15f05326a9b37d"/><file name="Checkout.php" hash="49ea2ce9e12044122e83b9b8f43fea4c"/><file name="Data.php" hash="d807ff374018f6068227b907c8c6b5c1"/><file name="Notification.php" hash="3c23790391190ec702692248e9a5ecc6"/><file name="Order.php" hash="2c4ba55568bec241db242b57a1f8b065"/></dir><dir name="Model"><file name="Calculator.php" hash="ae4d4769df38fea763035794cf5b8a40"/><dir name="Config"><dir name="Source"><dir name="Catalog"><dir name="Product"><file name="Finance.php" hash="6f56646346c6121b6aaccc423cfd330a"/><file name="Type.php" hash="bd01a8bb27db5be6121597a2eaaaa0cf"/></dir></dir><dir name="Cms"><file name="Block.php" hash="4d54ff32ae233accceade52ad4005574"/></dir><file name="Connectionmode.php" hash="bc52be78a5078dbfe2938873157cb31e"/><dir name="Notification"><file name="Status.php" hash="4511641cddc47b4db8ed5333304a1439"/></dir><file name="Type.php" hash="becda2eb287dc0bc9c5f969a4e1950b1"/></dir></dir><file name="Log.php" hash="4437d6a3f4952c52e0a67e970e4c8eef"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="085a5f4eb72fd3b29fe75a772214cfc2"/></dir><file name="Log.php" hash="a0bfe9246e61ff3aa3e3d6ed1960efc9"/><dir name="Service"><file name="Collection.php" hash="411e207c9d735b6e37c762961cf3bbd0"/></dir><file name="Service.php" hash="8b2e4a231760d07e27d40e4145489f61"/></dir><file name="Observer.php" hash="ce856a8c800f7aa31f60206eabc6f95b"/><dir name="Paypal"><dir name="Api"><file name="Nvp.php" hash="93b2810387631d1cb0802f303174d73b"/></dir><dir name="Hostedpro"><file name="Request.php" hash="07ac676c417b5e4602ae2ebc26427341"/></dir></dir><dir name="PaypalUk"><dir name="Api"><file name="Nvp.php" hash="0f55997489e0fd41a79106bc4026990c"/></dir></dir><dir name="Post"><file name="Abstract.php" hash="7cb555e3a22a1118a02c595b3e01b458"/><file name="Custom.php" hash="998ccd20956707a1d45bc30742226b16"/><file name="Live.php" hash="1ddf37b095e27247f02fdd21dded1e54"/><file name="Simulation.php" hash="2ce0770deb178de4f8961f5ade1ee61b"/><file name="Test.php" hash="840b56e78f0d71093922c0c4f1d2c805"/><file name="Unittest.php" hash="c22d91e13e7d302e006256d6c3248eb4"/></dir><file name="Post.php" hash="6d2af5168eb4ba208f286cadbd1de564"/><dir name="Resource"><file name="Setup.php" hash="154dffaca0a1715a08753b90c4731743"/></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Financeamount.php" hash="068793f1e6aaf92f4da8c86e67a9515a"/></dir><dir name="Invoice"><file name="Financeamount.php" hash="e8b3d7e5a523dd6befba27aa2d67517e"/></dir></dir><dir name="Quote"><file name="Financeamount.php" hash="2c11b5a46af769119d9037b5e76c36a9"/><file name="Totalcost.php" hash="fa08aacf2d0bf2945510aad2f7625758"/></dir></dir><file name="Service.php" hash="e1e0eff256c0c40ac297addf68fd3973"/><file name="Session.php" hash="6f109c5c5de35251c3d6ed68a9f3c0af"/><file name="Sessionobserver.php" hash="344cb8f8c76bc8632b51642e7e966c6b"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Paybyfinance"><file name="RedirectController.php" hash="eb7d2255806e7ecf25c39057a4dee247"/><file name="ServiceController.php" hash="fa635b03cd56a48e1a6e381b452f9a95"/></dir></dir><file name="CheckoutController.php" hash="da2bcdafd88eb1d34e53eb9822c002a8"/><file name="NotificationController.php" hash="33cfa5afd08fd578ed34c3499971ed02"/><file name="SelectorController.php" hash="8c0f18485af6df6dd2743852adcac7cd"/><file name="SessionController.php" hash="2e4f3431884d71ecce27f6a7288e7141"/><file name="StatusController.php" hash="8ab4af6e411f0cbeb010a63d963baffd"/></dir><dir name="etc"><file name="adminhtml.xml" hash="216df222a5f5d9fdcf29c238cfd78bd5"/><file name="config.xml" hash="e0b8d8284127075b618bbc682c1605af"/><file name="system.xml" hash="915ed7cd12b36616a3f253263e11ced9"/></dir><dir name="sql"><dir name="paybyfinance_setup"><dir name="html"><file name="abandoned.html" hash="424f900dbddc267f7dac72e67752df25"/><file name="accepted.html" hash="3cd819649eeb88b108cfbd87d6bb5048"/><file name="declined.html" hash="4cb2e73cbf449ced4596b6d14289a76f"/><file name="error.html" hash="4a448b052f101b2648dfe84423ad1313"/><file name="page-finance-options.html" hash="d9f090c84559caf2311cabced715b668"/><file name="referred.html" hash="1c143c51776357bcad9e27aff6e6b9b8"/></dir><file name="mysql4-install-2.0.3.php" hash="2daf803d3f4314bae8dc29180f0a1d15"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="bdd5aab92d29e9299856d306edaf5db4"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="77716f98afa803990b4799b9982ac1f0"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="212c52fe9f57f61cf523a403af291d40"/><file name="mysql4-upgrade-1.0.4-1.0.5.php" hash="63dd633ac9d5865a11b86a7a0142cb9e"/><file name="mysql4-upgrade-1.0.5-1.0.6.php" hash="b2ea39f14943faf5a9f28d832e5d4163"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="3b06173409d691611fa01bebdfb9f63a"/><file name="mysql4-upgrade-1.0.7-2.0.0.php" hash="8f4d3a81ad0b5270cb74d7bacb92d0a3"/><file name="mysql4-upgrade-2.0.0-2.0.1.php" hash="f67d2f936ac8eafa6844160148dc467b"/><file name="mysql4-upgrade-2.0.1-2.0.2.php" hash="c963e63fad7f14e59fbf8989cfcef88f"/><file name="mysql4-upgrade-2.0.2-2.0.3.php" hash="25f49f06e861e4b8cedbf3256c09c3d8"/></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="fc9c4b43b09338aa33ba034b31508869"/></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="7a7107b302cf8eafe1714efb05f09e56"/><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="f541883d7e115794fcde3b0a4ac1bb3d"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="paybyfinance.xml" hash="21e409f98bd00b6de93a09610dabdbdd"/></dir><dir name="template"><dir name="paybyfinance"><file name="history.phtml" hash="31fbbbb8477717175da3de1e9fe98f54"/><file name="redirect.phtml" hash="90e7aa306768f5aac337300848c04e6a"/><file name="version.phtml" hash="09a8f416156d853ecc47b24a15744563"/></dir></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="6930043a719765833f6d64de1216b7ad"/><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="58a12daf6bb6aeb8b94471bf605514e5"/></dir></dir></target><target name="mageweb"><dir><dir name="js"><dir name="paybyfinance"><file name="config-edit.js" hash="81817d23afdf99d10b01072d2471ff65"/><file name="service.js" hash="7e1fe3ffe2d4b95eeb5b27c8d07b23f1"/></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><dir name="template"><dir name="email"><dir name="paybyfinance"><file name="order_declined.html" hash="9172511234c33a8e4e78b581064ed1b3"/><file name="order_declined_guest.html" hash="081da356703cf09ce13a86dfce1ab00b"/><file name="order_referred.html" hash="91468313c16e7d8b821d90a954ecaedb"/><file name="order_referred_guest.html" hash="b0c08ecba679a99ad23064649fb6e48d"/></dir></dir></dir></dir></dir></target></contents>
|
20 |
<compatible/>
|
21 |
+
<dependencies><required><php><min>5.4.45</min><max>7.0.4</max></php></required></dependencies>
|
22 |
</package>
|