In cases where assignments of real estate mortgages are made after the passage of this act, if such assignments are not recorded, the mortgagor, his heirs, personal representatives, or assigns, may pay all matured interest or the principal debt secured thereby, prior to the recording of such assignment to the mortgagee, or if any assignment of such mortgage has been made that duly appears of record, then such payment may be made to the last assignee whose assignment is recorded in accordance with the provisions of this act, and such payment shall be effectual to extinguish the debt secured by such mortgage and all claims against such mortgagor, his heirs, personal representatives, and assigns, for or on account of such interest or such principal indebtedness; and no transfer of any note, bond or other evidence of indebtedness, by endorsement or otherwise, where such indebtedness is secured by mortgage on real estate within this state, shall prevent or operate to defeat the defense of payment of such interest or principal by the mortgagor, his heirs, personal representatives, or assigns, where such payment has been made to the mortgagee or to the assignee whose assignment appears last of record under the provisions of this act: Provided, however, that in all such cases the assignee who may hold such unrecorded assignment shall have a right of action against his assignor to recover the amount of any such payment of interest or principal made to such assignor as upon an account for money had and received for the use of such assignee: Provided, this section applies only to mortgages which have been on record six (6) months or more.
Okla. Stat. tit. 46, § 12