Unlock code for metro j7 ?

Aug 17, 2018
Bought a Samsung j7 from a guy ,service was still on . I reset phone , lost all info on it. Trying to unlock it from metro pcs to use with my carrier, if I can't do that if at least like to switch this metro plan into my name. Also I'm not 100% sure I bought phone from actual owner.