A new method is developed for solving the quantum mechanical problem of scattering of a particle with internal structure. The multichannel scattering problem is formulated as a system of nonlinear functional equations for the wave function and reaction matrix. The method is successfully tested for the scattering from a nonspherical potential well and a long-range nonspherical scatterer. The method is also applicable to solving the multidimensional Schrödinger equation with a discrete spectrum. As an example the known problem of a hydrogen atom in a homogeneous magnetic field is analysed.