Magnetically mediated superconductivity in quasi-two and three dimensions