(a) A borrower may, with the consent of the licensee, refinance the entire outstanding and unpaid amount of a loan, and the licensee may charge and collect a refinancing charge in connection with any such refinancing.
(b) For the purposes of this section, the entire outstanding and unpaid amount of a loan shall be deemed to be:
(1) If the interest and charges in respect of the loan were not taken in advance, the total of the unpaid balance and the accrued and unpaid interest and charges on the date of refinancing; or
(2) If the interest and charges on the loan were precomputed and taken in advance, the amount which the borrower would have been required to pay upon the prepayment on the date of refinancing pursuant to § 2234 of this title governing refund upon prepayment.