Jump to content

prestashop api problem


Recommended Posts

Hello everyone.


Have a problem with the api.


had been using this function for a long time now and suddenly it stopped working. It's a simple api get call to check if an order has been made and produce a code for the client to activate their virtual product.


this is the api call, on our website, that returns the correct order when accessed through the browser.



this is  the function that is returning null:



    $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
    $opts['url']= $url;
    $xml = $webService->get($opts);
    return $xml;
catch (PrestaShopWebserviceException $e)
        $trace = $e->getTrace();
        if ($trace[0]['args'][0] == 404) echo 'Bad ID';
        else if ($trace[0]['args'][0] == 401) echo 'Bad auth key';
        else echo 'Other error pprestashop webservice exception';  //this is the error that it is throwing
It's really strange because it started not working suddenly and without me touching anything except maybe emptying cache and/or recopiling prestashop...
if anyone could help with any advise it would make my day!
thanks in advance!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...