I would have played a game with him, asked him for his badge number. If he looked aghast, then would have tried to cajole him into showing his ID, just for fun. He might think (irrationally) that showing his ID would put you at ease. Take a picture of it with your cell phone, then you either have the agent's ID, or you have the ID of a moron who was willing to violate federal law. Also, if he had had to reach for his wallet, he might have uncovered a concealed weapon or badge.
If it was a sting, it was poorly done, but I don't know if it would be considered entrapment in court. Entrapment is a lot more limited than is commonly thought. Since he made explicit that it would be a straw sale, and made sure you knew that, that might be enough to make it not entrapment. If you know what you're doing is illegal and the agent provocateur doesn't have to push you to do it, but merely suggests it and you agree, that's not necessarily entrapment as I understand it. But IANAL.
“The egg hatched...” “...the egg hatched... and a hundred baby spiders came out...” (blade runner)
“Who are you?” “A friend. I'm here to prevent you from making a mistake.” “You have no idea what I'm doing here, friend.” “In specific terms, no, but I swore an oath to protect the world...” (continuum)
“It's a goal you won't understand until later. Your job is to make sure he doesn't achieve the goal.” (bsg)