How to restore the last quote on an unsuccessfull payment?

Context: How to cancel the last order and restore the last quote on an unsuccessfull payment?

Use the \Magento\Checkout\Model\Session::restoreQuote() method.