Sahih al-Bukhari, Hadith 2358

Narrated Abu Huraira: Allah's Messenger said, "There are three persons whom Allah will not look at on the Day of Resurrection, nor will he purify them and theirs shall be a severe punishment. They are: -1. A man possessed superfluous water, on a way and he withheld it from travelers. -2. A man who gave a pledge of allegiance to a ruler and he gave it only for worldly benefits. If the ruler gives him something he gets satisfied, and if the ruler withholds something from him, he gets dissatisfied. -3. And man displayed his goods for sale after the `Asr prayer and he said, 'By Allah, except Whom None has the right to be worshipped, I have been given so much for my goods,' and somebody believes him (and buys them). The Prophet then recited: "Verily! Those who purchase a little gain at the cost of Allah's Covenant and their oaths." (3.77)

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا عَبْدُ الْوَاحِدِ بْنُ زِيَادٍ، عَنِ الأَعْمَشِ، قَالَ سَمِعْتُ أَبَا صَالِحٍ، يَقُولُ سَمِعْتُ أَبَا هُرَيْرَةَ ـ رضى الله عنه ـ يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ ثَلاَثَةٌ لاَ يَنْظُرُ اللَّهُ إِلَيْهِمْ يَوْمَ الْقِيَامَةِ، وَلاَ يُزَكِّيهِمْ، وَلَهُمْ عَذَابٌ أَلِيمٌ رَجُلٌ كَانَ لَهُ فَضْلُ مَاءٍ بِالطَّرِيقِ، فَمَنَعَهُ مِنِ ابْنِ السَّبِيلِ، وَرَجُلٌ بَايَعَ إِمَامًا لاَ يُبَايِعُهُ إِلاَّ لِدُنْيَا، فَإِنْ أَعْطَاهُ مِنْهَا رَضِيَ، وَإِنْ لَمْ يُعْطِهِ مِنْهَا سَخِطَ، وَرَجُلٌ أَقَامَ سِلْعَتَهُ بَعْدَ الْعَصْرِ، فَقَالَ وَاللَّهِ الَّذِي لاَ إِلَهَ غَيْرُهُ لَقَدْ أَعْطَيْتُ بِهَا كَذَا وَكَذَا، فَصَدَّقَهُ رَجُلٌ‏"‏ ثُمَّ قَرَأَ هَذِهِ الآيَةَ ‏{‏إِنَّ الَّذِينَ يَشْتَرُونَ بِعَهْدِ اللَّهِ وَأَيْمَانِهِمْ ثَمَنًا قَلِيلاً‏}‏

sunnah.com