The Messenger of Allah ﷺ said, "There are three whom Allah will not look at on the Day of Resurrection, nor will He purify them, and they shall have a painful punishment. A man who had surplus water by the roadside and withheld it from the traveler. A man who pledged allegiance to a leader only for worldly gain, so that if the leader gave him something of it he was pleased, and if he gave him nothing he was angry. And a man who offered his goods for sale after Asr and swore, 'By Allah, besides whom there is no god, I was offered such and such a price for it,' and another man believed him."Then he recited this verse, "Indeed, those who trade the covenant of Allah and their oaths for a small price" [Al Imran 3:77].
قال رسول الله ﷺ: ثلاثة لا ينظر الله إليهم يوم القيامة ولا يزكيهم ولهم عذاب أليم: رجل كان له فضل ماء بالطريق فمنعه من ابن السبيل، ورجل بايع إماما لا يبايعه إلا لدنيا، فإن أعطاه منها رضي، وإن لم يعطه منها سخط، ورجل أقام سلعته بعد العصر، فقال: والله الذي لا إله غيره لقد أعطيت بها كذا وكذا فصدقه رجل ثم قرأ هذه الآية {إن الذين يشترون بعهد الله وأيمنهم ثمنا قليلا} [سورة آل عمران: ٧٧].
Bukhari narrated it in the Book of Sharecropping (2358), from Musa bin Ismail, who said, Abdul-Wahid bin Ziyad narrated to us, from Amash, who said, I heard Abu Salih say, I heard Abu Hurairah, and he mentioned it.Muslim narrated it in the Book of Faith (108) through another route from Amash, and he mentioned something similar, but he did not mention in his narration the verse of Surah Al Imran.