payments controller and refactor