The deal would help Wal-Mart better compete with Amazon.com and other online retailers.