I am Craft newbie, and am trying to use PayPal express checkout but am stuck on a confirmation route.

How do I register a route like this:


What I have done so far:

Registered route confirm on the plugin but when PayPal adds the token and payerId, Craft doesn't understand the route anymore.

public function registerSiteRoutes()
    return array(
        'app/confirm' => array('action' => 'app/confirm')

Any help will be appreciated.

  • How are you registering the confirmation route in the plugin? Can you share some sample code?
    – Brad Bell
    Commented Sep 1, 2014 at 2:36
  • public function registerSiteRoutes() { return array( 'paypaloots/confirm' => array('action' => 'paypaloots/confirm'), ); } Commented Sep 1, 2014 at 4:24
  • Hi Silvanus, welcome to Craft Stack Exchange! Please move your code example into the original question to make it much easier to read. You can edit the original question at any time to add new information which may be helpful in finding an answer.
    – Lindsey D
    Commented Sep 1, 2014 at 5:22

1 Answer 1


Craft actually has its own built-in support for tokenized requests, which is activated if there's a "token" param. if that param is set, Craft will refer to the craft_tokens table for instructions in how to route the request, ignoring the normal routing steps.

The name of that param can be customized using the tokenParam config setting, but you should probably just have PayPal use a different query string param if you can.

  • Absolutely Brilliant @Brandon Kelly. Thank you. I have decided to overwrite token param in config for now. Cheers mate Commented Sep 2, 2014 at 5:54

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.