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.