(a) In this section:
(1) “Domestic transaction” means a transaction other than an international transaction; and
(2) “International transaction” means a transaction that bears a reasonable relation to a country other than the United States.
(b) This section applies to a transaction to the extent that it is governed by another article of the Uniform Commercial Code. Except as otherwise provided in this section:
(1) an agreement by parties to a domestic transaction that any or all of their rights and obligations are to be determined by the law of this State or of another State is effective, whether or not the transaction bears a relation to the State designated; and
(2) an agreement by parties to an international transaction that any or all of their rights and obligations are to be determined by the law of this State or of another State or country is effective, whether or not the transaction bears a relation to the State or country designated.
(c) In the absence of an agreement effective under subsection (b), and except as provided in subsections (d) and (f), the rights and obligations of the parties are determined by the law that would be selected by application of this State's conflict of laws principles.
(d) If one of the parties to a transaction is a consumer, the following rules apply:
(1) An agreement referred to in subsection (b) is not effective unless the transaction bears a reasonable relation to the State or country designated.
(2) Application of the law of the State or country determined pursuant to subsection (b) or (c) may not deprive the consumer of the protection of any rule of law governing a matter within the scope of this section, which both is protective of consumers and may not be varied by agreement, of the State or country:
(A) in which the consumer principally resides, unless subparagraph (B) applies; or
(B) if the transaction is a sale of goods, in which the consumer makes the contract and takes delivery of those goods, if such State or country is not the State or country in which the consumer principally resides.
(e) An agreement otherwise effective under subsection (b) is not effective to the extent that application of the law of the State or country designated would be contrary to a fundamental policy of the State or country whose law would govern in the absence of agreement under subsection (c).
(f) To the extent that the Uniform Commercial Code governs a transaction, where one of the following provisions of the Uniform Commercial Code specifies the applicable law, that provision governs and a contrary agreement is effective only to the extent permitted by the law so specified:
(1) § 2–402;
(2) §§ 2A-105 and 2A-106;
(3) § 4–102;
(4) § 4A-507;
(5) § 5–116;
(6) § 8–110;
(7) §§ 9–301 through 9–307.