Gift Cards are NOT cash. I have never worked somewhere where they were ever treated on our end as cash. It does not matter how someone paid for the gift card. Once it is on a gift card that is what it is... a gift card. If you pay with a gift card and then return the item, you get a gift card back. Why? Because that is the tender it is... not cash.
A gift card is not run as a cash transaction. It simply can not be done (in all my experiences). So I see no problem with the first situation. If the OP wanted the cash price, then they should have used cash.