Пример #1
0
        /// <summary>
        /// Handle order refunded event
        /// </summary>
        /// <param name="eventMessage">Event message</param>
        public void HandleEvent(OrderRefundedEvent eventMessage)
        {
            if (eventMessage.Order == null)
            {
                return;
            }

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

            //refund tax transaction
            _avalaraTaxManager.RefundTaxTransaction(eventMessage.Order, eventMessage.Amount);
        }