fix payment func