In any foreclosure action, the defendant shall comply with the following provisions:
provided, however, that, in lieu of the payments, the defendant shall be allowed to submit a receipt to the court indicating that the payments have been made to the secured creditor. In the event that the amount of the payments actually due or to become due is in controversy, the court shall determine the amount to be paid into the court in the same manner as provided in paragraph (2) of this Code section;
OCGA § 44-14-234