SAN JOSE, California — EBay sold its Enterprise business for $925 million and topped Wall Street expectations for its second-quarter earnings as the online retailer prepares to spin off PayPal.

Shares rose more than 4 percent in morning trading Thursday.

EBay had said in January that it might sell Enterprise, which develops online shopping sites for brick-and-mortar retailers. Clients include Sports Authority, PetSmart and Ikea. Earlier this month one of its biggest clients, Toys R Us, said that it would move its ecommerce business in house next year.

But that didn't stop the sale to a group of private equity firms led by Permira and Sterling Partners, the company announced Thursday.

EBay Inc., based in San Jose, California, also reported quarterly net income of $83 million, or 7 cents per share. Adjusted earnings, excluding a $786 million charge related to the Enterprise sale, amounted to 76 cents per share. That was 4 cents better than analysts had projected, according to a survey by Zacks Investment Research.

The e-commerce company posted revenue of $4.38 billion in the period. Including revenue from its discontinued enterprise unit, however, revenue totaled $4.65 billion. Thirteen analysts surveyed by Zacks expected $4.48 billion. EBay said the stronger dollar hurt its results.

EBay expects full-year earnings in the range of $1.72 to $1.77 per share.

Shares rose $2.15, or 3.4 percent, to close at $65.59 on Thursday. Its shares are up more than 29 percent over the past year.