Multiphoton processes and higher resonances in the quantum regime of the free-electron laser