If you think you found a bug, please create a ticket in the bug tracker.
If you take code quality seriously, try out the new continuous inspection service.
The PluginController dispatches events for certain payment changes. This can be used by your application to perform certain actions for example when a payment is successful.
Event Class: JMS\Payment\CoreBundle\PluginController\Event\PaymentStateChangeEvent
This event is dispatched directly after the state of a payment changed. All related entities have already been updated.
You have access to the Payment, the PaymentInstruction, the new state, and the old state of the payment.