An obligation for the payment of money is extinguished by a due offer of payment, if the amount is immediately deposited in the name of the creditor with some bank of deposit within this state, of good repute, and notice thereof is given to the creditor.
SDCL 54-2-4