order and payment notifs
This commit is contained in:
@@ -56,7 +56,7 @@ export class OrdersService {
|
||||
private readonly paymentsService: PaymentsService,
|
||||
private readonly inventoryService: InventoryService,
|
||||
private readonly eventEmitter: EventEmitter2,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
async checkout(userId: string, restaurantId: string) {
|
||||
const cart = await this.cartService.findOneOrFail(userId, restaurantId);
|
||||
@@ -133,7 +133,7 @@ export class OrdersService {
|
||||
const { paymentUrl } = await this.paymentsService.payOrder(order.id);
|
||||
this.eventEmitter.emit(
|
||||
OrderCreatedEvent.name,
|
||||
new OrderCreatedEvent(order.id, restaurantId, String(order?.orderNumber) || ''),
|
||||
new OrderCreatedEvent(order.id, restaurantId, String(order?.orderNumber) || '', order.total),
|
||||
);
|
||||
|
||||
return { paymentUrl, order };
|
||||
|
||||
Reference in New Issue
Block a user