1. Except as otherwise provided by this chapter, a franchisor shall not terminate a franchise prior to the expiration of its term except for good cause. For purposes of this section, “good cause” is cause based upon a legitimate business reason. “Good cause” includes the failure of the franchisee to comply with any material lawful requirement of the franchise agreement, provided that the termination by the franchisor is not arbitrary or capricious when compared to the actions of the franchisor in other similar circumstances. The burden of proof of showing that action of the franchisor is arbitrary or capricious shall rest with the franchisee.
 2. Prior to termination of a franchise for good cause, a franchisor shall provide a franchisee with written notice stating the basis for the proposed termination. After service of written notice, the franchisee shall have a reasonable period of time to cure the default, which in no event shall be less than thirty days or more than ninety days. In the event of nonpayment of moneys due under the franchise agreement, the period to cure need not exceed thirty days.
 3. Notwithstanding subsection 2, a franchisor may terminate a franchisee upon written notice and without an opportunity to cure if any of the following apply:

 a. The franchisee or the business to which the franchise relates is declared bankrupt or judicially determined to be insolvent.
 b. All or a substantial part of the assets of the franchise or the business to which the franchisee relates are assigned to or for the benefit of any creditor which is subject to chapter 681. An assignment for the benefit of any creditor pursuant to this paragraph does not include the granting of a security interest in the normal course of business.
 c. The franchisee voluntarily abandons the franchise by failing to operate the business for five consecutive business days during which the franchisee is required to operate the business under the terms of the franchise, or any shorter period after which it is not unreasonable under the facts and circumstances for the franchisor to conclude that the franchisee does not intend to continue to operate the franchise, unless the failure to operate is due to circumstances beyond the control of the franchisee.
 d. The franchisor and franchisee agree in writing to terminate the franchise.
 e. The franchisee knowingly makes any material misrepresentations or knowingly omits to state any material facts relating to the acquisition or ownership or operation of the franchise business.
 f. After three material breaches of a franchise agreement occurring within a twelve-month period, for which the franchisee has been given notice and an opportunity to cure, the franchisor may terminate upon any subsequent material breach within the twelve-month period without providing an opportunity to cure, provided that the action is not arbitrary and capricious.
 g. The franchised business or business premises of the franchisee are lawfully seized, taken over, or foreclosed by a government authority or official.
 h. The franchisee is convicted of a felony or any other criminal misconduct which materially and adversely affects the operation, maintenance, or goodwill of the franchise in the relevant market.
 i. The franchisee operates the franchised business in a manner that imminently endangers the public health and safety.