```php
<?php

$state = $payment->getState();

$this->addFlash($state);

// ...
```