Reputation: 2445
I am trying to build custom payment method. It should work as paypal, when user cliks on "Place order" it should redirect him on external gatewey. The trick is that it has to send POST data.
To create module I folowed severeal tutorials, but mostly this one Incho
Model/Standard.php
public function getOrderPlaceRedirectUrl()
{
Mage::Log('Called ' . __METHOD__);
return Mage::getUrl('payment/Standard/Redirect', array('_secure' => true));
}
After i click on procedure it redirects me on
> http://192.168.0.15/magento/index.php/payment/Standard/Redirect
and I get 404 error. In log file i can see that it hitted method getOrderPlaceRedirectUrl, bu it didn't come to redirectAction. Can anybody help me with this issue, I am newbie to magento.
controllers/StandardController.php
public function redirectAction()
{
Mage::Log('Called ' . __METHOD__);
//do something
}
Block/Standard/Redirect.php
protected function _toHtml()
{
Mage::Log('Called ' . __METHOD__);
//do POST
}
Upvotes: 0
Views: 3190
Reputation: 2495
Phtml file should not be the probleme here. In the tutorial the controller is registered like this:
<frontend>
<routers>
<mycheckout>
<use>standard</use>
<args>
<module>Inchoo_Mycheckout</module>
<frontname>customcard</frontname>
</args>
</mycheckout>
</routers>
</frontend>
Also make 'customcard/standard/redirect'
lowercase. If you need further support and changed module and classnames, add them to your question.
Upvotes: 1