Handguns may not be delivered by an FFL to a resident of any other state. If you want to buy a handgun out of state, you need to have the FFL there transfer it to an FFL in your own state who will complete the paperwork (for a fee) for delivery to you.
As for the airlines - the airline doesn't ask, or even care, where you bought a firearm you're checking, so there's no issue there.