If a foreign corporation is doing or has done any intrastate, interstate, or foreign business in this State without complying with the requirements of Subtitle 2 of this title, neither the corporation nor any person claiming under it may maintain a suit in any court of this State unless it shows to the satisfaction of the court that:
(1) The foreign corporation or the person claiming under it has paid the penalty specified in § 7-302 of this subtitle; and(2) Either: (i) The foreign corporation or a foreign corporation successor to it has complied with the requirements of Subtitle 2 of this title; or(ii) The foreign corporation and any foreign corporation successor to it are no longer doing intrastate, interstate, or foreign business in this State.