Just refuting your implied claim that Purgatory was an invention of the Middle Ages. Rather, the idea of a refining (purging) fire goes back to the early Church.
Using Malachi 3:3 which was metaphorically speaking (as I addressed in an earlier post) - as for non-Catholics we have 2Cor5:8