Section 45. No domestic company shall establish an agency or appoint an agent or other person to solicit, negotiate, continue or renew contracts of insurance on lives, property or interests in, or annuity or pure endowment contracts with residents of, a state, district or territory where such company has not been lawfully authorized to transact business, and no such company or officer or agent thereof shall pay or allow or offer to pay or allow compensation or anything of value to any such person for soliciting, negotiating, continuing or renewing such contracts. Whoever violates this section shall be punished by a fine of not less than three hundred dollars.