We are using laravel to send our orders to and from our warehouse using the Magento API.
I am having issues sending the Order Shipment email, instead, the customers are getting the "Order Update" email that says their order is complete.
The code below add the comment into the comment history and says the customer was "Notified" but the email is not going out.
Any ideas?
try {
$shipment = $client->call('sales_order_shipment.create', ["orderIncrementId" => $data->channel_order_code]);
if (strlen($data->tracking) > 12) {
$client->call('sales_order_shipment.addTrack', ['shipmentIncrementId' => $shipment, 'carrier' => "usps", 'title' => $data->channel, 'trackNumber' => $data->tracking]);
} else {
$client->call('sales_order_shipment.addTrack', ['shipmentIncrementId' => $shipment, 'carrier' => "fedex", 'title' => $data->channel, 'trackNumber' => $data->tracking]);
}
try{
$client->call('order_shipment.addComment', ['shipmentIncrementId' => $shipment,'comment' => 'Your order has shipped with tracking number '.$data->tracking, 'email' => true]);
}
catch(\Exception $e)
{