Version Notes
This extension is brand new, however all known bugs have been worked out.
Download this release
Release Info
Developer | Magento Core Team |
Extension | BluePay_Echeck |
Version | 1.4.2.0 |
Comparing to | |
See all releases |
Version 1.4.2.0
- app/code/core/Mage/Adminhtml/Model/System/Config/Source/TestmodeACH.php +47 -0
- app/code/local/BluePay/Echeck/Block/Form.php +53 -0
- app/code/local/BluePay/Echeck/Block/Form/Echeck.php +57 -0
- app/code/local/BluePay/Echeck/Block/Info.php +55 -0
- app/code/local/BluePay/Echeck/Block/Info/Echeck.php +80 -0
- app/code/local/BluePay/Echeck/Helper/Data.php +31 -0
- app/code/local/BluePay/Echeck/Model/Config.php +71 -0
- app/code/local/BluePay/Echeck/Model/EcheckPayment.php +450 -0
- app/code/local/BluePay/Echeck/Model/EcheckPayment/Debug.php +34 -0
- app/code/local/BluePay/Echeck/Model/EcheckPayment/Request.php +31 -0
- app/code/local/BluePay/Echeck/Model/EcheckPayment/Result.php +31 -0
- app/code/local/BluePay/Echeck/Model/EcheckPayment/Source/Accounttypes.php +51 -0
- app/code/local/BluePay/Echeck/Model/EcheckPayment/Source/PaymentAction.php +39 -0
- app/code/local/BluePay/Echeck/Model/Mysql4/ECheckPayment/Debug.php +34 -0
- app/code/local/BluePay/Echeck/Model/Mysql4/ECheckPayment/Debug/Collection.php +34 -0
- app/code/local/BluePay/Echeck/etc/config.xml +119 -0
- app/code/local/BluePay/Echeck/etc/system.xml +144 -0
- app/code/local/BluePay/Echeck/sql/echeck_setup/mysql4-install-0.7.0.php +49 -0
- app/design/adminhtml/default/default/template/payment/form/echeck.phtml +47 -0
- app/design/adminhtml/default/default/template/payment/info/echeck.phtml +7 -0
- app/design/frontend/default/default/template/payment/form/echeck.phtml +47 -0
- app/design/frontend/default/default/template/payment/info/echeck.phtml +7 -0
- app/etc/modules/BluePay_Echeck.xml +8 -0
- package.xml +18 -0
app/code/core/Mage/Adminhtml/Model/System/Config/Source/TestmodeACH.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Used in creating options for TEST|LIVE config value selection
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
class Mage_Adminhtml_Model_System_Config_Source_TestmodeACH
|
32 |
+
{
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Options getter
|
36 |
+
*
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function toOptionArray()
|
40 |
+
{
|
41 |
+
return array(
|
42 |
+
array('value' => 'TEST', 'label'=>Mage::helper('adminhtml')->__('TEST')),
|
43 |
+
array('value' => 'LIVE', 'label'=>Mage::helper('adminhtml')->__('LIVE')),
|
44 |
+
);
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
app/code/local/BluePay/Echeck/Block/Form.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Payment method form base block
|
30 |
+
*/
|
31 |
+
class BluePay_Echeck_Block_Form extends Mage_Core_Block_Template
|
32 |
+
{
|
33 |
+
|
34 |
+
public function getMethod()
|
35 |
+
{
|
36 |
+
$method = $this->getData('method');
|
37 |
+
|
38 |
+
if (!($method instanceof Mage_Payment_Model_Method_Abstract)) {
|
39 |
+
Mage::throwException($this->__('Can not retrieve payment method model object.'));
|
40 |
+
}
|
41 |
+
return $method;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getMethodCode()
|
45 |
+
{
|
46 |
+
return $this->getMethod()->getCode();
|
47 |
+
}
|
48 |
+
|
49 |
+
public function getInfoData($field)
|
50 |
+
{
|
51 |
+
return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
|
52 |
+
}
|
53 |
+
}
|
app/code/local/BluePay/Echeck/Block/Form/Echeck.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Block_Form_Echeck extends Mage_Payment_Block_Form
|
29 |
+
{
|
30 |
+
protected function _construct()
|
31 |
+
{
|
32 |
+
parent::_construct();
|
33 |
+
$this->setTemplate('payment/form/echeck.phtml');
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function _getConfig()
|
37 |
+
{
|
38 |
+
return Mage::getSingleton('echeck/config');
|
39 |
+
}
|
40 |
+
|
41 |
+
public function getAccountAvailableTypes()
|
42 |
+
{
|
43 |
+
$types = $this->_getConfig()->getAccountTypes();
|
44 |
+
if ($method = $this->getMethod()) {
|
45 |
+
$availableTypes = $method->getConfigData('accounttypes');
|
46 |
+
if ($availableTypes) {
|
47 |
+
$availableTypes = explode(',', $availableTypes);
|
48 |
+
foreach ($types as $code=>$name) {
|
49 |
+
if (!in_array($code, $availableTypes)) {
|
50 |
+
unset($types[$code]);
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
return $types;
|
56 |
+
}
|
57 |
+
}
|
app/code/local/BluePay/Echeck/Block/Info.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Block_Info extends Mage_Core_Block_Template
|
29 |
+
{
|
30 |
+
protected function _construct()
|
31 |
+
{
|
32 |
+
parent::_construct();
|
33 |
+
$this->setTemplate('payment/info/default.phtml');
|
34 |
+
}
|
35 |
+
|
36 |
+
public function getInfo()
|
37 |
+
{
|
38 |
+
$info = $this->getData('info');
|
39 |
+
if (!($info instanceof BluePay_Echeck_Model_Info)) {
|
40 |
+
Mage::throwException($this->__('Can not retrieve payment info model object.'));
|
41 |
+
}
|
42 |
+
return $info;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function getMethod()
|
46 |
+
{
|
47 |
+
return $this->getInfo()->getMethodInstance();
|
48 |
+
}
|
49 |
+
|
50 |
+
public function toPdf()
|
51 |
+
{
|
52 |
+
$this->setTemplate('payment/info/pdf/default.phtml');
|
53 |
+
return $this->toHtml();
|
54 |
+
}
|
55 |
+
}
|
app/code/local/BluePay/Echeck/Block/Info/Echeck.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
|
29 |
+
class BluePay_Echeck_Block_Info_Echeck extends Mage_Payment_Block_Info
|
30 |
+
{
|
31 |
+
|
32 |
+
protected function _construct()
|
33 |
+
{
|
34 |
+
parent::_construct();
|
35 |
+
|
36 |
+
$this->setTemplate('payment/info/echeck.phtml');
|
37 |
+
}
|
38 |
+
|
39 |
+
public function getAccountTypeName()
|
40 |
+
{
|
41 |
+
$types = Mage::getSingleton('echeck/config')->getAccountTypes();
|
42 |
+
if (isset($types[$this->getInfo()->getAccountType()])) {
|
43 |
+
return $types[$this->getInfo()->getAccountType()];
|
44 |
+
}
|
45 |
+
return $this->getInfo()->getAccountType();
|
46 |
+
}
|
47 |
+
|
48 |
+
public function toPdf()
|
49 |
+
{
|
50 |
+
|
51 |
+
$this->setTemplate('payment/info/pdf/echeck.phtml');
|
52 |
+
return $this->toHtml();
|
53 |
+
}
|
54 |
+
|
55 |
+
public function getInfo()
|
56 |
+
{
|
57 |
+
$info = Mage::getSingleton('checkout/session')->getQuote()->getPayment();
|
58 |
+
$this->unmapData($info);
|
59 |
+
|
60 |
+
if (!strlen($info->getMethod())) {
|
61 |
+
$this->unmapData($this->getData('info'));
|
62 |
+
return $this->getData('info');
|
63 |
+
}
|
64 |
+
return $info;
|
65 |
+
}
|
66 |
+
|
67 |
+
public function unmapData($info)
|
68 |
+
{
|
69 |
+
$info->setEcheckRoutingNumber($info->getCcLast4())
|
70 |
+
->setEcheckBankName($info->getCcNumberEnc())
|
71 |
+
->setEcheckAccountType($info->getCcType())
|
72 |
+
->setEcheckAccountName($info->getCcOwner())
|
73 |
+
->setEcheckBankAcctNum($info->getCcSsIssue())
|
74 |
+
->setEcheckBankAcctNum4($info->getCcSsOwner());
|
75 |
+
if(strlen($info->getEcheckBankAcctNum()))
|
76 |
+
{
|
77 |
+
$info->setEcheckBankAcctNum4(substr($info->getEcheckBankAcctNum(), -4));
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
app/code/local/BluePay/Echeck/Helper/Data.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Helper_Data extends Mage_Core_Helper_Abstract
|
29 |
+
{
|
30 |
+
|
31 |
+
}
|
app/code/local/BluePay/Echeck/Model/Config.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_Config
|
29 |
+
{
|
30 |
+
protected static $_methods;
|
31 |
+
|
32 |
+
public function getActiveMethods($store=null)
|
33 |
+
{
|
34 |
+
$methods = array();
|
35 |
+
$config = Mage::getStoreConfig('echeck', $store);
|
36 |
+
foreach ($config as $code => $methodConfig) {
|
37 |
+
if (Mage::getStoreConfigFlag('echeck/'.$code.'/active', $store)) {
|
38 |
+
$methods[$code] = $this->_getMethod($code, $methodConfig);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
return $methods;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getAllMethods($store=null)
|
45 |
+
{
|
46 |
+
$methods = array();
|
47 |
+
$config = Mage::getStoreConfig('payment', $store);
|
48 |
+
foreach ($config as $code => $methodConfig) {
|
49 |
+
$methods[$code] = $this->_getMethod($code, $methodConfig);
|
50 |
+
}
|
51 |
+
return $methods;
|
52 |
+
}
|
53 |
+
|
54 |
+
protected function _getMethod($code, $config, $store=null)
|
55 |
+
{
|
56 |
+
if (isset(self::$_methods[$code])) {
|
57 |
+
return self::$_methods[$code];
|
58 |
+
}
|
59 |
+
$modelName = $config['model'];
|
60 |
+
$method = Mage::getModel($modelName);
|
61 |
+
$method->setId($code)->setStore($store);
|
62 |
+
self::$_methods[$code] = $method;
|
63 |
+
return self::$_methods[$code];
|
64 |
+
}
|
65 |
+
|
66 |
+
public function getAccountTypes()
|
67 |
+
{
|
68 |
+
$types = array('CHECKING' => 'Checking', 'BUSINESSCHECKING' => 'Business checking', 'SAVINGS' => 'Savings');
|
69 |
+
return $types;
|
70 |
+
}
|
71 |
+
}
|
app/code/local/BluePay/Echeck/Model/EcheckPayment.php
ADDED
@@ -0,0 +1,450 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_EcheckPayment extends Mage_Paygate_Model_Authorizenet
|
29 |
+
{
|
30 |
+
|
31 |
+
const CGI_URL = 'https://secure.bluepay.com/interfaces/bp10emu';
|
32 |
+
|
33 |
+
protected $_formBlockType = 'echeck/form_echeck';
|
34 |
+
protected $_infoBlockType = 'echeck/info_echeck';
|
35 |
+
|
36 |
+
const REQUEST_METHOD_CC = 'CREDIT';
|
37 |
+
const REQUEST_METHOD_ECHECK = 'ACH';
|
38 |
+
|
39 |
+
const REQUEST_TYPE_AUTH_CAPTURE = 'SALE';
|
40 |
+
const REQUEST_TYPE_AUTH_ONLY = 'AUTH';
|
41 |
+
const REQUEST_TYPE_CAPTURE_ONLY = 'CAPTURE';
|
42 |
+
const REQUEST_TYPE_CREDIT = 'CREDIT';
|
43 |
+
const REQUEST_TYPE_VOID = 'VOID';
|
44 |
+
const REQUEST_TYPE_PRIOR_AUTH_CAPTURE = 'PRIOR_AUTH_CAPTURE';
|
45 |
+
|
46 |
+
const ECHECK_ACCT_TYPE_CHECKING = 'CHECKING';
|
47 |
+
const ECHECK_ACCT_TYPE_BUSINESS = 'BUSINESSCHECKING';
|
48 |
+
const ECHECK_ACCT_TYPE_SAVINGS = 'SAVINGS';
|
49 |
+
|
50 |
+
const ECHECK_TRANS_TYPE_CCD = 'CCD';
|
51 |
+
const ECHECK_TRANS_TYPE_PPD = 'PPD';
|
52 |
+
const ECHECK_TRANS_TYPE_TEL = 'TEL';
|
53 |
+
const ECHECK_TRANS_TYPE_WEB = 'WEB';
|
54 |
+
|
55 |
+
const RESPONSE_DELIM_CHAR = ',';
|
56 |
+
|
57 |
+
const RESPONSE_CODE_APPROVED = 'APPROVED';
|
58 |
+
const RESPONSE_CODE_DECLINED = 'DECLINED';
|
59 |
+
const RESPONSE_CODE_ERROR = 'ERROR';
|
60 |
+
const RESPONSE_CODE_HELD = 4;
|
61 |
+
|
62 |
+
const INVOICE_ID = 0;
|
63 |
+
const BANK_NAME = 1;
|
64 |
+
const PAYMENT_ACCOUNT = 2;
|
65 |
+
const AUTH_CODE = 3;
|
66 |
+
const CARD_TYPE = 4;
|
67 |
+
const AMOUNT = 5;
|
68 |
+
const REBID = 6;
|
69 |
+
const AVS = 7;
|
70 |
+
const ORDER_ID = 8;
|
71 |
+
const CARD_EXPIRE = 9;
|
72 |
+
const Result = 10;
|
73 |
+
const RRNO = 11;
|
74 |
+
const CVV2 = 12;
|
75 |
+
const PAYMENT_TYPE = 13;
|
76 |
+
const MESSAGE = 14;
|
77 |
+
|
78 |
+
protected $responseHeaders;
|
79 |
+
|
80 |
+
protected $_code = 'echeckpayment';
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Availability options
|
84 |
+
*/
|
85 |
+
protected $_isGateway = true;
|
86 |
+
protected $_canAuthorize = true;
|
87 |
+
protected $_canCapture = true;
|
88 |
+
protected $_canCapturePartial = true;
|
89 |
+
protected $_canRefund = true;
|
90 |
+
protected $_canVoid = true;
|
91 |
+
protected $_canUseInternal = true;
|
92 |
+
protected $_canUseCheckout = true;
|
93 |
+
protected $_canUseForMultishipping = true;
|
94 |
+
protected $_canSaveCc = false;
|
95 |
+
|
96 |
+
public function authorize(Varien_Object $payment, $amount)
|
97 |
+
{
|
98 |
+
Mage::throwException(Mage::helper('echeck')->__('Error:'));
|
99 |
+
if ($amount <= 0) {
|
100 |
+
Mage::throwException(Mage::helper('paygate')->__('Invalid amount for authorization.'));
|
101 |
+
}
|
102 |
+
$payment->setTransactionType(self::REQUEST_TYPE_AUTH_CAPTURE);
|
103 |
+
$payment->setAmount($amount);
|
104 |
+
|
105 |
+
$request= $this->_buildRequest($payment);
|
106 |
+
$result = $this->_postRequest($request);
|
107 |
+
|
108 |
+
$payment->setCcApproval($result->getAuthCode())
|
109 |
+
->setLastTransId($result->getRrno())
|
110 |
+
->setTransactionId($result->getRrno())
|
111 |
+
->setIsTransactionClosed(0)
|
112 |
+
->setCcTransId($result->getRrno())
|
113 |
+
->setCcAvsStatus($result->getAvs())
|
114 |
+
->setCcCidStatus($result->getCvv2());
|
115 |
+
Mage::throwException(Mage::helper('paygate')->__('Error: ' . $result->getMessage()));
|
116 |
+
switch ($result->getResult()) {
|
117 |
+
case self::RESPONSE_CODE_APPROVED:
|
118 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
119 |
+
Mage::throwException(Mage::helper('echeck')->__('Error: ' . $result->getMessage()));
|
120 |
+
return $this;
|
121 |
+
case self::RESPONSE_CODE_DECLINED:
|
122 |
+
Mage::throwException(Mage::helper('echeck')->__('The transaction has been declined'));
|
123 |
+
case self::RESPONSE_CODE_ERROR:
|
124 |
+
Mage::throwException(Mage::helper('echeck')->__('Error: ' . $result->getMessage()));
|
125 |
+
default:
|
126 |
+
Mage::throwException(Mage::helper('echeck')->__('Error!'));
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
|
131 |
+
public function capture(Varien_Object $payment, $amount)
|
132 |
+
{
|
133 |
+
$error = false;
|
134 |
+
if ($payment->getCcTransId()) {
|
135 |
+
$payment->setTransactionType(self::REQUEST_TYPE_AUTH_CAPTURE);
|
136 |
+
} else {
|
137 |
+
$payment->setTransactionType(self::REQUEST_TYPE_AUTH_CAPTURE);
|
138 |
+
}
|
139 |
+
$payment->setAmount($amount);
|
140 |
+
|
141 |
+
$request= $this->_buildRequest($payment);
|
142 |
+
$result = $this->_postRequest($request);
|
143 |
+
if ($result->getResult() == self::RESPONSE_CODE_APPROVED) {
|
144 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
145 |
+
$payment->setLastTransId($result->getRrno())
|
146 |
+
->setTransactionId($result->getRrno());
|
147 |
+
return $this;
|
148 |
+
}
|
149 |
+
if ($result->getMessage()) {
|
150 |
+
Mage::throwException($this->_wrapGatewayError($result->getMessage()));
|
151 |
+
}
|
152 |
+
Mage::throwException(Mage::helper('echeck')->__('Error in capturing the payment.'));
|
153 |
+
if ($error !== false) {
|
154 |
+
Mage::throwException($error);
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
public function void(Varien_Object $payment)
|
159 |
+
{
|
160 |
+
$error = false;
|
161 |
+
if($payment->getParentTransactionId()){
|
162 |
+
$payment->setTransactionType(self::REQUEST_TYPE_CREDIT);
|
163 |
+
$request = $this->_buildRequest($payment);
|
164 |
+
$result = $this->_postRequest($request);
|
165 |
+
if($result->getResult()==self::RESPONSE_CODE_APPROVED){
|
166 |
+
$payment->setStatus(self::STATUS_SUCCESS );
|
167 |
+
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true)->save();
|
168 |
+
return $this;
|
169 |
+
}
|
170 |
+
$payment->setStatus(self::STATUS_ERROR);
|
171 |
+
Mage::throwException($this->_wrapGatewayError($result->getMessage()));
|
172 |
+
}
|
173 |
+
$payment->setStatus(self::STATUS_ERROR);
|
174 |
+
Mage::throwException(Mage::helper('echeck')->__('Invalid transaction ID.'));
|
175 |
+
}
|
176 |
+
|
177 |
+
public function refund(Varien_Object $payment, $amount)
|
178 |
+
{
|
179 |
+
if ($payment->getRefundTransactionId() && $amount > 0) {
|
180 |
+
$payment->setTransactionType(self::REQUEST_TYPE_CREDIT);
|
181 |
+
$payment->setRrno($payment->getRefundTransactionId());
|
182 |
+
$payment->setAmount($amount);
|
183 |
+
$request = $this->_buildRequest($payment);
|
184 |
+
$request->setRrno($payment->getRefundTransactionId());
|
185 |
+
$result = $this->_postRequest($request);
|
186 |
+
if ($result->getResult()==self::RESPONSE_CODE_APPROVED) {
|
187 |
+
$payment->setStatus(self::STATUS_SUCCESS);
|
188 |
+
return $this;
|
189 |
+
}
|
190 |
+
if ($result->getResult()==self::RESPONSE_CODE_DECLINED) {
|
191 |
+
Mage::throwException($this->_wrapGatewayError('DECLINED'));
|
192 |
+
}
|
193 |
+
if ($result->getResult()==self::RESPONSE_CODE_ERROR) {
|
194 |
+
Mage::throwException($this->_wrapGatewayError('ERROR'));
|
195 |
+
}
|
196 |
+
Mage::throwException($this->_wrapGatewayError($result->getRrno()));
|
197 |
+
}
|
198 |
+
Mage::throwException(Mage::helper('echeck')->__('Error in refunding the payment.'));
|
199 |
+
}
|
200 |
+
|
201 |
+
protected function _buildRequest(Varien_Object $payment)
|
202 |
+
{
|
203 |
+
$order = $payment->getOrder();
|
204 |
+
|
205 |
+
$this->setStore($order->getStoreId());
|
206 |
+
|
207 |
+
if (!$payment->getPaymentType()) {
|
208 |
+
$payment->setPaymentType(self::REQUEST_METHOD_ECHECK);
|
209 |
+
}
|
210 |
+
$payment->setPaymentType(self::REQUEST_METHOD_ECHECK);
|
211 |
+
$request = Mage::getModel('echeck/EcheckPayment_request');
|
212 |
+
|
213 |
+
if ($order && $order->getIncrementId()) {
|
214 |
+
$request->setInvoiceID($order->getIncrementId());
|
215 |
+
}
|
216 |
+
|
217 |
+
$request->setMode($this->getConfigData('test_mode') ? 'TEST' : 'LIVE');
|
218 |
+
$request->setMerchant($this->getConfigData('login'))
|
219 |
+
->setTransactionType($payment->getTransactionType())
|
220 |
+
->setPaymentType($payment->getPaymentType())
|
221 |
+
->setTamperProofSeal($this->calcTPS($payment));
|
222 |
+
if($payment->getAmount()){
|
223 |
+
$request->setAmount($payment->getAmount(),2);
|
224 |
+
}
|
225 |
+
switch ($payment->getTransactionType()) {
|
226 |
+
case self::REQUEST_TYPE_CREDIT:
|
227 |
+
case self::REQUEST_TYPE_VOID:
|
228 |
+
case self::REQUEST_TYPE_CAPTURE_ONLY:
|
229 |
+
$request->setRrno($payment->getCcTransId());
|
230 |
+
break;
|
231 |
+
}
|
232 |
+
$cart = Mage::helper('checkout/cart')->getCart()->getItemsCount();
|
233 |
+
$cartSummary = Mage::helper('checkout/cart')->getCart()->getSummaryQty();
|
234 |
+
Mage::getSingleton('core/session', array('name'=>'frontend'));
|
235 |
+
$session = Mage::getSingleton('checkout/session');
|
236 |
+
|
237 |
+
$comment = "";
|
238 |
+
|
239 |
+
foreach ($session->getQuote()->getAllItems() as $item) {
|
240 |
+
|
241 |
+
$comment .= $item->getQty() . ' ';
|
242 |
+
$comment .= '[' . $item->getSku() . ']' . ' ';
|
243 |
+
$comment .= $item->getName() . ' ';
|
244 |
+
$comment .= $item->getDescription() . ' ';
|
245 |
+
$comment .= $item->getBaseCalculationPrice . ' ';
|
246 |
+
}
|
247 |
+
|
248 |
+
|
249 |
+
if (!empty($order)) {
|
250 |
+
$billing = $order->getBillingAddress();
|
251 |
+
if (!empty($billing)) {
|
252 |
+
$request->setName1($billing->getFirstname())
|
253 |
+
->setName2($billing->getLastname())
|
254 |
+
->setCompany($billing->getCompany())
|
255 |
+
->setAddress1($billing->getStreet(1))
|
256 |
+
->setCity($billing->getCity())
|
257 |
+
->setState($billing->getRegion())
|
258 |
+
->setZip($billing->getPostcode())
|
259 |
+
->setCountry($billing->getCountry())
|
260 |
+
->setPhone($billing->getTelephone())
|
261 |
+
->setFax($billing->getFax())
|
262 |
+
->setCustomID($billing->getCustomerId())
|
263 |
+
->setComment($comment)
|
264 |
+
->setEmail($order->getCustomerEmail());
|
265 |
+
}
|
266 |
+
}
|
267 |
+
|
268 |
+
switch ($payment->getPaymentType()) {
|
269 |
+
case self::REQUEST_METHOD_ECHECK:
|
270 |
+
$request->setAchRouting($payment->getEcheckRoutingNumber())
|
271 |
+
->setAchAccount($payment->getEcheckBankAcctNum())
|
272 |
+
->setAchAccountType($payment->getEcheckAccountType())
|
273 |
+
->setName($payment->getEcheckAccountName())
|
274 |
+
->setDocType($payment->getEcheckType());
|
275 |
+
break;
|
276 |
+
}
|
277 |
+
return $request;
|
278 |
+
}
|
279 |
+
|
280 |
+
protected function _postRequest(Varien_Object $request)
|
281 |
+
{
|
282 |
+
$debugData = array('request' => $request->getData());
|
283 |
+
|
284 |
+
$result = Mage::getModel('echeck/EcheckPayment_result');
|
285 |
+
|
286 |
+
$client = new Varien_Http_Client();
|
287 |
+
|
288 |
+
$uri = $this->getConfigData('cgi_url');
|
289 |
+
$client->setUri(self::CGI_URL);
|
290 |
+
$client->setConfig(array(
|
291 |
+
'maxredirects'=>0,
|
292 |
+
'timeout'=>30,
|
293 |
+
));
|
294 |
+
$client->setParameterPost($request->getData());
|
295 |
+
$client->setMethod(Zend_Http_Client::POST);
|
296 |
+
|
297 |
+
try {
|
298 |
+
$response = $client->request();
|
299 |
+
}
|
300 |
+
catch (Exception $e) {
|
301 |
+
$debugData['result'] = $result->getData();
|
302 |
+
$this->_debug($debugData);
|
303 |
+
Mage::throwException($this->_wrapGatewayError($e->getMessage()));
|
304 |
+
}
|
305 |
+
$r = $response->getHeader('location');
|
306 |
+
if ($r) {
|
307 |
+
$result->setResult($this->parseHeader($r, 'value', self::Result))
|
308 |
+
->setInvoiceID($this->parseHeader($r, 'value', self::INVOICE_ID))
|
309 |
+
->setMessage($this->parseHeader($r, 'value', self::MESSAGE))
|
310 |
+
->setAuthCode($this->parseHeader($r, 'value', self::AUTH_CODE))
|
311 |
+
->setAvs($this->parseHeader($r, 'value', self::AVS))
|
312 |
+
->setRrno($this->parseHeader($r, 'value', self::RRNO))
|
313 |
+
->setAmount($this->parseHeader($r, 'value', self::AMOUNT))
|
314 |
+
->set($this->parseHeader($r, 'value', self::PAYMENT_TYPE))
|
315 |
+
->setOrderId($this->parseHeader($r, 'value', self::ORDER_ID))
|
316 |
+
->setCvv2($this->parseHeader($r, 'value', self::CVV2));
|
317 |
+
}
|
318 |
+
else {
|
319 |
+
Mage::throwException(
|
320 |
+
Mage::helper('echeck')->__('Error in payment gateway.')
|
321 |
+
);
|
322 |
+
}
|
323 |
+
|
324 |
+
$debugData['result'] = $result->getData();
|
325 |
+
$this->_debug($debugData);
|
326 |
+
return $result;
|
327 |
+
}
|
328 |
+
|
329 |
+
public function validate()
|
330 |
+
{
|
331 |
+
$paymentInfo = $this->getInfoInstance();
|
332 |
+
if(strlen($paymentInfo->getCcType()))
|
333 |
+
{
|
334 |
+
$paymentInfo = $this->unmapData($paymentInfo);
|
335 |
+
}
|
336 |
+
|
337 |
+
if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
|
338 |
+
$billingCountry = $paymentInfo->getOrder()->getBillingAddress()->getCountryId();
|
339 |
+
} else {
|
340 |
+
$billingCountry = $paymentInfo->getQuote()->getBillingAddress()->getCountryId();
|
341 |
+
}
|
342 |
+
if (!$this->canUseForCountry($billingCountry)) {
|
343 |
+
Mage::throwException($this->_getHelper()->__('Selected payment type is not allowed for billing country.'));
|
344 |
+
}
|
345 |
+
|
346 |
+
$info = $this->getInfoInstance();
|
347 |
+
$errorMsg = false;
|
348 |
+
$availableTypes = explode(',',$this->getConfigData('accounttypes'));
|
349 |
+
|
350 |
+
$accountType = '';
|
351 |
+
|
352 |
+
if (!in_array($info->getEcheckAccountType(), $availableTypes))
|
353 |
+
{
|
354 |
+
$errorCode = 'echeck_account_type';
|
355 |
+
$errorMsg = $this->_getHelper()->__('Account type is not allowed for this payment method '. $info->getAccountType());
|
356 |
+
}
|
357 |
+
if($errorMsg)
|
358 |
+
{
|
359 |
+
Mage::throwException($errorMsg);
|
360 |
+
}
|
361 |
+
return $this;
|
362 |
+
}
|
363 |
+
|
364 |
+
public function getInfoInstance()
|
365 |
+
{
|
366 |
+
$instance = $this->getData('info_instance');
|
367 |
+
return $instance;
|
368 |
+
}
|
369 |
+
|
370 |
+
public function assignData($data)
|
371 |
+
{
|
372 |
+
if (!($data instanceof Varien_Object)) {
|
373 |
+
$data = new Varien_Object($data);
|
374 |
+
}
|
375 |
+
$data->setEcheckBankAcctNum4(substr($data->getEcheckBankAcctNum(), -4));
|
376 |
+
$info = $this->getInfoInstance();
|
377 |
+
$info->setEcheckRoutingNumber($data->getEcheckRoutingNumber())
|
378 |
+
->setEcheckBankName($data->getEcheckBankName())
|
379 |
+
->setData('echeck_account_type', $data->getEcheckAccountType())
|
380 |
+
->setEcheckAccountName($data->getEcheckAccountName())
|
381 |
+
->setEcheckBankAcctNum($data->getEcheckBankAcctNum())
|
382 |
+
->setEcheckBankAcctNum4($data->getEcheckBankAcctNum4());
|
383 |
+
|
384 |
+
$this->mapData($data);
|
385 |
+
return $this;
|
386 |
+
}
|
387 |
+
|
388 |
+
public function mapData($data)
|
389 |
+
{
|
390 |
+
if (!($data instanceof Varien_Object)) {
|
391 |
+
$data = new Varien_Object($data);
|
392 |
+
}
|
393 |
+
$info = $this->getInfoInstance();
|
394 |
+
$info->setCcLast4($data->getEcheckRoutingNumber())
|
395 |
+
->setCcNumberEnc($data->getEcheckBankName())
|
396 |
+
->setCcType($data->getEcheckAccountType())
|
397 |
+
->setCcOwner($data->getEcheckAccountName())
|
398 |
+
->setCcSsIssue($data->getEcheckBankAcctNum())
|
399 |
+
->setCcSsOwner($data->getEcheckBankAcctNum4());
|
400 |
+
}
|
401 |
+
|
402 |
+
public function unmapData($info)
|
403 |
+
{
|
404 |
+
$info->setEcheckRoutingNumber($info->getCcLast4())
|
405 |
+
->setEcheckBankName($info->getCcNumberEnc())
|
406 |
+
->setEcheckAccountType($info->getCcType())
|
407 |
+
->setEcheckAccountName($info->getCcOwner())
|
408 |
+
->setEcheckBankAcctNum($info->getCcSsIssue())
|
409 |
+
->setEcheckBankAcctNum4($info->getCcSsOwner());
|
410 |
+
return $info;
|
411 |
+
}
|
412 |
+
|
413 |
+
public function prepareSave()
|
414 |
+
{
|
415 |
+
$info = $this->getInfoInstance();
|
416 |
+
$info->setCcSsIssue(null);
|
417 |
+
return $this;
|
418 |
+
}
|
419 |
+
|
420 |
+
public function isAvailable($quote = null){
|
421 |
+
$checkResult = new StdClass;
|
422 |
+
$checkResult->isAvailable = (bool)(int)$this->getConfigData('active', ($quote ? $quote->getStoreId() : null));
|
423 |
+
Mage::dispatchEvent('payment_method_is_active', array(
|
424 |
+
'result' => $checkResult,
|
425 |
+
'method_instance' => $this,
|
426 |
+
'quote' => $quote,
|
427 |
+
));
|
428 |
+
return $checkResult->isAvailable;
|
429 |
+
}
|
430 |
+
|
431 |
+
protected final function calcTPS(Varien_Object $payment) {
|
432 |
+
|
433 |
+
$order = $payment->getOrder();
|
434 |
+
$billing = $order->getBillingAddress();
|
435 |
+
|
436 |
+
$hashstr = $this->getConfigData('trans_key') . $this->getConfigData('login') .
|
437 |
+
$payment->getTransactionType() . $payment->getAmount() . $payment->getRrno() .
|
438 |
+
$this->getConfigData('test_mode');
|
439 |
+
|
440 |
+
return bin2hex( md5($hashstr, true) );
|
441 |
+
}
|
442 |
+
|
443 |
+
protected function parseHeader($header, $nameVal, $pos) {
|
444 |
+
$nameVal = ($nameVal == 'name') ? '0' : '1';
|
445 |
+
$s = explode("?", $header);
|
446 |
+
$t = explode("&", $s[1]);
|
447 |
+
$value = explode("=", $t[$pos]);
|
448 |
+
return $value[$nameVal];
|
449 |
+
}
|
450 |
+
}
|
app/code/local/BluePay/Echeck/Model/EcheckPayment/Debug.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_EcheckPayment_Debug extends Mage_Core_Model_Abstract
|
29 |
+
{
|
30 |
+
protected function _construct()
|
31 |
+
{
|
32 |
+
$this->_init('echeck/EcheckPayment_debug');
|
33 |
+
}
|
34 |
+
}
|
app/code/local/BluePay/Echeck/Model/EcheckPayment/Request.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_EcheckPayment_Request extends Varien_Object
|
29 |
+
{
|
30 |
+
|
31 |
+
}
|
app/code/local/BluePay/Echeck/Model/EcheckPayment/Result.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_EcheckPayment_Result extends Varien_Object
|
29 |
+
{
|
30 |
+
|
31 |
+
}
|
app/code/local/BluePay/Echeck/Model/EcheckPayment/Source/Accounttypes.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_EcheckPayment_Source_Accounttypes
|
29 |
+
{
|
30 |
+
public function getAllowedTypes()
|
31 |
+
{
|
32 |
+
return array('CHECKING', 'BUSINESSCHECKING', 'SAVINGS');
|
33 |
+
}
|
34 |
+
|
35 |
+
public function toOptionArray()
|
36 |
+
{
|
37 |
+
$allowed = $this->getAllowedTypes();
|
38 |
+
$options = array();
|
39 |
+
|
40 |
+
foreach (Mage::getSingleton('echeck/config')->getAccountTypes() as $code => $name) {
|
41 |
+
if (in_array($code, $allowed) || !count($allowed)) {
|
42 |
+
$options[] = array(
|
43 |
+
'value' => $code,
|
44 |
+
'label' => $name
|
45 |
+
);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
return $options;
|
50 |
+
}
|
51 |
+
}
|
app/code/local/BluePay/Echeck/Model/EcheckPayment/Source/PaymentAction.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_EcheckPayment_Source_PaymentAction
|
29 |
+
{
|
30 |
+
public function toOptionArray()
|
31 |
+
{
|
32 |
+
return array(
|
33 |
+
array(
|
34 |
+
'value' => BluePay_Echeck_Model_EcheckPayment::ACTION_AUTHORIZE_CAPTURE,
|
35 |
+
'label' => 'SALE'
|
36 |
+
),
|
37 |
+
);
|
38 |
+
}
|
39 |
+
}
|
app/code/local/BluePay/Echeck/Model/Mysql4/ECheckPayment/Debug.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_Mysql4_ECheckPayment_Debug extends Mage_Core_Model_Mysql4_Abstract
|
29 |
+
{
|
30 |
+
protected function _construct()
|
31 |
+
{
|
32 |
+
$this->_init('echeck/ECheckPayment_debug', 'debug_id');
|
33 |
+
}
|
34 |
+
}
|
app/code/local/BluePay/Echeck/Model/Mysql4/ECheckPayment/Debug/Collection.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
class BluePay_Echeck_Model_Mysql4_ECheckPayment_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
29 |
+
{
|
30 |
+
protected function _construct()
|
31 |
+
{
|
32 |
+
$this->_init('echeck/ECheckPayment_debug');
|
33 |
+
}
|
34 |
+
}
|
app/code/local/BluePay/Echeck/etc/config.xml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC. (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
<config>
|
29 |
+
<modules>
|
30 |
+
<BluePay_Echeck>
|
31 |
+
<version>0.1.0</version>
|
32 |
+
</BluePay_Echeck>
|
33 |
+
</modules>
|
34 |
+
<global>
|
35 |
+
<blocks>
|
36 |
+
<echeck>
|
37 |
+
<class>BluePay_Echeck_Block</class>
|
38 |
+
</echeck>
|
39 |
+
</blocks>
|
40 |
+
<helpers>
|
41 |
+
<echeck>
|
42 |
+
<class>BluePay_Echeck_Helper</class>
|
43 |
+
</echeck>
|
44 |
+
</helpers>
|
45 |
+
<models>
|
46 |
+
<echeck>
|
47 |
+
<class>BluePay_Echeck_Model</class>
|
48 |
+
<resourceModel>echeck_mysql4</resourceModel>
|
49 |
+
</echeck>
|
50 |
+
<echeck_mysql4>
|
51 |
+
<class>BluePay_Echeck_Model_Mysql4</class>
|
52 |
+
<entities>
|
53 |
+
<echeckpayment_debug><table>echeck_EcheckPayment_debug</table></echeckpayment_debug>
|
54 |
+
</entities>
|
55 |
+
</echeck_mysql4>
|
56 |
+
</models>
|
57 |
+
<resources>
|
58 |
+
<echeck_setup>
|
59 |
+
<setup>
|
60 |
+
<module>BluePay_Echeck</module>
|
61 |
+
</setup>
|
62 |
+
<connection>
|
63 |
+
<use>core_setup</use>
|
64 |
+
</connection>
|
65 |
+
</echeck_setup>
|
66 |
+
<echeck_write>
|
67 |
+
<connection>
|
68 |
+
<use>core_write</use>
|
69 |
+
</connection>
|
70 |
+
</echeck_write>
|
71 |
+
<echeck_read>
|
72 |
+
<connection>
|
73 |
+
<use>core_read</use>
|
74 |
+
</connection>
|
75 |
+
</echeck_read>
|
76 |
+
</resources>
|
77 |
+
</global>
|
78 |
+
|
79 |
+
<adminhtml>
|
80 |
+
<translate>
|
81 |
+
<modules>
|
82 |
+
<BluePay_Echeck>
|
83 |
+
<files>
|
84 |
+
<default>BluePay_Echeck.csv</default>
|
85 |
+
</files>
|
86 |
+
</BluePay_Echeck>
|
87 |
+
</modules>
|
88 |
+
</translate>
|
89 |
+
</adminhtml>
|
90 |
+
|
91 |
+
<frontend>
|
92 |
+
<translate>
|
93 |
+
<modules>
|
94 |
+
<BluePay_Echeck>
|
95 |
+
<files>
|
96 |
+
<default>BluePay_Echeck.csv</default>
|
97 |
+
</files>
|
98 |
+
</BluePay_Echeck>
|
99 |
+
</modules>
|
100 |
+
</translate>
|
101 |
+
</frontend>
|
102 |
+
|
103 |
+
<default>
|
104 |
+
<payment>
|
105 |
+
<echeckpayment>
|
106 |
+
<active>1</active>
|
107 |
+
<accounttypes>CHECKING,BUSINESSCHECKING,SAVINGS</accounttypes>
|
108 |
+
<debug>0</debug>
|
109 |
+
<login backend_model="adminhtml/system_config_backend_encrypted"/>
|
110 |
+
<model>echeck/EcheckPayment</model>
|
111 |
+
<order_status>2</order_status>
|
112 |
+
<test>1</test>
|
113 |
+
<title>E-Check</title>
|
114 |
+
<trans_key backend_model="adminhtml/system_config_backend_encrypted"/>
|
115 |
+
<allowspecific>0</allowspecific>
|
116 |
+
</echeckpayment>
|
117 |
+
</payment>
|
118 |
+
</default>
|
119 |
+
</config>
|
app/code/local/BluePay/Echeck/etc/system.xml
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC. (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
<config>
|
29 |
+
<sections>
|
30 |
+
<payment>
|
31 |
+
<groups>
|
32 |
+
<echeckpayment translate="label" module="echeck">
|
33 |
+
<label>BluePay (E-Check)</label>
|
34 |
+
<frontend_type>text</frontend_type>
|
35 |
+
<sort_order>10</sort_order>
|
36 |
+
<show_in_default>1</show_in_default>
|
37 |
+
<show_in_website>1</show_in_website>
|
38 |
+
<show_in_store>1</show_in_store>
|
39 |
+
<fields>
|
40 |
+
<active translate="label">
|
41 |
+
<label>Enabled</label>
|
42 |
+
<frontend_type>select</frontend_type>
|
43 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
44 |
+
<sort_order>1</sort_order>
|
45 |
+
<show_in_default>1</show_in_default>
|
46 |
+
<show_in_website>1</show_in_website>
|
47 |
+
<show_in_store>0</show_in_store>
|
48 |
+
</active>
|
49 |
+
<accounttypes translate="label">
|
50 |
+
<label>Account Types</label>
|
51 |
+
<frontend_type>multiselect</frontend_type>
|
52 |
+
<source_model>echeck/EcheckPayment_source_accounttypes</source_model>
|
53 |
+
<sort_order>15</sort_order>
|
54 |
+
<show_in_default>1</show_in_default>
|
55 |
+
<show_in_website>1</show_in_website>
|
56 |
+
<show_in_store>0</show_in_store>
|
57 |
+
</accounttypes>
|
58 |
+
<login translate="label">
|
59 |
+
<label>Account ID</label>
|
60 |
+
<frontend_type>obscure</frontend_type>
|
61 |
+
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
62 |
+
<sort_order>3</sort_order>
|
63 |
+
<show_in_default>1</show_in_default>
|
64 |
+
<show_in_website>1</show_in_website>
|
65 |
+
<show_in_store>0</show_in_store>
|
66 |
+
</login>
|
67 |
+
<sort_order translate="label">
|
68 |
+
<label>Sort order</label>
|
69 |
+
<frontend_type>text</frontend_type>
|
70 |
+
<sort_order>100</sort_order>
|
71 |
+
<show_in_default>1</show_in_default>
|
72 |
+
<show_in_website>1</show_in_website>
|
73 |
+
<show_in_store>0</show_in_store>
|
74 |
+
</sort_order>
|
75 |
+
<test_mode translate="label">
|
76 |
+
<label>Test Mode</label>
|
77 |
+
<frontend_type>select</frontend_type>
|
78 |
+
<source_model>adminhtml/system_config_source_testmodeACH</source_model>
|
79 |
+
<sort_order>6</sort_order>
|
80 |
+
<show_in_default>1</show_in_default>
|
81 |
+
<show_in_website>1</show_in_website>
|
82 |
+
<show_in_store>0</show_in_store>
|
83 |
+
</test_mode>
|
84 |
+
<debug translate="label">
|
85 |
+
<label>Debug</label>
|
86 |
+
<frontend_type>select</frontend_type>
|
87 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
88 |
+
<sort_order>20</sort_order>
|
89 |
+
<show_in_default>1</show_in_default>
|
90 |
+
<show_in_website>1</show_in_website>
|
91 |
+
<show_in_store>0</show_in_store>
|
92 |
+
</debug>
|
93 |
+
<title translate="label">
|
94 |
+
<label>Title</label>
|
95 |
+
<frontend_type>text</frontend_type>
|
96 |
+
<sort_order>2</sort_order>
|
97 |
+
<show_in_default>1</show_in_default>
|
98 |
+
<show_in_website>1</show_in_website>
|
99 |
+
<show_in_store>1</show_in_store>
|
100 |
+
</title>
|
101 |
+
<trans_key translate="label">
|
102 |
+
<label>Secret Key</label>
|
103 |
+
<frontend_type>obscure</frontend_type>
|
104 |
+
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
105 |
+
<sort_order>4</sort_order>
|
106 |
+
<show_in_default>1</show_in_default>
|
107 |
+
<show_in_website>1</show_in_website>
|
108 |
+
<show_in_store>0</show_in_store>
|
109 |
+
</trans_key>
|
110 |
+
<min_order_total translate="label">
|
111 |
+
<label>Minimum Order Total</label>
|
112 |
+
<frontend_type>text</frontend_type>
|
113 |
+
<sort_order>17</sort_order>
|
114 |
+
<show_in_default>1</show_in_default>
|
115 |
+
<show_in_website>1</show_in_website>
|
116 |
+
<show_in_store>0</show_in_store>
|
117 |
+
</min_order_total>
|
118 |
+
<max_order_total translate="label">
|
119 |
+
<label>Maximum Order Total</label>
|
120 |
+
<frontend_type>text</frontend_type>
|
121 |
+
<sort_order>18</sort_order>
|
122 |
+
<show_in_default>1</show_in_default>
|
123 |
+
<show_in_website>1</show_in_website>
|
124 |
+
<show_in_store>0</show_in_store>
|
125 |
+
</max_order_total>
|
126 |
+
<payment_action translate="label">
|
127 |
+
<label>Transaction Type</label>
|
128 |
+
<frontend_type>select</frontend_type>
|
129 |
+
<source_model>echeck/EcheckPayment_source_paymentAction</source_model>
|
130 |
+
<sort_order>4</sort_order>
|
131 |
+
<show_in_default>1</show_in_default>
|
132 |
+
<show_in_website>1</show_in_website>
|
133 |
+
<show_in_store>0</show_in_store>
|
134 |
+
</payment_action>
|
135 |
+
|
136 |
+
|
137 |
+
<model>
|
138 |
+
</model>
|
139 |
+
</fields>
|
140 |
+
</echeckpayment>
|
141 |
+
</groups>
|
142 |
+
</payment>
|
143 |
+
</sections>
|
144 |
+
</config>
|
app/code/local/BluePay/Echeck/sql/echeck_setup/mysql4-install-0.7.0.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category BluePay
|
23 |
+
* @package BluePay_Echeck
|
24 |
+
* @copyright Copyright (c) 2010 BluePay Processing, LLC (http://www.bluepay.com)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
$installer = $this;
|
29 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
30 |
+
|
31 |
+
$installer->startSetup();
|
32 |
+
|
33 |
+
$installer->run("
|
34 |
+
|
35 |
+
-- DROP TABLE if exists {$this->getTable('echeck_echeckpayment_debug')};
|
36 |
+
CREATE TABLE {$this->getTable('echeck_echeckpayment_debug')} (
|
37 |
+
`debug_id` int(10) unsigned NOT NULL auto_increment,
|
38 |
+
`request_body` text,
|
39 |
+
`response_body` text,
|
40 |
+
`request_serialized` text,
|
41 |
+
`result_serialized` text,
|
42 |
+
`request_dump` text,
|
43 |
+
`result_dump` text,
|
44 |
+
PRIMARY KEY (`debug_id`)
|
45 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
46 |
+
|
47 |
+
");
|
48 |
+
|
49 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/template/payment/form/echeck.phtml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<fieldset class="form-list">
|
2 |
+
<?php $_code=$this->getMethodCode() ?>
|
3 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
4 |
+
<li>
|
5 |
+
<div class="input-box">
|
6 |
+
<label for="<?php echo $_code ?>_echeck_routing_number"><?php echo $this->__('Bank routing number') ?> <span class="required">*</span></label><br />
|
7 |
+
<input id="<?php echo $_code ?>_echeck_routing_number" name="payment[echeck_routing_number]" class="required-entry">
|
8 |
+
</div>
|
9 |
+
</li>
|
10 |
+
<!-- <li>
|
11 |
+
<div class="input-box">
|
12 |
+
<label for="<?php echo $_code ?>_echeck_bank_name"><?php echo $this->__('Bank name') ?> <span class="required">*</span></label><br />
|
13 |
+
<input id="<?php echo $_code ?>_echeck_bank_name" name="payment[echeck_bank_name]" class="required-entry">
|
14 |
+
</div>
|
15 |
+
</li> -->
|
16 |
+
<li>
|
17 |
+
<div class="input-box">
|
18 |
+
<label for="<?php echo $_code ?>_echeck_bank_acct_num"><?php echo $this->__('Bank account number') ?> <span class="required">*</span></label><br />
|
19 |
+
<input id="<?php echo $_code ?>_echeck_bank_acct_num" name="payment[echeck_bank_acct_num]" class="required-entry">
|
20 |
+
</div>
|
21 |
+
</li>
|
22 |
+
<li>
|
23 |
+
<div class="input-box">
|
24 |
+
<label for="<?php echo $_code ?>_echeck_account_type"><?php echo $this->__('Account type') ?> <span class="required">*</span></label><br />
|
25 |
+
<select id="<?php echo $_code ?>_echeck_account_type" name="payment[echeck_account_type]" class="required-entry">
|
26 |
+
<option value=""><?php echo $this->__('--Please Select--')?></option>
|
27 |
+
<?php $_accountType = $this->getInfoData('account_type') ?>
|
28 |
+
<?php foreach ($this->getAccountAvailableTypes() as $_typeCode => $_typeName): ?>
|
29 |
+
<option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_accountType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
30 |
+
<?php endforeach ?>
|
31 |
+
</select>
|
32 |
+
</div>
|
33 |
+
</li>
|
34 |
+
<!-- <li>
|
35 |
+
<div class="input-box">
|
36 |
+
<label for="<?php echo $_code ?>_echeck_account_name"><?php echo $this->__('Name On Account') ?> <span class="required">*</span></label><br />
|
37 |
+
<input id="<?php echo $_code ?>_echeck_account_name" name="payment[echeck_account_name]" class="required-entry">
|
38 |
+
</div>
|
39 |
+
</li> -->
|
40 |
+
<!-- li>
|
41 |
+
<div class="input-box">
|
42 |
+
<label for="<?php echo $_code ?>_echeck_type"><?php echo $this->__('Echeck type') ?> <span class="required">*</span></label><br />
|
43 |
+
<input id="<?php echo $_code ?>_echeck_type" name="payment[echeck_type]" class="required-entry">
|
44 |
+
</div>
|
45 |
+
</li-->
|
46 |
+
</ul>
|
47 |
+
</fieldset>
|
app/design/adminhtml/default/default/template/payment/info/echeck.phtml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if($_info = $this->getInfo()): ?>
|
2 |
+
<?php echo $this->__('Bank routing number: %s', $this->htmlEscape($_info->getEcheckRoutingNumber())) ?><br />
|
3 |
+
<!-- <?php echo $this->__('Bank name: %s', $this->htmlEscape($_info->getEcheckBankName())) ?><br /> -->
|
4 |
+
<?php echo $this->__('Account type: %s', $this->htmlEscape($_info->getEcheckAccountType())) ?><br />
|
5 |
+
<!-- <?php echo $this->__('Account name: %s', $this->htmlEscape($_info->getEcheckAccountName())) ?><br /> -->
|
6 |
+
<?php echo $this->__('Account number: ***%s', $this->htmlEscape($_info->getEcheckBankAcctNum4())) ?>
|
7 |
+
<?php endif; ?>
|
app/design/frontend/default/default/template/payment/form/echeck.phtml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<fieldset class="form-list">
|
2 |
+
<?php $_code=$this->getMethodCode() ?>
|
3 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
4 |
+
<li>
|
5 |
+
<div class="input-box">
|
6 |
+
<label for="<?php echo $_code ?>_echeck_routing_number"><?php echo $this->__('Bank routing number') ?> <span class="required">*</span></label><br />
|
7 |
+
<input id="<?php echo $_code ?>_echeck_routing_number" name="payment[echeck_routing_number]" class="required-entry">
|
8 |
+
</div>
|
9 |
+
</li>
|
10 |
+
<!-- <li>
|
11 |
+
<div class="input-box">
|
12 |
+
<label for="<?php echo $_code ?>_echeck_bank_name"><?php echo $this->__('Bank name') ?> <span class="required">*</span></label><br />
|
13 |
+
<input id="<?php echo $_code ?>_echeck_bank_name" name="payment[echeck_bank_name]" class="required-entry">
|
14 |
+
</div>
|
15 |
+
</li> -->
|
16 |
+
<li>
|
17 |
+
<div class="input-box">
|
18 |
+
<label for="<?php echo $_code ?>_echeck_bank_acct_num"><?php echo $this->__('Bank account number') ?> <span class="required">*</span></label><br />
|
19 |
+
<input id="<?php echo $_code ?>_echeck_bank_acct_num" name="payment[echeck_bank_acct_num]" class="required-entry">
|
20 |
+
</div>
|
21 |
+
</li>
|
22 |
+
<li>
|
23 |
+
<div class="input-box">
|
24 |
+
<label for="<?php echo $_code ?>_echeck_account_type"><?php echo $this->__('Account type') ?> <span class="required">*</span></label><br />
|
25 |
+
<select id="<?php echo $_code ?>_echeck_account_type" name="payment[echeck_account_type]" class="required-entry">
|
26 |
+
<option value=""><?php echo $this->__('--Please Select--')?></option>
|
27 |
+
<?php $_accountType = $this->getInfoData('account_type') ?>
|
28 |
+
<?php foreach ($this->getAccountAvailableTypes() as $_typeCode => $_typeName): ?>
|
29 |
+
<option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_accountType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
30 |
+
<?php endforeach ?>
|
31 |
+
</select>
|
32 |
+
</div>
|
33 |
+
</li>
|
34 |
+
<!-- <li>
|
35 |
+
<div class="input-box">
|
36 |
+
<label for="<?php echo $_code ?>_echeck_account_name"><?php echo $this->__('Name On Account') ?> <span class="required">*</span></label><br />
|
37 |
+
<input id="<?php echo $_code ?>_echeck_account_name" name="payment[echeck_account_name]" class="required-entry">
|
38 |
+
</div>
|
39 |
+
</li> -->
|
40 |
+
<!-- li>
|
41 |
+
<div class="input-box">
|
42 |
+
<label for="<?php echo $_code ?>_echeck_type"><?php echo $this->__('Echeck type') ?> <span class="required">*</span></label><br />
|
43 |
+
<input id="<?php echo $_code ?>_echeck_type" name="payment[echeck_type]" class="required-entry">
|
44 |
+
</div>
|
45 |
+
</li-->
|
46 |
+
</ul>
|
47 |
+
</fieldset>
|
app/design/frontend/default/default/template/payment/info/echeck.phtml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if($_info = $this->getInfo()): ?>
|
2 |
+
<?php echo $this->__('Bank routing number: %s', $this->htmlEscape($_info->getEcheckRoutingNumber())) ?><br />
|
3 |
+
<!-- <?php echo $this->__('Bank name: %s', $this->htmlEscape($_info->getEcheckBankName())) ?><br /> -->
|
4 |
+
<?php echo $this->__('Account type: %s', $this->htmlEscape($_info->getEcheckAccountType())) ?><br />
|
5 |
+
<!-- <?php echo $this->__('Account name: %s', $this->htmlEscape($_info->getEcheckAccountName())) ?><br /> -->
|
6 |
+
<?php echo $this->__('Account number: ***%s', $this->htmlEscape($_info->getEcheckBankAcctNum4())) ?>
|
7 |
+
<?php endif; ?>
|
app/etc/modules/BluePay_Echeck.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<config>
|
2 |
+
<modules>
|
3 |
+
<BluePay_Echeck>
|
4 |
+
<active>true</active>
|
5 |
+
<codePool>local</codePool>
|
6 |
+
</BluePay_Echeck>
|
7 |
+
</modules>
|
8 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>BluePay_Echeck</name>
|
4 |
+
<version>1.4.2.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Bluepay gateway electronic check payment module.</summary>
|
10 |
+
<description>This is an e-check module to be used with the Bluepay payment gateway. This extension requires a Bluepay gateway account.</description>
|
11 |
+
<notes>This extension is brand new, however all known bugs have been worked out.</notes>
|
12 |
+
<authors><author><name>Justin Slingerland</name><user>auto-converted</user><email>jslingerland@bluepay.com</email></author></authors>
|
13 |
+
<date>2010-09-24</date>
|
14 |
+
<time>18:13:56</time>
|
15 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="payment"><dir name="form"><file name="echeck.phtml" hash="9fafb7aedbd119d560e46924ee051616"/></dir><dir name="info"><file name="echeck.phtml" hash="a42bea9e87b1c57d5189e0ac0b9d5df9"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="payment"><dir name="form"><file name="echeck.phtml" hash="9fafb7aedbd119d560e46924ee051616"/></dir><dir name="info"><file name="echeck.phtml" hash="a42bea9e87b1c57d5189e0ac0b9d5df9"/></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="BluePay"><dir name="Echeck"><dir name="Block"><dir name="Form"><file name="Echeck.php" hash="8923468466074253526500bd4fabe2e2"/></dir><dir name="Info"><file name="Echeck.php" hash="76a035e618edbcd0463db55f26ce3cb1"/></dir><file name="Form.php" hash="f6559b3ed104627ef0b2d19e9795dc17"/><file name="Info.php" hash="de65c278c010d85d67e5b1ae031a1c28"/></dir><dir name="etc"><file name="config.xml" hash="744ed9c6ff46796ab6e9e6951a204855"/><file name="system.xml" hash="e77e5e5a1a5d8c4c93363bcd7840c186"/></dir><dir name="Helper"><file name="Data.php" hash="8f64e111734ce162a0d0b28ebad1db90"/></dir><dir name="Model"><dir name="EcheckPayment"><dir name="Source"><file name="Accounttypes.php" hash="3c8b8034d6c96b0280db4e7e595ab73c"/><file name="PaymentAction.php" hash="9da2c6580cfd6d611c207e5be3b2aea5"/></dir><file name="Debug.php" hash="76d8cb6c86a595b2b78d43664c6dd6e8"/><file name="Request.php" hash="0a65c3aae69eb0c196231cbf6f007cec"/><file name="Result.php" hash="6935ba845811c005b9c501a03891e33a"/></dir><dir name="Mysql4"><dir name="ECheckPayment"><dir name="Debug"><file name="Collection.php" hash="aa8222f78f17b4c35050c9d06dc085bc"/></dir><file name="Debug.php" hash="829e050092ffb527e08a6a9d9959374a"/></dir></dir><file name="Config.php" hash="94567f95c4463897ba822ca1c61dca7a"/><file name="EcheckPayment.php" hash="d474598054f967656b1b4c9a9c352ce1"/></dir><dir name="sql"><dir name="echeck_setup"><file name="mysql4-install-0.7.0.php" hash="8a9c16edd149e1e41c4015aeebb35892"/></dir></dir></dir></dir></target><target name="magecore"><dir name="Mage"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="TestmodeACH.php" hash="371db79c030d69b3b19fc4caac4e7ba0"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BluePay_Echeck.xml" hash="252f244ae4f8cba53f883559a23273c7"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
+
</package>
|