"We have detected a sophisticated criminal effort to steal credit and debit card information from our customers who have swiped their cards through PIN pads when they made purchases at certain retail stores. The tampered devices were capable of capturing information such as name, card account number, and PIN," the company said.

Barnes & Noble said it discovered the tampering during maintenance and inspection of the devices and has discontinued the use of all PIN pads in all of its stores.

Customers can make transactions securely today by asking booksellers to swipe their cards through the card readers connected to cash registers, the company said.

"We want to reassure you that this situation does not involve any purchases you may have made at Barnes & Noble.com or using your NOOK or a NOOK mobile app. The Barnes & Noble member database is secure. The tampering only affected transactions in which customers swiped their cards at one of the compromised in-store PIN pads," the company said in a statement on its website.

Machines were tampered with in Connecticut, Florida, Illinois, Massachusetts, New Jersey, New York, Pennsylvania and Rhode Island.

In Connecticut, where three stores were hit, Attorney General George Jepsen wants to know what Barnes & Noble is doing to protect its customers.

“Given the possible impact on individuals in Connecticut and elsewhere, my office is requesting detailed information on how this breach occurred, what steps have been taken to protect the affected individuals, and what new procedures have been adopted to prevent future data breaches,” Jepsen wrote in a letter to Gene DeFelice, the company’s vice president, general counsel and corporate secretary.

Customers who are concerned that their credit card numbers may have been compromised should take the following actions, the company said:

Debit Card Users:

Change the PIN numbers on your debit cards

Review your accounts for unauthorized transactions

Notify your banks immediately if you discover any unauthorized purchases or withdrawals

Credit Card Users:

Review your statements for any unauthorized transactions

Notify your card-issuing banks if you discover any unauthorized purchases or cash advances

Stores listed

Here is a list of the stores B&N has identified as being hit by hackers.