I think the card text is pretty clear here. You gained a card, you got the +3 coin and +1 buy, and because it was the cleanup phase, you didn't get to use it.
There are many many footguns in Dominion where you can do something that doesn't quite work out the way you want it to.
There are many many footguns in Dominion where you can do something that doesn't quite work out the way you want it to.