Exemple #1
0
        /// <summary>
        /// Handle order deleted event
        /// </summary>
        /// <param name="eventMessage">Event message</param>
        public void HandleEvent(EntityDeletedEvent <Order> eventMessage)
        {
            if (eventMessage.Entity == null)
            {
                return;
            }

            //ensure that Avalara tax provider is active
            if (!_taxPluginManager.IsPluginActive(AvalaraTaxDefaults.SystemName))
            {
                return;
            }

            //delete tax transaction
            _avalaraTaxManager.DeleteTaxTransaction(eventMessage.Entity);
        }