<p>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.</p>

<p>The name of that param can be customized using the <a href="http://buildwithcraft.com/docs/config-settings#tokenParam" rel="nofollow">tokenParam</a> config setting, but you should probably just have PayPal use a different query string param if you can.</p>

CC BY-SA 3.0
2014-09-02T05:54:10.480Z
Absolutely Brilliant @Brandon Kelly. Thank you. I have decided to overwrite token param in config for now. Cheers mate
Silvanus Matiku
CC BY-SA 3.0
2014-09-02T05:06:09.287Z
2014-09-02T05:06:09.287Z
Brandon Kelly
<p>I am Craft newbie, and am trying to use PayPal express checkout but am stuck on a confirmation route.</p>

<p>How do I register a route like this:</p>

<pre><code>localhost:8888/app/confirm?token=EC-5UA33446UB5625646&amp;PayerID=8RB74GZ8ASWGQ 
</code></pre>

<p>What I have done so far:</p>

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

<pre><code>public function registerSiteRoutes()
{
    return array(
        'app/confirm' =&gt; array('action' =&gt; 'app/confirm')
    );
}
</code></pre>

<p>Any help will be appreciated.</p>

CC BY-SA 3.0
2014-09-01T02:36:52.933Z
How are you registering the confirmation route in the plugin?  Can you share some sample code?
Brad Bell
CC BY-SA 3.0
2014-09-01T04:24:38.850Z
`public function registerSiteRoutes()
 {
     return array(
     'paypaloots/confirm' => array('action' => 'paypaloots/confirm'),
     );
 }`
Silvanus Matiku
CC BY-SA 3.0
2014-09-01T05:22:53.607Z
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
<routes>
Craft routing with extra attributes
# Craft routing with extra attributes

(Asked by: username_0 on 2014-09-01)

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:
localhost:8888/app/confirm?token=EC-5UA33446UB5625646&PayerID=8RB74GZ8ASWGQ 

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.

**Tags:** routes
> **Comments:**
> **username_1**: How are you registering the confirmation route in the plugin?  Can you share some sample code?  
> **username_0**: `public function registerSiteRoutes()  {      return array(      'paypaloots/confirm' => array('action' => 'paypaloots/confirm'),      );  }`  
> **username_2**: 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.  

---

## 1 answers

### Answer by username_3 on 2014-09-02. Score: 4 | Accepted answer

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](http://buildwithcraft.com/docs/config-settings#tokenParam) config setting, but you should probably just have PayPal use a different query string param if you can.

> **Comments:**
> **username_0**: Absolutely Brilliant @Brandon Kelly. Thank you. I have decided to overwrite token param in config for now. Cheers mate  

---

