Version Notes
Add additional data sanitation
Updated to work with 1.6.0.0
Download this release
Release Info
Developer | Magento Core Team |
Extension | Craig_Tco |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
app/code/local/Craig/Tco/Block/Redirect.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 |
+
* @category Craig Christenson
|
17 |
+
* @package Tco (2Checkout.com)
|
18 |
+
* @copyright Copyright (c) 2010 Craig Christenson
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
class Craig_Tco_Block_Redirect extends Mage_Core_Block_Abstract
|
25 |
+
{
|
26 |
+
protected function _toHtml()
|
27 |
+
{
|
28 |
+
$tco = Mage::getModel('tco/checkout');
|
29 |
+
|
30 |
+
$form = new Varien_Data_Form();
|
31 |
+
$form->setAction($tco->getUrl())
|
32 |
+
->setId('pay')
|
33 |
+
->setName('pay')
|
34 |
+
->setMethod('POST')
|
35 |
+
->setUseContainer(true);
|
36 |
+
$tco->getFormFields();
|
37 |
+
foreach ($tco->getFormFields() as $field=>$value) {
|
38 |
+
$form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value, 'size'=>200));
|
39 |
+
}
|
40 |
+
|
41 |
+
$html = '<html><body>';
|
42 |
+
$html.= $this->__('You will be redirected to 2Checkout in a few seconds.');
|
43 |
+
$html.= $form->toHtml();
|
44 |
+
$html.= '<br>';
|
45 |
+
$html.= '<script type="text/javascript">document.getElementById("pay").submit();</script>';
|
46 |
+
$html.= '</body></html>';
|
47 |
+
|
48 |
+
|
49 |
+
return $html;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
?>
|
app/code/local/Craig/Tco/etc/config.xml
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
<config>
|
25 |
<modules>
|
26 |
<Craig_Tco>
|
27 |
-
<version>2.0.
|
28 |
</Craig_Tco>
|
29 |
</modules>
|
30 |
<global>
|
24 |
<config>
|
25 |
<modules>
|
26 |
<Craig_Tco>
|
27 |
+
<version>2.0.1</version>
|
28 |
</Craig_Tco>
|
29 |
</modules>
|
30 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Craig_Tco</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
|
7 |
<channel>community</channel>
|
@@ -12,8 +12,8 @@
|
|
12 |
Updated to work with 1.6.0.0</notes>
|
13 |
<authors><author><name>Craig Christenson</name><user>auto-converted</user><email>christensoncraig@gmail.com</email></author></authors>
|
14 |
<date>2011-07-20</date>
|
15 |
-
<time>
|
16 |
-
<contents><target name="magelocal"><dir name="Craig"><dir name="Tco"><dir name="Block"><file name="Form.php" hash="b552018543f57090c42784d939004dd4"/><file name="Info.php" hash="2e42f56143a93944240faa7dfca3e183"/><file name="Redirect.php" hash=""/></dir><dir name="controllers"><file name="NotificationController.php" hash="ed3053c683eeb64f71d675564e30e5bb"/><file name="RedirectController.php" hash="6db70f5247fc921a07de2767cc8a5750"/></dir><dir name="Model"><file name="Checkout.php" hash="f38834dd1a3025d0ee1e85dbaf6ea1dc"/></dir><dir name="Helper"><file name="Data.php" hash="de7680011db7d6821c1f68d70a8fa684"/></dir><dir name="etc"><file name="config.xml" hash="
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Craig_Tco</name>
|
4 |
+
<version>2.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
|
7 |
<channel>community</channel>
|
12 |
Updated to work with 1.6.0.0</notes>
|
13 |
<authors><author><name>Craig Christenson</name><user>auto-converted</user><email>christensoncraig@gmail.com</email></author></authors>
|
14 |
<date>2011-07-20</date>
|
15 |
+
<time>20:22:56</time>
|
16 |
+
<contents><target name="magelocal"><dir name="Craig"><dir name="Tco"><dir name="Block"><file name="Form.php" hash="b552018543f57090c42784d939004dd4"/><file name="Info.php" hash="2e42f56143a93944240faa7dfca3e183"/><file name="Redirect.php" hash="d3766dbf0c0a206c8630cd1e8de4927f"/></dir><dir name="controllers"><file name="NotificationController.php" hash="ed3053c683eeb64f71d675564e30e5bb"/><file name="RedirectController.php" hash="6db70f5247fc921a07de2767cc8a5750"/></dir><dir name="Model"><file name="Checkout.php" hash="f38834dd1a3025d0ee1e85dbaf6ea1dc"/></dir><dir name="Helper"><file name="Data.php" hash="de7680011db7d6821c1f68d70a8fa684"/></dir><dir name="etc"><file name="config.xml" hash="8795e0e9dd00d519a4495b7ac350d25e"/><file name="system.xml" hash="d76189971008c4ba88e7a45864b7d60c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="tco"><file name="form.phtml" hash="08ae585e158550d0a5dccbed3d37758d"/><file name="info.phtml" hash="9064c9a14c49105f6ef69222d50dc675"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Craig_Tco.xml" hash="4a6e92678d9b2a310af880d35a4c355f"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|