In the book of Acts, Simon came to the first pope, Peter, wanting to buy the power of the Holy Spirit. How did Peter respond to this sin? Did he suggest that Simon make a confession to him right there? No, Peter told him to repent and confess his sin to God and ask God to forgive him.
Which is why Simon said in response to the rebuke:
“Then Simon answered, ‘Pray to the Lord for me so that nothing you have said may happen to me.’ “