Magnetic-field interaction of spatially confined quantum-well exciton-polaritons