In any action brought under the provisions of this chapter, or under other provisions of law, including chapter 50-22, 51-12, 51-13, 51-14, 51-16.1, or 51-18, the court shall award to the attorney general reasonable attorney’s fees, investigation fees, costs, and expenses of any investigation and action brought under this chapter, or under other provisions of law, including chapter 50-22, 51-12, 51-13, 51-14, 51-16.1, or 51-18. All attorney’s fees, investigation fees, costs, and expenses received by the attorney general under this section must be deposited into the attorney general refund fund.