Now it's easy to object that Mexico would never sell off a significant part of its national territory (we could call the Gadsden purchase area, "insignificant" compared to what is contemplated here), but, apparently, the Mexicans offered to sell California to the Prussians before the Mexican-American war in 1843.
If you have JSTOR access see: http://www.jstor.org/stable/41170053
If Mexico were agreeable in principle to selling Alta California and Nuevo Mexico to the US, would the US have been willing to make a purchase before the outbreak of war in 1846? Could the two sides have agreed on a price?