I've created a plugin that I need to run only once when an order is complete. It currently fires on the OrderPaid event, but apparently executes twice (I increment a value based on Quantity). I tried to set if(e.Order.OrderStatusId==30) but still twice...
Looking at the code of OrderProcessingService, the OrderPaid event is raised in method PlaceOrder and method MarkOrderAsPaid the last method is protected by a call to method CanMarkOrderAsPaid which returns false if the status is paid. Maybe you introduced a new order status which causes CanMarkOrderAsPaid to return true and fire the paid event a second time?