The e-commerce company said on Thursday it hashed out a deal with Carl Icahn to end his months-long effort to get eBay to spin off payments unit PayPal. EBay agreed to make former AT&T Inc. Chief Executive David Dorman a director, and Mr. Icahn will drop support for two men he had nominated for eBay's board.