Posted on 09/12/2015 16:03:42
I did more digging and could not find anything.
I have checked the "Keep cart in context after checkout step" option hoping that the cart will not be converted to order.
It is still converted. It doesn't have anything to do with PayPal. If you want to submit the order, the system directs you to PayPal but it doesn't matter what you do after that.
In my test I have chosen to close the window (that's to exclude any PayPal dependency). The cart was already transformed into order as soon as I have left the checkout.
The OrderID I have found in the system is Order 406. But in the logs I could only find ORDER404.
Here is a dump from /System/Log/eCom/CheckoutHandler/Dynamicweb.eCommerce.Cart.CheckoutHandlers.PayPalExpressCheckout/Events :
[12/9/2015 4:19:21 PM]: Order ORDER404: State accepted
[12/9/2015 4:19:37 PM]: Order ORDER404: State notification
[12/9/2015 4:19:39 PM]: Order ORDER404: Order is kept in context - upgrading to order
[12/9/2015 4:19:47 PM]: Order ORDER404: Order was upgraded successfully
[12/9/2015 4:19:48 PM]: Order ORDER404: Payment succeeded.
[12/9/2015 4:19:49 PM]: Order ORDER404: Correlation id: b2f2d97c1eddb.
And another one from /System/Log/eCom/Order:
[12/9/2015 4:19:25 PM]: save Order problem. Invalid state, saving: ORDER404
[12/9/2015 4:19:25 PM]: stack trace: at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Dynamicweb.eCommerce.Orders.Order.SaveOrder(String IDStr, Boolean saveOldVersion)
at Dynamicweb.eCommerce.Orders.Order.Save(String IDStr, Boolean saveOldVersion)
at Dynamicweb.eCommerce.Cart.CheckoutHandlers.PayPalExpressCheckout.OnAccept(Order order, String token)
at Dynamicweb.eCommerce.Cart.CheckoutHandlers.PayPalExpressCheckout.Redirect(Order order)
at Dynamicweb.eCommerce.Cart.CheckoutHandler.RedirectToCheckoutHandler()
at Dynamicweb.eCommerce.Cart.Frontend.GetContent()
at Dynamicweb.Frontend.Content.GetModule(DataRow& ParagraphRow)
at Dynamicweb.Frontend.Content.WriteParagraph(ParagraphTemplateJoinClass PtRecord)
at Dynamicweb.Frontend.Content.CreateLayoutContent(ParagraphTemplateJoinClass PtRecord)
at Dynamicweb.Frontend.Content.CreateContentEXE()
at Dynamicweb.Frontend.Content.CreateContent(Int32 pageId)
at Dynamicweb.Frontend.Content.GetContent(Int32 pageId)
at Dynamicweb.Frontend.PageView.SetPageTemplateValues()
at Dynamicweb.Frontend.PageView.Output()
at Dynamicweb.Frontend.PageviewControl.ParseControls()
at Dynamicweb.Frontend.PageviewControl.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at Dynamicweb.Admin.DefaultAspx.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)