As soon as the energies of electrons near the Fermi surface exceed Q, the threshold energy of inverse β-decay, electron capture (EC) dominates inside a neutron star. The high-energy neutrons released by EC will destroy anisotropic 3 P 2 neutron Cooper pairs in the degenerate superfluid. By colliding with the neutrons produced in the process n+(n↑n↓)→n+n+n, the kinetic energies of the neutrons released by EC will be transformed into thermal energy. A portion of this thermal energy will be transported from the star interior to the star surface by conduction, then converted to a thermal spectrum of soft X-rays and γ-rays. By introducing two important parameters: the Landau level-superfluid modified factor and the overal soft X/γ-ray efficiency coefficient, we compute the theoretical luminosity L X of a magnetar under our model and plot a diagram of L X as a function of magnetic field strength B. Numerical calculations based on our model agree well with the observed properties of magnetar candidates.