you can only process a refund if you have the authorization code for an already existing txn on that card. you can't just issue one just by knowing the card details.
Actually you can process a "refund" (actually just a credit) without an existing authorization code. I've done it.
Refunds and credits are two different things entirely. They are considered two different things by the credit card companies. If you've done this, then you've done it with a system that hides the specifics of what you are actually doing.