How to add a message to the current session (to make it shown on the screen after a controller redirection)?

API

Use the \Magento\Framework\Message\ManagerInterface:

The interface is implemented by the \Magento\Framework\Message\Manager class:

A usage example

How to diagnose the «We can’t void the payment right now» failure?