Zend certified PHP/Magento developer

Magento 2.3 empties cart after a failed payment

Firstly, this is the environment we’re working in:

  • Magento 2.3.0 (PHP 7.2.34, MySQL 8.0.30)
  • Cogito – Clean, Minimal Magento 2 Theme
  • Mageplaza Magento Instagram Feed Plugin
  • Barclaycard integration

The issue is that Magento removes any products from the cart whenever a user tries to pay for a product in Express Checkout and their order fails for any reason – whether due to a declined or cancelled payment. The checkout screen appears to be part of Cogito’s “RokanThemes”, if that’s of any relevance. We’d like for the products to stay in the cart if the payment has been unsuccessful.

I’ve had a look through existing answers here and I’ve researched this quite extensively, but there don’t appear to be answers specific to version 2.3 or anything that works in our environment.

Is there a way to solve this without upgrading Magento as that is currently not an option for us?