The acts and dealings of an agent in loaning money shall bind the principal, and in all cases where there is illegal interest contracted for by the transaction of any agent, the principal shall be held thereby to the same effect as though he had acted in person, and when the same person acts as agent for the borrower and lender, he shall be deemed the agent of the lender for the purpose of this act [56-8-9, 56-8-12 to 56-8-14 N.M. Stat. Ann.].