Text of GCA 1968 law
Here is a little more on this subject. If you go to the BATF link below you can read the complete text of the GCA of 1968:
GCA 1968 text
The passages relevant to this discussion are the following:
The Gun Control Act of 1968, Public Law 90-618
§ 922. Unlawful acts
(a) It shall be unlawful --
(3) for any person, other than a licensed importer, licensed manufacturer, licensed dealer, or licensed collector
to transport into or receive in the State where he resides (or if the person is a corporation or other business entity, the State where it maintains a place of business) ,
any firearm purchased or otherwise obtained by such person outside that State except that this paragraph (A) shall not preclude any person who lawfully acquires a firearm by bequest or intestate succession in a State other than his State of residence from transporting the firearm into or receiving it in that State, if it is lawful for such person to purchase or possess such firearm in that State, (B) shall not apply to the transportation or receipt of a firearm obtained in conformity with subsection (b)(3) of this section, and (C) shall not apply to the transportation of any firearm acquired in any State prior to the effective date of this chapter;
(5) for any person (other than a licensed importer, licensed manufacturer, licensed dealer, or licensed collector)
to transfer, sell, trade, give, transport, or deliver any firearm to any person (other than a licensed importer, licensed manufacturer, licensed dealer, or licensed collector)
who the transferor knows or has reasonable cause to believe does not reside in (or if the person is a corporation or other business entity, does not maintain a place of business in) the State in which the transferor resides; except that this paragraph shall not apply to (A) the transfer, transportation, or delivery of a firearm made to carry out a bequest of a firearm to, or an acquisition by intestate succession of a firearm by, a person who is permitted to acquire or possess a firearm under the laws of the State of his residence, and (B) the loan or rental of a firearm to any person for temporary use for lawful sporting purposes;
Notice that the law says the illegal act is to "transport into or receive in the State where he resides". This is my basis for saying that the act of purchasing the handgun in another state is not the violation, but the subsequent act of transporting the handgun back to your state of residence.
Also note that the seller is only prohibited from selling to an out-of-state resident if he "knows or has reasonable cause to believe" that the person is a non-resident". If he is honestly ignorant of this fact, he has broken no Federal law.