Jump to content

Web Service - Add Tax - HTTP status of 400. That means: Bad Request.


Recommended Posts

I've tried everything, can anyone help me?

 

$xml = $webService->get(array('url' => 'http://MYURL/api/taxes?schema=blank'));
 
$resources = $xml->children()->children();
 
$resources->rate = 9.99;
$resources->name = 'test';

 

 
 
 try{
        $opt = array('resource' => 'taxes');
        echo $opt['postXml'] = $xml->asXML();
        $xml = $webService->add($opt);
    }
    catch(PrestaShopWebserviceException $ex)
    {
        echo $ex->getMessage();
    }
Edited by Mark Morton (see edit history)
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...