I'm having terrible trouble getting an updated EE2.7.2 / CartThrob 2.4 MSM site to integrate with Sagepay (Europe Offsite). Every time I try to go out to sagepay from the checkout page, I'm returned to my order_complete template with an error:

3011 : The NotificationURL format is incorrect

I think I've configured extload.php correctly (when I request it in the browser, I don't get any errors, and I've set the system path absolutely).

I really need to see what notification url is being generated (if any) so that I can debug from there, but I don't know if the payment gateway plugin is invoking even extload.php or not. The payment notification function references it (function extload($post)), so I was working on the assumption that it was using it, but I don't know how to confirm.

I've tried using LiveHTTPHeaders to watch what goes out, but it's not very helpful. I can't see any mention of notificationurl.

So my question is in the title - how can I tell if extload is being invoked or not (is it simply that I'm getting an error from sage and so it must be?) and if it is being invoked, why is my notificationURL malformed/incorrect?

In my cartthrob form I have return="customer/checkout/order_complete" - which is where I'm taken to straight after submitting my checkout form. This is where the error is displayed - so I must be sending something out to sage?

EDIT! One MSM site (site_id 1) is going through to sage The primary site goes through to the sage server, the second site gives the error. They both use the same payment gateway plugin, the checkout and extload.php code is identical for both (aside from the msm settings in each extload.php, which is all good). Even the POST data that goes out is the same (as far as I can see - it's all structured in the same way and all of the fields are present). So now I'm really wondering what it can be! It's got to be something simple that I've missed, but everything looks right...


2 Answers 2


Dorothy dorothy has answered my question in another post:

Take a look in your system folder \expressionengine\third_party\cartthrob\payment_gateways\Cartthrob_sage_s.php file

Somewhere at around line 172 you will see that the $post_array includes the NotificationURL.

Look for this line:

'NotificationURL' => $this->response_script(ucfirst(get_class($this))),

if you add a die statement like this:


You can see what the URL is and that should give you an idea of what is going wrong. The Notification URL should be to your extload.php file in your /themes/third_party/cartthrob/lib/ folder


I know that using another payment gateway (Realex) you have to tell them the URL to return to after a transaction - this is the full url of the Extload script which will be something like http://yourdomain.com/themes/third_party/cartthrob/lib/extload.php/realex_redirect

This tells the gateway where to post its response so your system can update orders etc.

The return urls set in your Cartthrob form handle the redirect for the user after a transaction but don't impact where the gateway response gets sent.

From the error you're showing, my best guess is that SagePay is getting either no response, or not the expected response when it tries to notify your system of the transaction.

You may find that you would need to set that up within your SagePay account - it's normal for it to be done this way rather than specify it in your post data for security reasons.

  • I don't need to add a url at the sage end; I've added the IP addresses of the site and my local testing site to sage to allow transaction traffic from them; there's nothing else to configure on the sage side of things. So unfortunately my question is still - how can I tell what notificationURL value is being supplied to Sage, as it's clearly not right! Nov 22, 2013 at 12:23
  • Have you seen this thread cartthrob.com/forums/viewthread/4774/P30 ?
    – foamcow
    Nov 22, 2013 at 12:34
  • Unfortunately yes, I've been searching around this issue for days! :/ Thank you though! Nov 22, 2013 at 12:44

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.