payment refactoring