  We obtain the exact solution of the Klein-Gordon equation describing the
propagation of a particle in two regions of different constant magnetic field,
separated by an infinite plane wall. The continuity of the wave function and of
its derivative at the interface is satisfied when including evanescent-wave
terms. We analyze solutions on truncated spaces and compare them with
previously obtained approximate solutions. The findings of this work have
applications in the problem of the propagation of particles in the presence of
a bubble wall in the midsts of an electroweak phase transition, where the two
regions separated by the wall are influenced by different (hyper)magnetic field
strengths.
