How to prevent users from still being able to play my stand-alone game after a refund

Ok, so how do I do offline key validation?