diff --git a/packages/medusa-plugin-slack-notification/src/subscribers/order.js b/packages/medusa-plugin-slack-notification/src/subscribers/order.js index 40c81f41a8..bfa02ddd63 100644 --- a/packages/medusa-plugin-slack-notification/src/subscribers/order.js +++ b/packages/medusa-plugin-slack-notification/src/subscribers/order.js @@ -1,15 +1,11 @@ class OrderSubscriber { - constructor({ economicService, eventBusService }) { - this.economicService_ = economicService + constructor({ slackService, eventBusService }) { + this.slackService_ = slackService this.eventBus_ = eventBusService this.eventBus_.subscribe("order.placed", async (order) => { - await this.economicService_.draftEconomicInvoice(order) - }) - - this.eventBus_.subscribe("order.completed", async (order) => { - await this.economicService_.bookEconomicInvoice(order._id) + await this.slackService_.orderNotification(order._id) }) } }