Ejemplo n.º 1
0
        private async Task <bool> VendorNotification(Order order)
        {
            //notification for vendor
            foreach (var orderItem in order.OrderItems)
            {
                if (!string.IsNullOrEmpty(orderItem.VendorId))
                {
                    var vendor = await _vendorService.GetVendorById(orderItem.VendorId);

                    if (vendor != null && !vendor.Deleted && vendor.Active)
                    {
                        await _messageProviderService.SendOrderCancelledVendorMessage(order, vendor, order.CustomerLanguageId);
                    }
                }
            }

            return(true);
        }