Restore drupal commerce cart if paypal payment gets failed I want my user to see what he added to his cart after redirecting from paypal, if his/her paypal payment gets failed or user by himself abort/cancel transaction(may be intentionally or by mistake). I want to preserve the state of cart for user.

Right now drupal commerce clears user's cart if payment gets failed.
Please help.
Following solution worked for me

function custom_module_commerce_checkout_page_info_alter(&amp;$checkout_pages) {
  $checkout_pages['payment']['status_cart'] = TRUE;
}