In eve, they do like this: Player 1 buys a game time code and then sells it (securely, via a game interface and board on the official forums) for in game cash to player 2.
Or, player 1 buys an in game item called a PLEX with real-world money which they can then sell in game on the markets...