If anyone what happened to PC games many years ago, you would get a physical box with a disc for installation. However, there would be a piece of paper with a digital redemption code on it (that you could scan or type in).
Retailers would be happy because they are still selling you a box.
You can throw the box away when you are done with the installation, as the digital code would let you redownload the game if required.
Sony / Microsoft just need to create a digital marketplace where you can sell your code. Once you agree to a sale (where Sony / Microsoft and the developer get a cut), your code becomes invalid and you can no longer play the game. Whoever bought the game from you now has a digital copy.
Everyone wins (except for the environment, because of all of the thrown away plastic boxes).
Once everyone has gigabit Ethernet connections to the Internet, retail stores can just sell you cards with codes -- until Sony / Microsoft bypass retail altogether and sell everything digitally.