Jump to content

Edit History

zion

zion

Hello, I have managed to update an order status by adding an entry to the status history.

The code that I used is:
 

$webService = webService::webServiceTienda($tienda);
        try{
            $opt = [
                'resource' => 'order_histories?schema=blank'
            ];
            $xml = $webService->get($opt);
            $resources = $xml->order_history->children();

            $resources->id_order = intval($idPedido);
            $resources->id_order_state = intval($id_estado);
            $resources->id_employee = 1;

            $opt = [
                'resource' => 'order_histories',
                'postXml' => $xml->asXML(),
            ];
            
            $createdXml = $webService->add($opt);

     }catch (PrestaShopWebserviceException $e){
        webService::controlErroresPedidos($e, $tienda);
     }

 


I have 3 stores connected in the program and two of them throw me the error 403
Is it supposed to be a server problem? Does the hosting have to fix it?
The funny thing is that two of these websites are on the same hosting, different server but same hosting.
 

HTTP / 1.1 403 Forbidden
<p> Access to this resource on the server is denied! </p>


EDIT:
I have spoken with my host and the problem was with the PHP security module.
They have added some rule and now it works perfect

zion

zion

Hello, I have managed to update an order status by adding an entry to the status history.

The code that I used is:
 

$webService = webService::webServiceTienda($tienda);
        try{
            $opt = [
                'resource' => 'order_histories?schema=blank'
            ];
            $xml = $webService->get($opt);
            $resources = $xml->order_history->children();

            $resources->id_order = intval($idPedido);
            $resources->id_order_state = intval($id_estado);
            $resources->id_employee = 1;

            $opt = [
                'resource' => 'order_histories',
                'postXml' => $xml->asXML(),
            ];
            
            $createdXml = $webService->add($opt);

     }catch (PrestaShopWebserviceException $e){
        webService::controlErroresPedidos($e, $tienda);
     }

 


I have 3 stores connected in the program and two of them throw me the error 403
Is it supposed to be a server problem? Does the hosting have to fix it?
The funny thing is that two of these websites are on the same hosting, different server but same hosting.
 

HTTP / 1.1 403 Forbidden
<p> Access to this resource on the server is denied! </p>

 

×
×
  • Create New...