PayPal—which will become independent from eBay later this month—will pay $25 per share in an all-cash deal.