Version Notes
Fixed Redirect Blank Page in 1.5
Download this release
Release Info
Developer | Craig Christenson |
Extension | Craig_Tco |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.1.5
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>1.1.
|
28 |
</Craig_Tco>
|
29 |
</modules>
|
30 |
<global>
|
24 |
<config>
|
25 |
<modules>
|
26 |
<Craig_Tco>
|
27 |
+
<version>1.1.5</version>
|
28 |
</Craig_Tco>
|
29 |
</modules>
|
30 |
<global>
|
package.xml
CHANGED
@@ -1,20 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Craig_Tco</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>2Checkout Payment Extension - Maintained by 2Checkout</summary>
|
10 |
<description>2Checkout Payment Extension - Maintained by 2Checkout</description>
|
11 |
-
<notes>
|
12 |
-
Updated to Support Header Redirect in 1.5
|
13 |
-
Added Demo Testing Feature</notes>
|
14 |
<authors><author><name>Craig Christenson</name><user>undeadzed</user><email>christensoncraig@gmail.com</email></author></authors>
|
15 |
<date>2011-03-10</date>
|
16 |
-
<time>02:
|
17 |
-
<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
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name></name><channel>connect.magentocommerce.com/core</channel><min></min><max></max></package></required></dependencies>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Craig_Tco</name>
|
4 |
+
<version>1.1.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>2Checkout Payment Extension - Maintained by 2Checkout</summary>
|
10 |
<description>2Checkout Payment Extension - Maintained by 2Checkout</description>
|
11 |
+
<notes>Fixed Redirect Blank Page in 1.5</notes>
|
|
|
|
|
12 |
<authors><author><name>Craig Christenson</name><user>undeadzed</user><email>christensoncraig@gmail.com</email></author></authors>
|
13 |
<date>2011-03-10</date>
|
14 |
+
<time>02:43:56</time>
|
15 |
+
<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="1ca96f3dc5a4bfadc1c82dffe84ef887"/><file name="RedirectController.php" hash="c7bf19340a3f90c2f42b69a85d084a59"/></dir><dir name="etc"><file name="config.xml" hash="7c23d271ab0ec2f836c0cb203caf3029"/><file name="system.xml" hash="d76189971008c4ba88e7a45864b7d60c"/></dir><dir name="Helper"><file name="Data.php" hash="de7680011db7d6821c1f68d70a8fa684"/></dir><dir name="Model"><file name="Checkout.php" hash="e80f72724a3d2e4cfc2a17d56af79963"/></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="tco"><file name="form.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="info.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Craig_Tco.xml" hash="4a6e92678d9b2a310af880d35a4c355f"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name></name><channel>connect.magentocommerce.com/core</channel><min></min><max></max></package></required></dependencies>
|
18 |
</package>
|