我们目前正在使用第三方单页checkout.Problem是我们使用2checkout付款方式下订单时它不会重定向到网关网站,它只是重定向到我" www.mydomain.com/tco/redirect /&# 34 ;. 我想
public function indexAction() {
$this->loadLayout();
$block = $this->getLayout()->createBlock('tco/redirect');
$this->getLayout()->getBlock('content')->append($block);
$this->renderLayout();
}
public function getOrderPlaceRedirectUrl() {
return Mage::getUrl('tco/redirect');
}
indexAction方法无法正常工作。但是,当我们停用第三方单页结帐并激活magento默认操作时,其工作正常。
答案 0 :(得分:0)
您只需尝试使用以下功能
public function getOrderPlaceRedirectUrl() {
$this->_redirect('tco/redirect');
}
答案 1 :(得分:0)
<modules>
<Craig_Tco>
<version>2.4.2</version>
</Craig_Tco>
</modules>
<global>
<models>
<tco>
<class>Craig_Tco_Model</class>
</tco>
</models>
<helpers>
<tco>
<class>Craig_Tco_Helper</class>
</tco>
</helpers>
<blocks>
<tco>
<class>Craig_Tco_Block</class>
</tco>
</blocks>
<resources>
<tco_setup>
<setup>
<module>Craig_Tco</module>
</setup>
<connection>
<use>directory_setup</use>
</connection>
</tco_setup>
<tco_write>
<connection>
<use>local_write</use>
</connection>
</tco_write>
<tco_read>
<connection>
<use>local_read</use>
</connection>
</tco_read>
</resources>
<events>
<controller_action_postdispatch_checkout_onepage_saveOrder>
<observers>
<output_tco_redirect>
<type>singleton</type>
<class>Craig_Tco_Model_Observer</class>
<method>output_tco_redirect</method>
</output_tco_redirect>
</observers>
</controller_action_postdispatch_checkout_onepage_saveOrder>
<sales_order_creditmemo_refund>
<observers>
<issue_creditmemo_refund>
<type>singleton</type>
<class>Craig_Tco_Model_Observer</class>
<method>issue_creditmemo_refund</method>
</issue_creditmemo_refund>
</observers>
</sales_order_creditmemo_refund>
</events>
</global>
<frontend>
<layout>
<updates>
<tco>
<file>tco.xml</file>
</tco>
</updates>
</layout>
<routers>
<tco>
<use>standard</use>
<args>
<module>Craig_Tco</module>
<frontName>tco</frontName>
</args>
</tco>
</routers>
<secure_url>
<tco_redirect>/tco/redirect/</tco_redirect>
</secure_url>
</frontend>
<default>
<payment>
<tco>
<active>1</active>
<submit_url>1</submit_url>
<model>tco/checkout</model>
<title>2Checkout (Visa, MasterCard, Amex, Discover, JCB, Diners Club, Debit Card, PayPal)</title>
<sid>Enter 2Checkout Account Number</sid>
<secret_word>Enter your Secret Word</secret_word>
<submit_url>1</submit_url>
<demo>0</demo>
<sort_order>1</sort_order>
</tco>
</payment>
</default>