Version Notes
first release
Download this release
Release Info
Developer | Easy Commerce |
Extension | Mage_Secureebs |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/core/Mage/Adminhtml/Model/System/Config/Source/Mode.php +37 -0
- app/code/core/Mage/Secureebs/Block/Standard/Failure.php +31 -0
- app/code/core/Mage/Secureebs/Block/Standard/Form.php +37 -0
- app/code/core/Mage/Secureebs/Block/Standard/Redirect.php +123 -0
- app/code/core/Mage/Secureebs/Helper/Data.php +32 -0
- app/code/core/Mage/Secureebs/Model/Api/Debug.php +35 -0
- app/code/core/Mage/Secureebs/Model/Config.php +138 -0
- app/code/core/Mage/Secureebs/Model/Mysql4/Api/Debug.php +36 -0
- app/code/core/Mage/Secureebs/Model/Mysql4/Api/Debug/Collection.php +35 -0
- app/code/core/Mage/Secureebs/Model/Mysql4/Setup.php +33 -0
- app/code/core/Mage/Secureebs/Model/Source/Language.php +44 -0
- app/code/core/Mage/Secureebs/Model/Standard.php +219 -0
- app/code/core/Mage/Secureebs/controllers/Rc43.php +151 -0
- app/code/core/Mage/Secureebs/controllers/StandardController.php +252 -0
- app/code/core/Mage/Secureebs/etc/config.xml +148 -0
- app/code/core/Mage/Secureebs/etc/system.xml +153 -0
- app/code/core/Mage/Secureebs/sql/secureebs_setup/mysql4-install-0.1.0.php +39 -0
- app/design/frontend/base/default/template/Secureebs/form.phtml +83 -0
- app/design/frontend/base/default/template/Secureebs/info.phtml +29 -0
- app/design/frontend/base/default/template/Secureebs/standard/failure.phtml +24 -0
- app/design/frontend/base/default/template/Secureebs/standard/form.phtml +28 -0
- app/etc/modules/Mage_Secureebs.xml +32 -0
- package.xml +18 -0
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Mode.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
class Mage_Adminhtml_Model_System_Config_Source_Mode
|
27 |
+
{
|
28 |
+
|
29 |
+
public function toOptionArray()
|
30 |
+
{
|
31 |
+
return array(
|
32 |
+
array('value'=>'1', 'label'=>Mage::helper('adminhtml')->__('TEST')),
|
33 |
+
array('value'=>'0', 'label'=>Mage::helper('adminhtml')->__('LIVE')),
|
34 |
+
);
|
35 |
+
}
|
36 |
+
|
37 |
+
}
|
app/code/core/Mage/Secureebs/Block/Standard/Failure.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/**
|
21 |
+
* Failure Response from Secureebs
|
22 |
+
*
|
23 |
+
* @category Mage
|
24 |
+
* @package Mage_Secureebs
|
25 |
+
* @name Mage_Secureebs_Block_Standard_Failure
|
26 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
27 |
+
*/
|
28 |
+
|
29 |
+
class Mage_Secureebs_Block_Standard_Failure extends Mage_Core_Block_Template
|
30 |
+
{
|
31 |
+
}
|
app/code/core/Mage/Secureebs/Block/Standard/Form.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Form Block
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Block_Standard_Form
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
|
30 |
+
class Mage_Secureebs_Block_Standard_Form extends Mage_Payment_Block_Form
|
31 |
+
{
|
32 |
+
protected function _construct()
|
33 |
+
{
|
34 |
+
$this->setTemplate('secureebs/standard/form.phtml');
|
35 |
+
parent::_construct();
|
36 |
+
}
|
37 |
+
}
|
app/code/core/Mage/Secureebs/Block/Standard/Redirect.php
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Redirect to Secureebs
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Block_Standard_Redirect
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
|
30 |
+
class Mage_Secureebs_Block_Standard_Redirect extends Mage_Core_Block_Abstract
|
31 |
+
{
|
32 |
+
|
33 |
+
protected function _toHtml()
|
34 |
+
{
|
35 |
+
$standard = Mage::getModel('secureebs/standard');
|
36 |
+
$form = new Varien_Data_Form();
|
37 |
+
$form->setAction($standard->getSecureebsUrl())
|
38 |
+
->setId('secureebs_standard_checkout')
|
39 |
+
->setName('secureebs_standard_checkout')
|
40 |
+
->setMethod('POST')
|
41 |
+
->setUseContainer(true);
|
42 |
+
|
43 |
+
foreach ($standard->setOrder($this->getOrder())->getStandardCheckoutFormFields() as $field => $value) {
|
44 |
+
|
45 |
+
if($field == 'return')
|
46 |
+
{
|
47 |
+
$returnurl=$value."?DR={DR}";
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
+
if($field == 'product_price')
|
52 |
+
{
|
53 |
+
$amount=$value;
|
54 |
+
}
|
55 |
+
if($field == 'cs1')
|
56 |
+
{
|
57 |
+
$referenceno=$value;
|
58 |
+
}
|
59 |
+
if($field == 'f_name')
|
60 |
+
{
|
61 |
+
$fname=$value;
|
62 |
+
}
|
63 |
+
if($field == 's_name')
|
64 |
+
{
|
65 |
+
$lname=$value;
|
66 |
+
}
|
67 |
+
if($field == 'product_name')
|
68 |
+
{
|
69 |
+
$desc=$value;
|
70 |
+
}
|
71 |
+
if($field == 'zip')
|
72 |
+
{
|
73 |
+
$postalcode=$value;
|
74 |
+
}
|
75 |
+
if($field == 'street')
|
76 |
+
{
|
77 |
+
$street=$value;
|
78 |
+
}
|
79 |
+
if($field == 'street')
|
80 |
+
{
|
81 |
+
$street=$value;
|
82 |
+
}
|
83 |
+
if($field == 'city')
|
84 |
+
{
|
85 |
+
$city=$value;
|
86 |
+
}
|
87 |
+
if($field == 'state')
|
88 |
+
{
|
89 |
+
$state=$value;
|
90 |
+
}
|
91 |
+
$form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
|
92 |
+
}
|
93 |
+
|
94 |
+
$name=$fname." ".$lname;
|
95 |
+
$address=$street.",".$city.",".$state;
|
96 |
+
$mode=Mage::getSingleton('secureebs/config')->getTransactionMode();
|
97 |
+
if($mode == '1')
|
98 |
+
{
|
99 |
+
$mode="TEST";
|
100 |
+
}
|
101 |
+
else
|
102 |
+
{
|
103 |
+
$mode="LIVE";
|
104 |
+
}
|
105 |
+
|
106 |
+
$form->addField('reference_no', 'hidden', array('name'=>'reference_no', 'value'=>$referenceno));
|
107 |
+
$form->addField('amount', 'hidden', array('name'=>'amount', 'value'=>$amount));
|
108 |
+
$form->addField('mode', 'hidden', array('name'=>'mode', 'value'=>$mode));
|
109 |
+
$form->addField('return_url', 'hidden', array('name'=>'return_url', 'value'=>$returnurl));
|
110 |
+
$form->addField('name', 'hidden', array('name'=>'name', 'value'=>$name));
|
111 |
+
$form->addField('description', 'hidden', array('name'=>'description', 'value'=>$desc));
|
112 |
+
$form->addField('address', 'hidden', array('name'=>'address', 'value'=>$address));
|
113 |
+
$form->addField('postal_code', 'hidden', array('name'=>'postal_code', 'value'=>$postalcode));
|
114 |
+
|
115 |
+
$html = '<html><body>';
|
116 |
+
$html.= $this->__('You will be redirected to E-Billing Solutions in a few seconds.');
|
117 |
+
$html.= $form->toHtml();
|
118 |
+
$html.= '<script type="text/javascript">document.getElementById("secureebs_standard_checkout").submit();</script>';
|
119 |
+
$html.= '</body></html>';
|
120 |
+
|
121 |
+
return $html;
|
122 |
+
}
|
123 |
+
}
|
app/code/core/Mage/Secureebs/Helper/Data.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Data Helper
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Helper_Data
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
class Mage_Secureebs_Helper_Data extends Mage_Core_Helper_Abstract
|
30 |
+
{
|
31 |
+
|
32 |
+
}
|
app/code/core/Mage/Secureebs/Model/Api/Debug.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Api Debug
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Model_Api_Debug
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
class Mage_Secureebs_Model_Api_Debug extends Mage_Core_Model_Abstract
|
30 |
+
{
|
31 |
+
protected function _construct()
|
32 |
+
{
|
33 |
+
$this->_init('secureebs/api_debug');
|
34 |
+
}
|
35 |
+
}
|
app/code/core/Mage/Secureebs/Model/Config.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
/**
|
21 |
+
* Secureebs Configuration Model
|
22 |
+
*
|
23 |
+
* @category Mage
|
24 |
+
* @package Mage_Secureebs
|
25 |
+
* @name Mage_Secureebs_Model_Config
|
26 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
27 |
+
*/
|
28 |
+
|
29 |
+
class Mage_Secureebs_Model_Config extends Varien_Object
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Return config var
|
33 |
+
*
|
34 |
+
* @param string Var key
|
35 |
+
* @param string Default value for non-existing key
|
36 |
+
* @return mixed
|
37 |
+
*/
|
38 |
+
public function getConfigData($key, $default=false)
|
39 |
+
{
|
40 |
+
if (!$this->hasData($key)) {
|
41 |
+
$value = Mage::getStoreConfig('payment/secureebs_standard/'.$key);
|
42 |
+
if (is_null($value) || false===$value) {
|
43 |
+
$value = $default;
|
44 |
+
}
|
45 |
+
$this->setData($key, $value);
|
46 |
+
}
|
47 |
+
return $this->getData($key);
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Return Transaction Mode registered in Secure Ebs Admnin Panel
|
52 |
+
*
|
53 |
+
* @param none
|
54 |
+
* @return string Transaction Mode
|
55 |
+
*/
|
56 |
+
public function getTransactionMode ()
|
57 |
+
{
|
58 |
+
return $this->getConfigData('mode');
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Return Secret Key registered in Secure Ebs Admnin Panel
|
63 |
+
*
|
64 |
+
* @param none
|
65 |
+
* @return string Secret Key
|
66 |
+
*/
|
67 |
+
public function getSecretKey ()
|
68 |
+
{
|
69 |
+
return $this->getConfigData('secret_key');
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Return Account ID (general type payments) registered in Secure Ebs Admnin Panel
|
75 |
+
*
|
76 |
+
* @param none
|
77 |
+
* @return string Account ID
|
78 |
+
*/
|
79 |
+
public function getAccountId ()
|
80 |
+
{
|
81 |
+
return $this->getConfigData('account_id');
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Return Store description sent to Secureebs
|
88 |
+
*
|
89 |
+
* @return string Description
|
90 |
+
*/
|
91 |
+
public function getDescription ()
|
92 |
+
{
|
93 |
+
$description = $this->getConfigData('description');
|
94 |
+
return $description;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Return new order status
|
99 |
+
*
|
100 |
+
* @return string New order status
|
101 |
+
*/
|
102 |
+
public function getNewOrderStatus ()
|
103 |
+
{
|
104 |
+
return $this->getConfigData('order_status');
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Return debug flag
|
109 |
+
*
|
110 |
+
* @return boolean Debug flag (0/1)
|
111 |
+
*/
|
112 |
+
public function getDebug ()
|
113 |
+
{
|
114 |
+
return $this->getConfigData('debug_flag');
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Return accepted currency
|
119 |
+
*
|
120 |
+
* @param none
|
121 |
+
* @return string Currenc
|
122 |
+
*/
|
123 |
+
public function getCurrency ()
|
124 |
+
{
|
125 |
+
return $this->getConfigData('currency');
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Return client interface language
|
130 |
+
*
|
131 |
+
* @param none
|
132 |
+
* @return string(2) Accepted language
|
133 |
+
*/
|
134 |
+
public function getLanguage ()
|
135 |
+
{
|
136 |
+
return $this->getConfigData('language');
|
137 |
+
}
|
138 |
+
}
|
app/code/core/Mage/Secureebs/Model/Mysql4/Api/Debug.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Secureebs API Debug Resource
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Model_Mysql4_Api_Debug
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
|
30 |
+
class Mage_Secureebs_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
|
31 |
+
{
|
32 |
+
protected function _construct()
|
33 |
+
{
|
34 |
+
$this->_init('secureebs/api_debug', 'debug_id');
|
35 |
+
}
|
36 |
+
}
|
app/code/core/Mage/Secureebs/Model/Mysql4/Api/Debug/Collection.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Secureebs API Debug Resource Collection
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Model_Mysql4_Api_Debug_Collection
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
class Mage_Secureebs_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
30 |
+
{
|
31 |
+
protected function _construct()
|
32 |
+
{
|
33 |
+
$this->_init('secureebs/api_debug');
|
34 |
+
}
|
35 |
+
}
|
app/code/core/Mage/Secureebs/Model/Mysql4/Setup.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Setup model
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Model_Mysql4_Setup
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
|
30 |
+
class Mage_Secureebs_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup
|
31 |
+
{
|
32 |
+
|
33 |
+
}
|
app/code/core/Mage/Secureebs/Model/Source/Language.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Secureebs Allowed languages Resource
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Model_Source_Language
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
|
30 |
+
class Mage_Secureebs_Model_Source_Language
|
31 |
+
{
|
32 |
+
public function toOptionArray()
|
33 |
+
{
|
34 |
+
return array(
|
35 |
+
array('value' => 'EN', 'label' => Mage::helper('secureebs')->__('English')),
|
36 |
+
array('value' => 'RU', 'label' => Mage::helper('secureebs')->__('Russian')),
|
37 |
+
array('value' => 'NL', 'label' => Mage::helper('secureebs')->__('Dutch')),
|
38 |
+
array('value' => 'DE', 'label' => Mage::helper('secureebs')->__('German')),
|
39 |
+
);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
|
app/code/core/Mage/Secureebs/Model/Standard.php
ADDED
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Secureebs Standard Model
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_Model_Standard
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
class Mage_Secureebs_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
30 |
+
{
|
31 |
+
protected $_code = 'secureebs_standard';
|
32 |
+
protected $_formBlockType = 'secureebs/standard_form';
|
33 |
+
|
34 |
+
protected $_isGateway = false;
|
35 |
+
protected $_canAuthorize = true;
|
36 |
+
protected $_canCapture = true;
|
37 |
+
protected $_canCapturePartial = false;
|
38 |
+
protected $_canRefund = false;
|
39 |
+
protected $_canVoid = false;
|
40 |
+
protected $_canUseInternal = false;
|
41 |
+
protected $_canUseCheckout = true;
|
42 |
+
protected $_canUseForMultishipping = false;
|
43 |
+
|
44 |
+
protected $_order = null;
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get Config model
|
49 |
+
*
|
50 |
+
* @return object Mage_Secureebs_Model_Config
|
51 |
+
*/
|
52 |
+
public function getConfig()
|
53 |
+
{
|
54 |
+
return Mage::getSingleton('secureebs/config');
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Payment validation
|
59 |
+
*
|
60 |
+
* @param none
|
61 |
+
* @return Mage_Secureebs_Model_Standard
|
62 |
+
*/
|
63 |
+
public function validate()
|
64 |
+
{
|
65 |
+
parent::validate();
|
66 |
+
$paymentInfo = $this->getInfoInstance();
|
67 |
+
if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
|
68 |
+
$currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode();
|
69 |
+
} else {
|
70 |
+
$currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode();
|
71 |
+
}
|
72 |
+
// if ($currency_code != $this->getConfig()->getCurrency()) {
|
73 |
+
// Mage::throwException(Mage::helper('secureebs')->__('Selected currency //code ('.$currency_code.') is not compatabile with SecureEbs'));
|
74 |
+
// }
|
75 |
+
return $this;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Capture payment
|
80 |
+
*
|
81 |
+
* @param Varien_Object $orderPayment
|
82 |
+
* @return Mage_Payment_Model_Abstract
|
83 |
+
*/
|
84 |
+
public function capture (Varien_Object $payment, $amount)
|
85 |
+
{
|
86 |
+
$payment->setStatus(self::STATUS_APPROVED)
|
87 |
+
->setLastTransId($this->getTransactionId());
|
88 |
+
|
89 |
+
return $this;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Returns Target URL
|
94 |
+
*
|
95 |
+
* @return string Target URL
|
96 |
+
*/
|
97 |
+
public function getSecureebsUrl ()
|
98 |
+
{
|
99 |
+
return 'https://secure.ebs.in/pg/ma/sale/pay/';
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Return URL for Secureebs success response
|
104 |
+
*
|
105 |
+
* @return string URL
|
106 |
+
*/
|
107 |
+
protected function getSuccessURL ()
|
108 |
+
{
|
109 |
+
return Mage::getUrl('secureebs/standard/success', array('_secure' => true));
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Return URL for Secureebs notification
|
114 |
+
*
|
115 |
+
* @return string Notification URL
|
116 |
+
*/
|
117 |
+
protected function getNotificationURL ()
|
118 |
+
{
|
119 |
+
return Mage::getUrl('secureebs/standard/notify', array('_secure' => true));
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Return URL for Secureebs failure response
|
124 |
+
*
|
125 |
+
* @return string URL
|
126 |
+
*/
|
127 |
+
protected function getFailureURL ()
|
128 |
+
{
|
129 |
+
return Mage::getUrl('secureebs/standard/failure', array('_secure' => true));
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Form block description
|
134 |
+
*
|
135 |
+
* @return object
|
136 |
+
*/
|
137 |
+
public function createFormBlock($name)
|
138 |
+
{
|
139 |
+
$block = $this->getLayout()->createBlock('secureebs/form_standard', $name);
|
140 |
+
$block->setMethod($this->_code);
|
141 |
+
$block->setPayment($this->getPayment());
|
142 |
+
|
143 |
+
return $block;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Return Order Place Redirect URL
|
148 |
+
*
|
149 |
+
* @return string Order Redirect URL
|
150 |
+
*/
|
151 |
+
public function getOrderPlaceRedirectUrl()
|
152 |
+
{
|
153 |
+
return Mage::getUrl('secureebs/standard/redirect');
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Return Standard Checkout Form Fields for request to Secureebs
|
158 |
+
*
|
159 |
+
* @return array Array of hidden form fields
|
160 |
+
*/
|
161 |
+
public function getStandardCheckoutFormFields ()
|
162 |
+
{
|
163 |
+
$order = $this->getOrder();
|
164 |
+
if (!($order instanceof Mage_Sales_Model_Order)) {
|
165 |
+
Mage::throwException($this->_getHelper()->__('Cannot retrieve order object'));
|
166 |
+
}
|
167 |
+
|
168 |
+
$billingAddress = $order->getBillingAddress();
|
169 |
+
|
170 |
+
$streets = $billingAddress->getStreet();
|
171 |
+
$street = isset($streets[0]) && $streets[0] != ''
|
172 |
+
? $streets[0]
|
173 |
+
: (isset($streets[1]) && $streets[1] != '' ? $streets[1] : '');
|
174 |
+
|
175 |
+
if ($this->getConfig()->getDescription()) {
|
176 |
+
$transDescription = $this->getConfig()->getDescription();
|
177 |
+
} else {
|
178 |
+
$transDescription = Mage::helper('secureebs')->__('Order #%s', $order->getRealOrderId());
|
179 |
+
}
|
180 |
+
|
181 |
+
if ($order->getCustomerEmail()) {
|
182 |
+
$email = $order->getCustomerEmail();
|
183 |
+
} elseif ($billingAddress->getEmail()) {
|
184 |
+
$email = $billingAddress->getEmail();
|
185 |
+
} else {
|
186 |
+
$email = '';
|
187 |
+
}
|
188 |
+
|
189 |
+
$fields = array(
|
190 |
+
'account_id' => $this->getConfig()->getAccountId(),
|
191 |
+
'return' => Mage::getUrl('secureebs/standard/success',array('_secure' => true)),
|
192 |
+
'product_name' => $transDescription,
|
193 |
+
'product_price' => $order->getBaseGrandTotal(),
|
194 |
+
'language' => $this->getConfig()->getLanguage(),
|
195 |
+
'f_name' => $billingAddress->getFirstname(),
|
196 |
+
's_name' => $billingAddress->getLastname(),
|
197 |
+
'street' => $street,
|
198 |
+
'city' => $billingAddress->getCity(),
|
199 |
+
'state' => $billingAddress->getRegionModel()->getCode(),
|
200 |
+
'zip' => $billingAddress->getPostcode(),
|
201 |
+
'country' => $billingAddress->getCountryModel()->getIso3Code(),
|
202 |
+
'phone' => $billingAddress->getTelephone(),
|
203 |
+
'email' => $email,
|
204 |
+
'cb_url' => $this->getNotificationURL(),
|
205 |
+
'cb_type' => 'P', // POST method used (G - GET method)
|
206 |
+
'decline_url' => $this->getFailureURL(),
|
207 |
+
'cs1' => $order->getRealOrderId() );
|
208 |
+
|
209 |
+
if ($this->getConfig()->getDebug()) {
|
210 |
+
$debug = Mage::getModel('secureebs/api_debug')
|
211 |
+
->setRequestBody($this->getSecureebsUrl()."\n".print_r($fields,1))
|
212 |
+
->save();
|
213 |
+
$fields['cs2'] = $debug->getId();
|
214 |
+
}
|
215 |
+
|
216 |
+
return $fields;
|
217 |
+
}
|
218 |
+
|
219 |
+
}
|
app/code/core/Mage/Secureebs/controllers/Rc43.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* vim: set expandtab tabstop=4 shiftwidth=4: */
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | PHP Version 4 |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | Copyright (c) 1997-2003 The PHP Group |
|
7 |
+
// +----------------------------------------------------------------------+
|
8 |
+
// | This source file is subject to version 2.0 of the PHP license, |
|
9 |
+
// | that is bundled with this package in the file LICENSE, and is |
|
10 |
+
// | available at through the world-wide-web at |
|
11 |
+
// | http://www.php.net/license/2_02.txt. |
|
12 |
+
// | If you did not receive a copy of the PHP license and are unable to |
|
13 |
+
// | obtain it through the world-wide-web, please send a note to |
|
14 |
+
// | license@php.net so we can mail you a copy immediately. |
|
15 |
+
// +----------------------------------------------------------------------+
|
16 |
+
// | Authors: Dave Mertens <dmertens@zyprexia.com> |
|
17 |
+
// +----------------------------------------------------------------------+
|
18 |
+
//
|
19 |
+
// $Id: Rc4.php,v 1.6 2003/10/04 16:39:32 zyprexia Exp $
|
20 |
+
|
21 |
+
|
22 |
+
/**
|
23 |
+
* RC4 stream cipher routines implementation
|
24 |
+
*
|
25 |
+
* in PHP4 based on code written by Damien Miller <djm@mindrot.org>
|
26 |
+
*
|
27 |
+
* Usage:
|
28 |
+
* $key = "pear";
|
29 |
+
* $message = "PEAR rulez!";
|
30 |
+
*
|
31 |
+
* $rc4 = new Crypt_RC4;
|
32 |
+
* $rc4->key($key);
|
33 |
+
* echo "Original message: $message <br>\n";
|
34 |
+
* $rc4->crypt($message);
|
35 |
+
* echo "Encrypted message: $message <br>\n";
|
36 |
+
* $rc4->decrypt($message);
|
37 |
+
* echo "Decrypted message: $message <br>\n";
|
38 |
+
*
|
39 |
+
* @version $Revision: 1.6 $
|
40 |
+
* @access public
|
41 |
+
* @package Crypt
|
42 |
+
* @author Dave Mertens <dmertens@zyprexia.com>
|
43 |
+
*/
|
44 |
+
class Crypt_RC4 {
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Real programmers...
|
48 |
+
* @var array
|
49 |
+
*/
|
50 |
+
var $s= array();
|
51 |
+
/**
|
52 |
+
* Real programmers...
|
53 |
+
* @var array
|
54 |
+
*/
|
55 |
+
var $i= 0;
|
56 |
+
/**
|
57 |
+
* Real programmers...
|
58 |
+
* @var array
|
59 |
+
*/
|
60 |
+
var $j= 0;
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Key holder
|
64 |
+
* @var string
|
65 |
+
*/
|
66 |
+
var $_key;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Constructor
|
70 |
+
* Pass encryption key to key()
|
71 |
+
*
|
72 |
+
* @see key()
|
73 |
+
* @param string key - Key which will be used for encryption
|
74 |
+
* @return void
|
75 |
+
* @access public
|
76 |
+
*/
|
77 |
+
function Crypt_RC4($key = null) {
|
78 |
+
if ($key != null) {
|
79 |
+
$this->setKey($key);
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
function setKey($key) {
|
84 |
+
if (strlen($key) > 0)
|
85 |
+
$this->_key = $key;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Assign encryption key to class
|
90 |
+
*
|
91 |
+
* @param string key - Key which will be used for encryption
|
92 |
+
* @return void
|
93 |
+
* @access public
|
94 |
+
*/
|
95 |
+
function key(&$key) {
|
96 |
+
$len= strlen($key);
|
97 |
+
for ($this->i = 0; $this->i < 256; $this->i++) {
|
98 |
+
$this->s[$this->i] = $this->i;
|
99 |
+
}
|
100 |
+
|
101 |
+
$this->j = 0;
|
102 |
+
for ($this->i = 0; $this->i < 256; $this->i++) {
|
103 |
+
$this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256;
|
104 |
+
$t = $this->s[$this->i];
|
105 |
+
$this->s[$this->i] = $this->s[$this->j];
|
106 |
+
$this->s[$this->j] = $t;
|
107 |
+
}
|
108 |
+
$this->i = $this->j = 0;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Encrypt function
|
113 |
+
*
|
114 |
+
* @param string paramstr - string that will encrypted
|
115 |
+
* @return void
|
116 |
+
* @access public
|
117 |
+
*/
|
118 |
+
function crypt(&$paramstr) {
|
119 |
+
|
120 |
+
//Init key for every call, Bugfix 22316
|
121 |
+
$this->key($this->_key);
|
122 |
+
|
123 |
+
$len= strlen($paramstr);
|
124 |
+
for ($c= 0; $c < $len; $c++) {
|
125 |
+
$this->i = ($this->i + 1) % 256;
|
126 |
+
$this->j = ($this->j + $this->s[$this->i]) % 256;
|
127 |
+
$t = $this->s[$this->i];
|
128 |
+
$this->s[$this->i] = $this->s[$this->j];
|
129 |
+
$this->s[$this->j] = $t;
|
130 |
+
|
131 |
+
$t = ($this->s[$this->i] + $this->s[$this->j]) % 256;
|
132 |
+
|
133 |
+
$paramstr[$c] = chr(ord($paramstr[$c]) ^ $this->s[$t]);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Decrypt function
|
139 |
+
*
|
140 |
+
* @param string paramstr - string that will decrypted
|
141 |
+
* @return void
|
142 |
+
* @access public
|
143 |
+
*/
|
144 |
+
function decrypt(&$paramstr) {
|
145 |
+
//Decrypt is exactly the same as encrypting the string. Reuse (en)crypt code
|
146 |
+
$this->crypt($paramstr);
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
} //end of RC4 class
|
151 |
+
?>
|
app/code/core/Mage/Secureebs/controllers/StandardController.php
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Secureebs Standard Front Controller
|
23 |
+
*
|
24 |
+
* @category Mage
|
25 |
+
* @package Mage_Secureebs
|
26 |
+
* @name Mage_Secureebs_StandardController
|
27 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
28 |
+
*/
|
29 |
+
|
30 |
+
require('Rc43.php');
|
31 |
+
|
32 |
+
class Mage_Secureebs_StandardController extends Mage_Core_Controller_Front_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Order instance
|
36 |
+
*/
|
37 |
+
protected $_order;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Return debug flag
|
41 |
+
*
|
42 |
+
* @return boolean
|
43 |
+
*/
|
44 |
+
public function getDebug ()
|
45 |
+
{
|
46 |
+
return Mage::getSingleton('secureebs/config')->getDebug();
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get order
|
51 |
+
*
|
52 |
+
* @param none
|
53 |
+
* @return Mage_Sales_Model_Order
|
54 |
+
*/
|
55 |
+
public function getOrder ()
|
56 |
+
{
|
57 |
+
if ($this->_order == null) {
|
58 |
+
$session = Mage::getSingleton('checkout/session');
|
59 |
+
$this->_order = Mage::getModel('sales/order');
|
60 |
+
$this->_order->loadByIncrementId($session->getLastRealOrderId());
|
61 |
+
}
|
62 |
+
return $this->_order;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* When a customer chooses Secureebs on Checkout/Payment page
|
67 |
+
*
|
68 |
+
*/
|
69 |
+
public function redirectAction()
|
70 |
+
{
|
71 |
+
$session = Mage::getSingleton('checkout/session');
|
72 |
+
$session->setSecureebsStandardQuoteId($session->getQuoteId());
|
73 |
+
|
74 |
+
$order = $this->getOrder();
|
75 |
+
|
76 |
+
if (!$order->getId()) {
|
77 |
+
$this->norouteAction();
|
78 |
+
return;
|
79 |
+
}
|
80 |
+
|
81 |
+
$order->addStatusToHistory(
|
82 |
+
$order->getStatus(),
|
83 |
+
Mage::helper('secureebs')->__('Customer was redirected to Secureebs')
|
84 |
+
);
|
85 |
+
$order->save();
|
86 |
+
|
87 |
+
$this->getResponse()
|
88 |
+
->setBody($this->getLayout()
|
89 |
+
->createBlock('secureebs/standard_redirect')
|
90 |
+
->setOrder($order)
|
91 |
+
->toHtml());
|
92 |
+
|
93 |
+
$session->unsQuoteId();
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Success response from Secure Ebs
|
98 |
+
*
|
99 |
+
* @return void
|
100 |
+
*/
|
101 |
+
public function successAction()
|
102 |
+
{
|
103 |
+
|
104 |
+
if(isset($_GET['DR'])) {
|
105 |
+
$DR = preg_replace("/\s/","+",$_GET['DR']);
|
106 |
+
|
107 |
+
$secret_key = Mage::getSingleton('secureebs/config')->getSecretKey(); // Your Secret Key
|
108 |
+
|
109 |
+
$rc4 = new Crypt_RC4($secret_key);
|
110 |
+
$QueryString = base64_decode($DR);
|
111 |
+
$rc4->decrypt($QueryString);
|
112 |
+
$QueryString = split('&',$QueryString);
|
113 |
+
|
114 |
+
$response = array();
|
115 |
+
|
116 |
+
|
117 |
+
foreach($QueryString as $param){
|
118 |
+
$param = split('=',$param);
|
119 |
+
$response[$param[0]] = urldecode($param[1]);
|
120 |
+
}
|
121 |
+
}
|
122 |
+
if($response['ResponseCode']== 0)
|
123 |
+
{
|
124 |
+
$session = Mage::getSingleton('checkout/session');
|
125 |
+
$session->setQuoteId($session->getSecureebsStandardQuoteId());
|
126 |
+
$session->unsSecureebsStandardQuoteId();
|
127 |
+
|
128 |
+
$order = $this->getOrder();
|
129 |
+
|
130 |
+
if (!$order->getId()) {
|
131 |
+
$this->norouteAction();
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
|
135 |
+
$order->addStatusToHistory(
|
136 |
+
$order->getStatus(),
|
137 |
+
Mage::helper('secureebs')->__('Customer successfully returned from Secureebs')
|
138 |
+
);
|
139 |
+
|
140 |
+
$order->save();
|
141 |
+
$order->sendNewOrderEmail();
|
142 |
+
$this->_redirect('checkout/onepage/success');
|
143 |
+
}
|
144 |
+
else
|
145 |
+
{
|
146 |
+
$this->_redirect('secureebs/standard/failure');
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Notification Action from Secure Ebs
|
153 |
+
*
|
154 |
+
* @param none
|
155 |
+
* @return void
|
156 |
+
*/
|
157 |
+
public function notifyAction ()
|
158 |
+
{
|
159 |
+
$postData = $this->getRequest()->getPost();
|
160 |
+
|
161 |
+
if (!count($postData)) {
|
162 |
+
$this->norouteAction();
|
163 |
+
return;
|
164 |
+
}
|
165 |
+
|
166 |
+
if ($this->getDebug()) {
|
167 |
+
$debug = Mage::getModel('secureebs/api_debug');
|
168 |
+
if (isset($postData['cs2']) && $postData['cs2'] > 0) {
|
169 |
+
$debug->setId($postData['cs2']);
|
170 |
+
}
|
171 |
+
$debug->setResponseBody(print_r($postData,1))->save();
|
172 |
+
}
|
173 |
+
|
174 |
+
$order = Mage::getModel('sales/order');
|
175 |
+
$order->loadByIncrementId(Mage::helper('core')->decrypt($postData['cs1']));
|
176 |
+
if ($order->getId()) {
|
177 |
+
$result = $order->getPayment()->getMethodInstance()->setOrder($order)->validateResponse($postData);
|
178 |
+
|
179 |
+
if ($result instanceof Exception) {
|
180 |
+
if ($order->getId()) {
|
181 |
+
$order->addStatusToHistory(
|
182 |
+
$order->getStatus(),
|
183 |
+
$result->getMessage()
|
184 |
+
);
|
185 |
+
$order->cancel();
|
186 |
+
}
|
187 |
+
Mage::throwException($result->getMessage());
|
188 |
+
return;
|
189 |
+
}
|
190 |
+
|
191 |
+
$order->sendNewOrderEmail();
|
192 |
+
|
193 |
+
$order->getPayment()->getMethodInstance()->setTransactionId($postData['transaction_id']);
|
194 |
+
|
195 |
+
if ($this->saveInvoice($order)) {
|
196 |
+
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
|
197 |
+
}
|
198 |
+
$order->save();
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Save invoice for order
|
204 |
+
*
|
205 |
+
* @param Mage_Sales_Model_Order $order
|
206 |
+
* @return boolean Can save invoice or not
|
207 |
+
*/
|
208 |
+
protected function saveInvoice (Mage_Sales_Model_Order $order)
|
209 |
+
{
|
210 |
+
if ($order->canInvoice()) {
|
211 |
+
$invoice = $order->prepareInvoice();
|
212 |
+
$invoice->register()->capture();
|
213 |
+
Mage::getModel('core/resource_transaction')
|
214 |
+
->addObject($invoice)
|
215 |
+
->addObject($invoice->getOrder())
|
216 |
+
->save();
|
217 |
+
return true;
|
218 |
+
}
|
219 |
+
|
220 |
+
return false;
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Failure response from Secureebs
|
225 |
+
*
|
226 |
+
* @return void
|
227 |
+
*/
|
228 |
+
public function failureAction ()
|
229 |
+
{
|
230 |
+
$errorMsg = Mage::helper('secureebs')->__('There was an error occurred during paying process.');
|
231 |
+
|
232 |
+
$order = $this->getOrder();
|
233 |
+
|
234 |
+
if (!$order->getId()) {
|
235 |
+
$this->norouteAction();
|
236 |
+
return;
|
237 |
+
}
|
238 |
+
|
239 |
+
if ($order instanceof Mage_Sales_Model_Order && $order->getId()) {
|
240 |
+
$order->addStatusToHistory($order->getStatus(), $errorMsg);
|
241 |
+
$order->cancel();
|
242 |
+
$order->save();
|
243 |
+
}
|
244 |
+
|
245 |
+
$this->loadLayout();
|
246 |
+
$this->renderLayout();
|
247 |
+
|
248 |
+
Mage::getSingleton('checkout/session')->unsLastRealOrderId();
|
249 |
+
}
|
250 |
+
|
251 |
+
}
|
252 |
+
|
app/code/core/Mage/Secureebs/etc/config.xml
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
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 |
+
* @category Mage
|
17 |
+
* @package Mage_Secureebs
|
18 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
-->
|
22 |
+
<config>
|
23 |
+
<modules>
|
24 |
+
<Mage_Secureebs>
|
25 |
+
<version>0.1.0</version>
|
26 |
+
</Mage_Secureebs>
|
27 |
+
</modules>
|
28 |
+
<global>
|
29 |
+
<models>
|
30 |
+
<secureebs>
|
31 |
+
<class>Mage_Secureebs_Model</class>
|
32 |
+
<resourceModel>secureebs_mysql4</resourceModel>
|
33 |
+
</secureebs>
|
34 |
+
<secureebs_mysql4>
|
35 |
+
<class>Mage_Secureebs_Model_Mysql4</class>
|
36 |
+
<entities>
|
37 |
+
<api_debug><table>secureebs_api_debug</table></api_debug>
|
38 |
+
</entities>
|
39 |
+
</secureebs_mysql4>
|
40 |
+
</models>
|
41 |
+
<resources>
|
42 |
+
<secureebs_setup>
|
43 |
+
<setup>
|
44 |
+
<module>Mage_Secureebs</module>
|
45 |
+
<class>Mage_Secureebs_Model_Mysql4_Setup</class>
|
46 |
+
</setup>
|
47 |
+
<connection>
|
48 |
+
<use>core_setup</use>
|
49 |
+
</connection>
|
50 |
+
</secureebs_setup>
|
51 |
+
<secureebs_write>
|
52 |
+
<connection>
|
53 |
+
<use>core_write</use>
|
54 |
+
</connection>
|
55 |
+
</secureebs_write>
|
56 |
+
<secureebs_read>
|
57 |
+
<connection>
|
58 |
+
<use>core_read</use>
|
59 |
+
</connection>
|
60 |
+
</secureebs_read>
|
61 |
+
</resources>
|
62 |
+
<blocks>
|
63 |
+
<secureebs><class>Mage_Secureebs_Block</class></secureebs>
|
64 |
+
</blocks>
|
65 |
+
<payment>
|
66 |
+
<cc>
|
67 |
+
<types>
|
68 |
+
<DI>
|
69 |
+
<code>DI</code>
|
70 |
+
<name>Discover</name>
|
71 |
+
<order>60</order>
|
72 |
+
</DI>
|
73 |
+
<JCB>
|
74 |
+
<code>JCB</code>
|
75 |
+
<name>JCB</name>
|
76 |
+
<order>61</order>
|
77 |
+
</JCB>
|
78 |
+
<DICL>
|
79 |
+
<code>DICL</code>
|
80 |
+
<name>Diners Club</name>
|
81 |
+
<order>62</order>
|
82 |
+
</DICL>
|
83 |
+
<ENR>
|
84 |
+
<code>ENR</code>
|
85 |
+
<name>enRoute</name>
|
86 |
+
<order>63</order>
|
87 |
+
</ENR>
|
88 |
+
<SS>
|
89 |
+
<code>SS</code>
|
90 |
+
<name>Switch/Solo</name>
|
91 |
+
<order>64</order>
|
92 |
+
</SS>
|
93 |
+
</types>
|
94 |
+
</cc>
|
95 |
+
</payment>
|
96 |
+
</global>
|
97 |
+
<frontend>
|
98 |
+
<secure_url>
|
99 |
+
<secureebs_standard>/secureebs/standard</secureebs_standard>
|
100 |
+
</secure_url>
|
101 |
+
<routers>
|
102 |
+
<secureebs>
|
103 |
+
<use>standard</use>
|
104 |
+
<args>
|
105 |
+
<module>Mage_Secureebs</module>
|
106 |
+
<frontName>secureebs</frontName>
|
107 |
+
</args>
|
108 |
+
</secureebs>
|
109 |
+
</routers>
|
110 |
+
<translate>
|
111 |
+
<modules>
|
112 |
+
<Mage_Secureebs>
|
113 |
+
<files>
|
114 |
+
<default>Mage_Secureebs.csv</default>
|
115 |
+
</files>
|
116 |
+
</Mage_Secureebs>
|
117 |
+
</modules>
|
118 |
+
</translate>
|
119 |
+
<layout>
|
120 |
+
<updates>
|
121 |
+
<secureebs>
|
122 |
+
<file>secureebs.xml</file>
|
123 |
+
</secureebs>
|
124 |
+
</updates>
|
125 |
+
</layout>
|
126 |
+
</frontend>
|
127 |
+
<adminhtml>
|
128 |
+
<translate>
|
129 |
+
<modules>
|
130 |
+
<Mage_Secureebs>
|
131 |
+
<files>
|
132 |
+
<default>Mage_Secureebs.csv</default>
|
133 |
+
</files>
|
134 |
+
</Mage_Secureebs>
|
135 |
+
</modules>
|
136 |
+
</translate>
|
137 |
+
</adminhtml>
|
138 |
+
<default>
|
139 |
+
<payment>
|
140 |
+
<secureebs_standard>
|
141 |
+
<model>secureebs/standard</model>
|
142 |
+
<title>Secureebs Standard</title>
|
143 |
+
<allowspecific>0</allowspecific>
|
144 |
+
<transaction_type>O</transaction_type>
|
145 |
+
</secureebs_standard>
|
146 |
+
</payment>
|
147 |
+
</default>
|
148 |
+
</config>
|
app/code/core/Mage/Secureebs/etc/system.xml
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
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 |
+
* @category Mage
|
17 |
+
* @package Mage_Secureebs
|
18 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
-->
|
22 |
+
<config>
|
23 |
+
<sections>
|
24 |
+
<payment>
|
25 |
+
<groups>
|
26 |
+
<secureebs_standard translate="label comment" module="secureebs">
|
27 |
+
<label>Secure Ebs Standard</label>
|
28 |
+
<comment>Secure EBS Payment Method</comment>
|
29 |
+
<frontend_type>text</frontend_type>
|
30 |
+
<sort_order>256</sort_order>
|
31 |
+
<show_in_default>1</show_in_default>
|
32 |
+
<show_in_website>1</show_in_website>
|
33 |
+
<show_in_store>0</show_in_store>
|
34 |
+
<fields>
|
35 |
+
<active translate="label">
|
36 |
+
<label>Enabled</label>
|
37 |
+
<frontend_type>select</frontend_type>
|
38 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
39 |
+
<sort_order>1</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>0</show_in_store>
|
43 |
+
</active>
|
44 |
+
<title translate="label">
|
45 |
+
<label>Title</label>
|
46 |
+
<frontend_type>text</frontend_type>
|
47 |
+
<sort_order>2</sort_order>
|
48 |
+
<show_in_default>1</show_in_default>
|
49 |
+
<show_in_website>1</show_in_website>
|
50 |
+
<show_in_store>0</show_in_store>
|
51 |
+
</title>
|
52 |
+
<account_id translate="label">
|
53 |
+
<label>Account ID</label>
|
54 |
+
<frontend_type>text</frontend_type>
|
55 |
+
<sort_order>13</sort_order>
|
56 |
+
<show_in_default>1</show_in_default>
|
57 |
+
<show_in_website>1</show_in_website>
|
58 |
+
<show_in_store>1</show_in_store>
|
59 |
+
</account_id>
|
60 |
+
<secret_key translate="label">
|
61 |
+
<label>Secret Key</label>
|
62 |
+
<frontend_type>text</frontend_type>
|
63 |
+
<sort_order>14</sort_order>
|
64 |
+
<show_in_default>1</show_in_default>
|
65 |
+
<show_in_website>1</show_in_website>
|
66 |
+
<show_in_store>1</show_in_store>
|
67 |
+
</secret_key>
|
68 |
+
<mode translate="label">
|
69 |
+
<label>Transaction Mode</label>
|
70 |
+
<frontend_type>select</frontend_type>
|
71 |
+
<source_model>adminhtml/system_config_source_mode</source_model>
|
72 |
+
<sort_order>15</sort_order>
|
73 |
+
<show_in_default>1</show_in_default>
|
74 |
+
<show_in_website>1</show_in_website>
|
75 |
+
<show_in_store>0</show_in_store>
|
76 |
+
</mode>
|
77 |
+
<description translate="label comment">
|
78 |
+
<label>Transaction Description</label>
|
79 |
+
<comment>Order number will be used if left empty</comment>
|
80 |
+
<frontend_type>text</frontend_type>
|
81 |
+
<sort_order>5</sort_order>
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<show_in_store>0</show_in_store>
|
85 |
+
</description>
|
86 |
+
<currency translate="label">
|
87 |
+
<label>Accepted currency</label>
|
88 |
+
<frontend_type>select</frontend_type>
|
89 |
+
<source_model>adminhtml/system_config_source_currency</source_model>
|
90 |
+
<sort_order>6</sort_order>
|
91 |
+
<show_in_default>1</show_in_default>
|
92 |
+
<show_in_website>1</show_in_website>
|
93 |
+
<show_in_store>1</show_in_store>
|
94 |
+
</currency>
|
95 |
+
<language translate="label">
|
96 |
+
<label>Customer Interface language</label>
|
97 |
+
<frontend_type>select</frontend_type>
|
98 |
+
<source_model>secureebs/source_language</source_model>
|
99 |
+
<sort_order>7</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>1</show_in_store>
|
103 |
+
</language>
|
104 |
+
<debug_flag translate="label">
|
105 |
+
<label>Debug</label>
|
106 |
+
<frontend_type>select</frontend_type>
|
107 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
108 |
+
<sort_order>8</sort_order>
|
109 |
+
<show_in_default>1</show_in_default>
|
110 |
+
<show_in_website>1</show_in_website>
|
111 |
+
<show_in_store>0</show_in_store>
|
112 |
+
</debug_flag>
|
113 |
+
<order_status translate="label">
|
114 |
+
<label>New order status</label>
|
115 |
+
<frontend_type>select</frontend_type>
|
116 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
117 |
+
<sort_order>9</sort_order>
|
118 |
+
<show_in_default>1</show_in_default>
|
119 |
+
<show_in_website>1</show_in_website>
|
120 |
+
<show_in_store>0</show_in_store>
|
121 |
+
</order_status>
|
122 |
+
<allowspecific translate="label">
|
123 |
+
<label>Payment from applicable countries</label>
|
124 |
+
<frontend_type>allowspecific</frontend_type>
|
125 |
+
<sort_order>10</sort_order>
|
126 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
127 |
+
<show_in_default>1</show_in_default>
|
128 |
+
<show_in_website>1</show_in_website>
|
129 |
+
<show_in_store>1</show_in_store>
|
130 |
+
</allowspecific>
|
131 |
+
<specificcountry translate="label">
|
132 |
+
<label>Payment from Specific countries</label>
|
133 |
+
<frontend_type>multiselect</frontend_type>
|
134 |
+
<sort_order>11</sort_order>
|
135 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
136 |
+
<show_in_default>1</show_in_default>
|
137 |
+
<show_in_website>1</show_in_website>
|
138 |
+
<show_in_store>1</show_in_store>
|
139 |
+
</specificcountry>
|
140 |
+
<sort_order translate="label">
|
141 |
+
<label>Sort order</label>
|
142 |
+
<frontend_type>text</frontend_type>
|
143 |
+
<sort_order>12</sort_order>
|
144 |
+
<show_in_default>1</show_in_default>
|
145 |
+
<show_in_website>1</show_in_website>
|
146 |
+
<show_in_store>0</show_in_store>
|
147 |
+
</sort_order>
|
148 |
+
</fields>
|
149 |
+
</secureebs_standard>
|
150 |
+
</groups>
|
151 |
+
</payment>
|
152 |
+
</sections>
|
153 |
+
</config>
|
app/code/core/Mage/Secureebs/sql/secureebs_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category Mage
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
/* @var $installer Mage_Secureebs_Model_Mysql4_Setup */
|
24 |
+
|
25 |
+
$installer->startSetup();
|
26 |
+
|
27 |
+
$installer->run("
|
28 |
+
CREATE TABLE `{$this->getTable('secureebs_api_debug')}` (
|
29 |
+
`debug_id` int(10) unsigned NOT NULL auto_increment,
|
30 |
+
`debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
31 |
+
`request_body` text,
|
32 |
+
`response_body` text,
|
33 |
+
PRIMARY KEY (`debug_id`),
|
34 |
+
KEY `debug_at` (`debug_at`)
|
35 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
36 |
+
|
37 |
+
");
|
38 |
+
|
39 |
+
$installer->endSetup();
|
app/design/frontend/base/default/template/Secureebs/form.phtml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category design_default
|
16 |
+
* @package Mage_SecureEbs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<script type="text/javascript">
|
22 |
+
Validation.creditCartTypes.JCB = [new RegExp('^(35[0-9]{14}|(2131|1800)[0-9]{11})$'), new RegExp('^([0-9]{3})?$'), true];
|
23 |
+
Validation.creditCartTypes.DICL = [new RegExp('(^(30)[0-5]\d{11}$)|(^(36)\d{12}$)|(^(38[0-8])\d{11}$)'), new RegExp('^([0-9]{3})?$'), false];
|
24 |
+
Validation.creditCartTypes.ENR = [new RegExp('(^(2014)|^(2149))\d{11}$'), new RegExp('^([0-9]{3})?$'), false];
|
25 |
+
</script>
|
26 |
+
<fieldset class="form-list">
|
27 |
+
<?php $_code=$this->getMethodCode() ?>
|
28 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
29 |
+
<li>
|
30 |
+
<div class="input-box">
|
31 |
+
<label for="<?php echo $_code ?>_cc_owner"><?php echo $this->__('Name on Card') ?></label><br/>
|
32 |
+
<input type="text" title="<?php echo $this->__('Name on Card') ?>" class="input-text" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
|
33 |
+
</div>
|
34 |
+
</li>
|
35 |
+
<li>
|
36 |
+
<div class="input-box">
|
37 |
+
<label for="<?php echo $_code ?>_cc_type"><?php echo $this->__('Credit Card Type') ?> <span class="required">*</span></label><br />
|
38 |
+
<select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
|
39 |
+
<option value="">--<?php echo $this->__('Please Select') ?>--</option>
|
40 |
+
<?php $_ccType = $this->getInfoData('cc_type') ?>
|
41 |
+
<?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
|
42 |
+
<option value="<?php echo $_typeCode ?>" <?php if($_typeCode==$_ccType): ?>selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
43 |
+
<?php endforeach ?>
|
44 |
+
</select>
|
45 |
+
</div>
|
46 |
+
</li>
|
47 |
+
<li>
|
48 |
+
<div class="input-box">
|
49 |
+
<label for="<?php echo $_code ?>_cc_number"><?php echo $this->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
|
50 |
+
<input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
|
51 |
+
</div>
|
52 |
+
</li>
|
53 |
+
<li>
|
54 |
+
<div class="input-box">
|
55 |
+
<label for="<?php echo $_code ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br />
|
56 |
+
<div class="v-fix">
|
57 |
+
<select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
|
58 |
+
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
59 |
+
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
60 |
+
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpMonth): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
|
61 |
+
<?php endforeach ?>
|
62 |
+
</select>
|
63 |
+
</div>
|
64 |
+
<div class="v-fix" style="padding-left:5px;">
|
65 |
+
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
66 |
+
<select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
|
67 |
+
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
68 |
+
<option value="<?php echo $k?$k:'' ?>" <?php if($k==$_ccExpYear): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
|
69 |
+
<?php endforeach ?>
|
70 |
+
</select>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</li>
|
74 |
+
<li>
|
75 |
+
<div class="input-box">
|
76 |
+
<label for="<?php echo $_code ?>_cc_cid"><?php echo $this->__('Card Verification Number') ?> <span class="required">*</span></label><br />
|
77 |
+
<div class="v-fix"><input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" style="width:3em;" value="" /></div>
|
78 |
+
|
79 |
+
<a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
|
80 |
+
</div>
|
81 |
+
</li>
|
82 |
+
</ul>
|
83 |
+
</fieldset>
|
app/design/frontend/base/default/template/Secureebs/info.phtml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category design_default
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php if($_info = $this->getInfo()): ?>
|
22 |
+
<?php echo $this->getMethod()->getTitle() ?><br />
|
23 |
+
<?php echo $this->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br />
|
24 |
+
<?php echo $this->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br />
|
25 |
+
<?php echo $this->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br />
|
26 |
+
<?php echo $this->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>
|
27 |
+
<?php else: ?>
|
28 |
+
|
29 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/Secureebs/standard/failure.phtml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category design_default
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<div class="page-head">
|
22 |
+
<h3><?php echo $this->__('Error occured') ?></h3>
|
23 |
+
</div>
|
24 |
+
<p><?php echo $this->__('There was an error occurred during paying process.') ?></p>
|
app/design/frontend/base/default/template/Secureebs/standard/form.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* @category design_default
|
16 |
+
* @package Mage_Secureebs
|
17 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<fieldset class="form-list">
|
22 |
+
<?php $_code=$this->getMethodCode() ?>
|
23 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
24 |
+
<li>
|
25 |
+
<?php echo $this->__('You will be redirected to Secureebs website when you place an order.') ?>
|
26 |
+
</li>
|
27 |
+
</ul>
|
28 |
+
</fieldset>
|
app/etc/modules/Mage_Secureebs.xml
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
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 |
+
* @category Mage
|
17 |
+
* @package Mage_Secureebs
|
18 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
-->
|
22 |
+
<config>
|
23 |
+
<modules>
|
24 |
+
<Mage_Secureebs>
|
25 |
+
<active>true</active>
|
26 |
+
<codePool>core</codePool>
|
27 |
+
<depends>
|
28 |
+
<Mage_Payment/>
|
29 |
+
</depends>
|
30 |
+
</Mage_Secureebs>
|
31 |
+
</modules>
|
32 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Mage_Secureebs</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Secureebs</summary>
|
10 |
+
<description>Secureebs</description>
|
11 |
+
<notes>first release</notes>
|
12 |
+
<authors><author><name>Easy Commerce</name><user>sundeepdaga</user><email>sundeep@easycommerce.in</email></author></authors>
|
13 |
+
<date>2011-10-06</date>
|
14 |
+
<time>05:33:28</time>
|
15 |
+
<contents><target name="magecore"><dir name="Mage"><dir name="Secureebs"><dir name="Block"><dir name="Standard"><file name="Failure.php" hash="f786266328004b0afa2ff80609732c58"/><file name="Form.php" hash="41be207aa04754acf31c3a7b6bdd7c59"/><file name="Redirect.php" hash="f7188ffc2b813166466e2860bcd1d610"/></dir></dir><dir name="Helper"><file name="Data.php" hash="024adb655176bfaf14b7273403157dfc"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="14c27338b6fbfb8d1a73bdd4134b806c"/></dir><file name="Config.php" hash="e0aafa2b279e933e769de8573ed5b24a"/><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="cb83acf4828fc3e2b2c91cf1c8b31fb1"/></dir><file name="Debug.php" hash="ddc878f0735d9375addd5d69afcb785f"/></dir><file name="Setup.php" hash="7dbf306a1bb7d9c5812a7190988d3116"/></dir><dir name="Source"><file name="Language.php" hash="92aec3b98ea22746a65b85b79676053c"/></dir><file name="Standard.php" hash="42942f634205ad87e68f3e75d4ec3ee3"/></dir><dir name="controllers"><file name="Rc43.php" hash="1c6699e6b5884ecf9d538a3fd7eff329"/><file name="StandardController.php" hash="75d13fa59aa1ce86792b6f6b0869e04d"/></dir><dir name="etc"><file name="config.xml" hash="8460f960e81bcc03fd99ceec737b2267"/><file name="system.xml" hash="29a713115b50fa2456b69c398ddf4ee7"/></dir><dir name="sql"><dir name="secureebs_setup"><file name="mysql4-install-0.1.0.php" hash="1086bdc868b2ea322467b60774607463"/></dir></dir></dir><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Mode.php" hash="145c64a801facaa84899bea4e8431af4"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Secureebs.xml " hash="d416743fc618c712da7700c3dacbc99f"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="Secureebs"><file name="form.phtml" hash="7baefcfbbff4680c4159b282ecabe625"/><file name="info.phtml" hash="4d40d92a271eab2811762994f7403f0a"/><dir name="standard"><file name="failure.phtml" hash="503e878638080195c60c5868e313a1a5"/><file name="form.phtml" hash="f4ea063f33386b1e4f1c7dcc2cb3834f"/></dir></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|