[英]magento custom payment method redirect
我正在尝试建立自定义付款方式。 它应该像贝宝一样工作,当用户单击“下订单”时,应该将其重定向到外部网关。 诀窍是它必须发送POST数据。
为了创建模块,我遵循了严格的教程,但是大部分是Incho
型号/Standard.php
public function getOrderPlaceRedirectUrl()
{
Mage::Log('Called ' . __METHOD__);
return Mage::getUrl('payment/Standard/Redirect', array('_secure' => true));
}
在我单击过程后,它将重定向到
> http://192.168.0.15/magento/index.php/payment/Standard/Redirect
我得到404错误。 在日志文件中,我可以看到它命中了getOrderPlaceRedirectUrl方法,但它没有进入redirectAction。 任何人都可以帮助我解决这个问题,我是magento的新手。
controllers / StandardController.php
public function redirectAction()
{
Mage::Log('Called ' . __METHOD__);
//do something
}
块/标准/Redirect.php
protected function _toHtml()
{
Mage::Log('Called ' . __METHOD__);
//do POST
}
Phtml文件不应该是这里的问题。 在本教程中,控制器的注册方式如下:
<frontend>
<routers>
<mycheckout>
<use>standard</use>
<args>
<module>Inchoo_Mycheckout</module>
<frontname>customcard</frontname>
</args>
</mycheckout>
</routers>
</frontend>
还可以使'customcard/standard/redirect'
小写。 如果您需要进一步的支持并更改了模块和类名,请将它们添加到您的问题中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.