cancel
Showing results for 
Search instead for 
Did you mean: 

Cart deletion issue in ogoing transaction

0 Kudos
487

We are facing an issue in which ongoing cart is deleted when the response is received from payment gateway.This behavior is random and is happening for 5 % cases. All OOB jobs related to cart removal is inactive in production system.Also the property session.remove.cart.on.close=false is maintained in local.properties.

We get below message in log while processing the payment response. [DefaultCartService] Session Cart no longer valid. Removing from session. hasSessionCart will return false. item 8803454124075 no longer valid (was removed): object no longer valid Please suggest if anybody else has faced similar issue.

View Entire Topic
davorin1
Explorer
0 Kudos

Hi,

I've faced the similar problem. The root cause for the session cart invalidation was that we were throwing CommerceCartModificationException in the custom code for adding entries to the cart which invalidated the session cart. The fix that we did is that we've replaced the exception with the logging and the session did not get removed. But beware that the root cause might be hidden in the code base eg. why the entry did not pass the validation.