Loans, purchases and discounts of notes, bills of exchange, bonds, debentures and other obligations, and extensions of credit and acceptances by a branch of a foreign banking corporation within the state shall be subject to the same limitations as to amount in relation to capital stock, surplus funds, and undivided profits as are applicable to banks and trust companies pursuant to article three of