After changing namespace in classes and correcting model in config.xml magento continue search old namespace. While open checkout magento throw:
Fatal error: Class 'Custom\Payment\Model\Methods\Payment' not found in /var/www/html/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 111
Also I clean cache and run
bin/magento setup:upgrade
But it doesn't help.
Is it possible that magento store somewhere old namespace?