Hi! I have an app made in php and it no longer allows me to fulfill orders, this is giving me a 404 error.
this is what i have
function fulfill_order_by_id($order_id,$tracking_number){
$url=shopi_api_url().'orders/'.$order_id.'/fulfillments.json';
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', $url,['form_params' => [
'fulfillment'=> [
'location_id' =>'63110676671',
'notify_customer' => 'true',
'tracking_company' => 'Other',
'tracking_url' => 'https://www.starken.cl/seguimiento',
'tracking_number' => $tracking_number ]]]);
$json_body = json_decode($response->getBody(),true);
return $json_body;
}
i try to update everyting cause i create this app on 2020 i update the api to 2023-07 and i make this.
function fulfill_order_by_id($order_id,$tracking_number){
$config=connection();
$shopify = new PHPShopify\ShopifySDK($config);
//echo $order_id;
try{
$fulfillment = $shopify->Fulfillment();
/*$fulfillment->update_tracking([], // Params
["fulfillment" => [, "tracking_info" => ["company" => "Other", */
$fulfillment->line_items_by_fulfillment_order = [
"location_id"=> "63110676671",
"order_id"=> $order_id,
"notify_customer" => true
];
$fulfillment->tracking_info = [
"company" => "Other",
"number" => $tracking_number,
"url" => "https://www.starken.cl/seguimiento"
];
echo"<pre>";
print_r($fulfillment);
echo"</pre>";
$fulfillment->save(
true, // Update Object
);
}catch(Exception $e) {
echo 'Caught exception ' . $e->getMessage(), "\n";
}
}
but its giving me this error Caught exception No action named save is defined for Fulfillment
please help
Hi! I have an app made in php and it no longer allows me to fulfill orders, this is giving me a 404 error.
this is what i have
i try to update everyting cause i create this app on 2020 i update the api to 2023-07 and i make this.
but its giving me this error Caught exception No action named save is defined for Fulfillment
please help