PayPal Express not redirecting back to Craft Commerce I have entered API Username, Password and Signature from PayPal and added 'tokenParam' => 'craftToken' in Craft config and yet when I try to make a payment using PayPal Express I get the following....

https://www.site.com/index.php/actions/commerce/payments/completePayment?commerceTransactionId=114&amp;commerceTransactionHash=0ec5451ed35b360311214dfa75aee88f&amp;token=EC-9GX1527947961953D&amp;PayerID=RFN3LXKUP6SVQ

With the following error:  The requested URL was not found on this server.

Any suggestions on what I have missed.

Here is my craft/config/general.php file.

$domain = 'www.site.com';

if($_SERVER["HTTPS"] != "on")
{
    header("Location: https://" . $domain . $_SERVER["REQUEST_URI"]); exit(); 
}

define('URI_SCHEME',  ( isset($_SERVER['HTTPS'] ) ) ? "https://" : "http://" );
define('SITE_URL',    URI_SCHEME . $_SERVER['SERVER_NAME'] . '/');
define('BASEPATH',    realpath(CRAFT_BASE_PATH . '/../') . '/');

return array(
    '*' =&gt; array(
            'siteUrl' =&gt; SITE_URL,
            'environmentVariables' =&gt; array(
            'siteUrl'  =&gt; SITE_URL,
            'basePath' =&gt; BASEPATH,
            'defaultImageQuality' =&gt; 60,
            'omitScriptNameInUrls' =&gt; true,
            'tokenParam' =&gt; 't',
        ),
    ),
);


FORM

{% if cart.paymentMethodId %}

    &lt;form method="POST" class="form-horizontal" id="paymentForm"&gt;

        &lt;input type="hidden" name="action" value="commerce/payments/pay"/&gt;
        &lt;input type="hidden" name="redirect" value="/shop/customer/order?number={number}"/&gt;
        &lt;input type="hidden" name="cancelUrl" value="/shop/checkout/payment"/&gt;

        {{ getCsrfInput() }}
What's the output in your templates of:

{{ craft.config.tokenParam }}


If it isn't t suspect your config is not setting the tokenParam for some reason.

Can you test with a stripped out general.php with only hard-coded values (No multi-environment config, or if($_SERVER ... checks) 

return array(
    'tokenParam' =&gt; 'myCraftToken'
    // ..other hard coded settings
);