New token arch
This commit is contained in:
@@ -471,15 +471,20 @@ class OrdersService:
|
||||
if self.notification_client and order.customer:
|
||||
message = f"Order {order.order_number} status changed from {old_status} to {new_status}"
|
||||
await self.notification_client.send_notification(
|
||||
str(order.tenant_id),
|
||||
{
|
||||
"recipient": order.customer.email,
|
||||
"message": message,
|
||||
"type": "order_status_update",
|
||||
"order_id": str(order.id)
|
||||
tenant_id=str(order.tenant_id),
|
||||
notification_type="email",
|
||||
message=message,
|
||||
recipient_email=order.customer.email,
|
||||
subject=f"Order {order.order_number} Status Update",
|
||||
priority="normal",
|
||||
metadata={
|
||||
"order_id": str(order.id),
|
||||
"order_number": order.order_number,
|
||||
"old_status": old_status,
|
||||
"new_status": new_status
|
||||
}
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning("Failed to send status notification",
|
||||
order_id=str(order.id),
|
||||
logger.warning("Failed to send status notification",
|
||||
order_id=str(order.id),
|
||||
error=str(e))
|
||||
|
||||
Reference in New Issue
Block a user