1

The rest of my module is working correctly. This is for a custom payment method. I have the module enabled. I can see the custom payment method in System > Configuration > Payment Methods as well as in the checkout. I keep getting a 404 when trying to access the page though:

site.com/store/heartland
site.com/store/heartland/index
site.com/store/heartland/index/hello

Module Directory:

Company/Heartland$ ls
controllers/
etc/
Helper/
Model/
sql/

Controller Directory:

Company/Heartland$ ls controllers/
IndexController.php

config.xml:

<?xml version="1.0"?>
<config>
    <modules>
            <Company_Heartland>
                    <version>0.1.0</version>
            </Company_Heartland>
    </modules>
    <global>
            <models>
                    <heartland>
                            <class>Company_Heartland_Model</class>
                    </heartland>
            </models>
        <helpers>
          <heartland>
            <class>Company_Heartland_Helper</class>
          </heartland>
        </helpers>
    </global>
    <default>
            <payment>
                    <heartland>
                            <sort_order>0</sort_order>
                            <active>0</active>
                            <model>heartland/paymentMethod</model>
                            <order_status>pending</order_status>
                            <title>Credit Card (Heartland)</title>
                            <cctypes>AE,VI,MC,DI</cctypes>
                            <payment_action>sale</payment_action>
                            <allowspecific>0</allowspecific>
                    </heartland>
            </payment>
    </default>
    <frontend>
            <routers>
                    <heartland>
                            <use>standard</use>
                            <args>
                                    <module>Company_Heartland</module>
                                    <frontname>heartland</frontname>
                            </args>
                    </heartland>
            </routers>
    </frontend>
</config>

IndexController.php

<?php

class Company_Heartland_IndexController extends Mage_Core_Controller_Front_Action {

    // The redirect action is triggered when someone places an order
    public function helloAction() {

            echo "<h1>Hello World</h1>";
    }

}

?>
3

The section that is a problem is in you config.xml when defining the router. This is because frontName is case sensitive and so should be as follows:

<frontName>heartland</frontName>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.