fix payment & refactoring