If neither party makes application pursuant to § 20-4-7 or § 20-4-8 within a reasonable time after performance, the performance must be applied to the extinction of obligations in the following order; and if there be more than one obligation of a particular class, to the extinction of all in that class, ratably:
(1) Of interest due at the time of the performance;
(2) Of principal due at that time;
(3) Of the obligation earliest in date of maturity;
(4) Of an obligation not secured by a lien or collateral undertaking;
(5) Of an obligation secured by a lien or collateral undertaking.