al-Hakim reported it in 'Uloom al-Hadith, from the narration of Abu Hanifah, from 'Amr bin Shu'aib, with the wording:
He [the Prophet (ﷺ)] forbade a transaction (combined with) a condition. at-Tabarani reported it through this chain of narrators in al-Awsat, and it is Gharib (reported by a single narrator).