Developer forum

Forum » Development » Notification Subscriber mechanism

Notification Subscriber mechanism


Reply
 Hi,

Question: I have a notification subscriber that 'listens' to the Order Completed notification, but I notice this code is executed 2 or 3 times shortly after one another.
Is this by design ?

Here's a sample of the code:

 [Subscribe(Dynamicweb.Notifications.eCommerce.Order.Steps.Completed)]
    public class OrderCompletedNotification : Dynamicweb.Extensibility.NotificationSubscriber 
    {
        public override void  OnNotify(string notification, object[] args)
        {
            Dynamicweb.eCommerce.Orders.Order Order = args[0] as Dynamicweb.eCommerce.Orders.Order;

            System.Diagnostics.Trace.WriteLine(string.Format("{0}: order {1} completed", DateTime.Now.ToString(), Order.ID) );
        }
    }

Kind Regards,
Emil

Replies

 
Reply
Hi Emil

This is not by design, and must be some kind of error. Could you provide more info on your cart? Are you using a gateway?

 - Lasse

 

You must be logged in to post in the forum