我为asurepay定制了付款门户。这就像是paypal标准支付的简称。在我的订单,它将重定向到我的模块的重定向页面,这是问题。它给了我一个404页面。magento定制门户付款重定向是404
这是我的文件结构。 (如果你需要学习)
- app/
- code/
- local/
- Asurepay/
- Custompay/
- Model/
- Asure.php
- Block/
- Asure/
-Redirect.php
- Form.php
- Info.php
- etc/
- config.xml
- system.xml
- design/
- adminhtml/
- ......
- frontend/
- default/
- default/
- template/
- custompay/
- asurepay/
- redirect.phtml
- form.phtml
- etc/
- modules/
- Asurepay_Custompay.xml
这里是我的模型/重定向的Asure代码:
public function getOrderPlaceRedirectUrl() {
return Mage::getUrl('custompay/asurepay/redirect', array('_secure' => true));
}
这里是我的config.xml文件的要求
<config>
<modules>
<Asurepay_Custompay>
<version>0.1.0</version>
</Asurepay_Custompay>
</modules>
<global>
<blocks>
<custompay>
<class>Asurepay_Custompay_Block</class>
</custompay>
</blocks>
<models>
<custompay>
<class>Asurepay_Custompay_Model</class>
</custompay>
</models>
<resources>
<custompay_setup>
<setup>
<module>Asurepay_Custompay</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</custompay_setup>
<custompay_write>
<connection>
<use>core_write</use>
</connection>
</custompay_write>
<custompay_read>
<connection>
<use>core_read</use>
</connection>
</custompay_read>
</resources>
</global>
<default>
<payment>
<custompay>
<active>1</active>
<model>custompay/asure</model>
<order_status>pending</order_status>
<title>AsurePay</title>
<gateurl>https://www.paymentUrl.com/payment/</gateurl>
<successurl>{{base_url}}</successurl>
<redimsg>You will be redirected to the payment website when you place an order.</redimsg>
<allowspecific>0</allowspecific>
</custompay>
</payment>
</default>
</config>
显然重定向URL是:
www.mydomain.com/custompay/asurepay/redirect/
此网址GIV给我一个404页面。
我如何告诉magento创建一个重定向页面,所以它不会是404或我怎样才能通过控制器使www.mydomain.com/custompay/asurepred/redirect/页。
问我是否需要更多信息。 :) 非常感谢。
杆限定在config.xml中的内容,让我们看你如何定义前端路线 – 2011-04-21 10:27:43
@Anton S:我发布了你的请求。感谢您的回复 – Jorge 2011-04-21 14:16:09