Section 656. If a loan is made for a sum of money, and the borrower accepts goods or other property instead of such sum, the amount of the debt due shall be considered as equal to the market value of the goods or property at the time and place of delivery.
If a loan is made for a sum of money, and the lender accepts goods or other property for the repayment of the loan, the amount of the debt extinguished thereby shall be considered as equal to the market value of the goods or property at the time and place of delivery.
Any agreement to the contrary is void.