Player A is all in, he didn't actually fold, he paid to see the river. He wins.