It is, in my opinion, certainly not illegal. Whether it is morally acceptable, only you can say.
btw, it isn't fraud, because you aren't decieving anybody (unless their is a rule that the refund must be made to the credit card used for the purchase. If there were such a rule, you may be defrauding the business, but you are certainly not defrauding either credit card company or the airline.... at least not directly. Credit card company a still gets the money for the purchase and for the miles that the airline bought, credit card b gets the credit refund. The only problem would be the fees, which would still be carged to the merchant by credit card company a. I also have a feeling that the credit card company might not accept a refund credit from a store that never made a charge to the card.)