Hi guys,
We have an issue updating one of our integration with a payment provider.
We used to have a problem with concurrent access to the order, posted here: https://doc.dynamicweb.com/forum/development/development/system-data-dbconcurrencyexception-concurrency-violation-in-payment-provider
Based on the feedback we got, we have updated the solution to the latest version, hoping that the fix for Context.GetCart(0 would solve our problem.
Now, we get a permanent error about updating the order:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Exception: The Context.GetCart() is not a cart and cannot be updated. (Order.IsCart = False, Order.Complete = True, Order.AutoId = 1477, SessionCartKey = EcomCart)Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: The Context.GetCart() is not a cart and cannot be updated. (Order.IsCart = False, Order.Complete = True, Order.AutoId = 1477, SessionCartKey = EcomCart)] Dynamicweb.Ecommerce.Common.Context.GetCart(OrderContext orderContext) +479 Dynamicweb.Ecommerce.LiveIntegration.NotificationSubscribers.PageLoaded.OnNotify(String notification, NotificationArgs args) +727 Dynamicweb.Extensibility.Notifications.NotificationManager.Notify(String notification, NotificationArgs eventArgs) +875 Dynamicweb.Frontend.PageView.Load() +2545 Dynamicweb.Frontend.DynamicwebHttpHandler.ProcessRequest(HttpContext context) +186 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +542 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +93
I have attached 2 files, one with a screenshot of the error and the other with a log.
Somehow, it seems there is a cookie still present that might confuse the code into thinking there is still a cart active:
Dynamicweb:Ecom:Cart12576
I am wondering if this is a DW bug or if we do something wrong.
Thank you,
Adrian