I tried to create a custom payment gateway by creating a custom module based on Paypal module, specically Paypal Express Checkout.

I was able to replicate the route for controller actions: Start, Return, Cancel, and PlaceHolder. I tried to create my own controller action (let's say "NotificationHandler") by copy the Start action, rename the class name, and remove everything in execute() and put echo "hello world";. For some reason, I ran into some weird issue where it expects me to have the first letter of the action to be capital letter (..\ {routeID}\ {controllername}\ Notificationhandler). The site will throw error 404 if I put in the lower case (..\ {routeID}\ {controllername}\ notificationhandler).

Here are some follow up questions:

  1. Is there some config file that determine the exact case of the controller action URL?
  2. Why is it that the ReturnAction use the URL ...{routeId}{controllername}\return instead of ...{routeId}{controllername}\returnaction

Thank you,

  • 1
    your 2nd question answer is here magento.stackexchange.com/a/124416/36463 Commented Sep 14, 2016 at 13:13
  • Interesting. Thank you for sharing the post. Any idea regarding the action route require to be upper case on the first letter or else it throws 404?
    – frostshoxx
    Commented Sep 14, 2016 at 13:16
  • 1
    I hope you can declare controller class Notificationhandler.php not notificationhandler.php. if not please change. show your controller may be it is helpful to debug Commented Sep 14, 2016 at 13:27
  • Yes, it's Notificationhandler.php, the class name is also Notificationhandler. My confusion is that why is it that I have Start.php with class name Start and I was able to access the controller action via ... {route ID} \ {controller name} \start and not getting 404 error (I can also use ... {route ID} \ {controller name}\Start as well).
    – frostshoxx
    Commented Sep 14, 2016 at 13:30
  • 1
    check namespace and class name in Notificationhandler.php. please attach controller code in your question and show your module tree structure. Commented Sep 14, 2016 at 13:51

1 Answer 1


After I upgrade Magento to version 2.1.1, the issue seems to go away. I was able to access the URL for the action in both upper and lowercase for the first letter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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