Show me where in the law, the president can't ask another foreign leader to do a criminal investigation of American citizens.
The American citizen in question happens to be a potential presidential candidate, which makes the "contribution/thing of value" an investigation into said political opponent.
30121. Contributions and donations by foreign nationals
It shall be unlawful for-
(1) a foreign national, directly or indirectly, to make-
(A) a contribution or donation of money or other thing of value, or to make an express or implied promise to make a contribution or donation, in connection with a Federal, State, or local election;
(B) a contribution or donation to a committee of a political party; or
(C) an expenditure, independent expenditure, or disbursement for an electioneering communication (within the meaning of section 30104(f)(3) of this title); or
(2) a person to solicit, accept, or receive a contribution or donation described in subparagraph (A) or (B) of paragraph (1) from a foreign national.
(b) "Foreign national" defined
As used in this section, the term "foreign national" means-
(1) a foreign principal, as such term is defined by section 611(b) of title 22, except that the term "foreign national" shall not include any individual who is a citizen of the United States; or
(2) an individual who is not a citizen of the United States or a national of the United States (as defined in section 1101(a)(22) of title 8) and who is not lawfully admitted for permanent residence, as defined by section 1101(a)(20) of title 8.
(Pub. L. 92"225, title III, 319, formerly 324, as added Pub. L. 94"283, title I, 112(2), May 11, 1976, 90 Stat. 493 ; renumbered 319, Pub. L. 96"187, title I, 105(5), Jan. 8, 1980, 93 Stat. 1354 ; amended Pub. L. 107"155, title III, 303, 317, Mar. 27, 2002, 116 Stat. 96 , 109.)
How about you show us where, in the law, the president has the authority to withhold military aid in exchange for a political favor?