No, it's not okay because there are two vital things that ID thieves can get from those receipts. Your name and the numbers can equal to unauthorized credit card charges.
It is a very unsafe practice, and illegal, too.
You should tell that store's manager or owner that since Dec. 1, 2006, all businesses in the U.S. have been required to show only the last 5 digits of a credit card number or the expiration date on receipts on electronically created receipts, according to the Federal Trade Commission. Due to escalating ID theft cases, Congress passed the Fair and Accurate Credit Transaction Act which deals with this thing. Baka di lang informed yung store, so let them know na bawal na ito.
The rules don't apply to handwritten or "imprinted" receipts, which are created when your plastic card is placed into a device used to physically transfer its numbers to a paper receipt, and the law applies only to electronically printed receipts, not to handwritten ones. It applies to the receipts the customer is given, not to the receipts the businesses retain for their own records.
Businesses who disobey are risking FTC civil actions and fines by refusing to comply with the law. Anyone can file a complaint by visiting the FTC website or calling the agency's toll-free number, (877) FTC-HELP, or (877) 382-4357.