Developer forum

Forum » Development » Why is my order not registered in backend after completed trip to provider

Why is my order not registered in backend after completed trip to provider

Martin Slot
Reply
Hello again

I got this CartV2 custom checkout handler and i does not register the order in backend after completed trip to gateway provider. A email to the shop and a email to the customer is sent through, and the payment is registered at the gatway provider, but it is dissmissed in DW. Why is that? Here is my Redirect method:

        public override string Redirect(Dynamicweb.eCommerce.Orders.Order order)
        {
            string result = null;

            string orderStatus = HttpContext.Current.Request.QueryString["order"];
            if (orderStatus == "complete")
            {
                order.Save();
                base.SetOrderComplete(order);
                base.CheckoutDone(order);

                LogEvent(order, "complete");

                base.RedirectToCart(order);
            }
            else
            {
                LogError(order, "transaktionen fejlede");
                order.TransactionStatus = "failed";
                order.Save();
                base.CheckoutDone(order);

                result = PrintErrorTemplate(order);
            }

            return result;
        }

I am doing a little guessing here because the documentation paper on custom checkout handlers is not up to date.


Replies

 
Martin Slot
Reply
This post has been marked as an answer
My code works. It is just me that are not able to use the eCommerce backend properly.
Votes for this answer: 0

 

You must be logged in to post in the forum