It sounds like simony:
2121 Simony is defined as the buying or selling of spiritual things. To Simon the magician, who wanted to buy the spiritual power he saw at work in the apostles, St. Peter responded: “Your silver perish with you, because you thought you could obtain God’s gift with money!” Peter thus held to the words of Jesus: “You received without pay, give without pay.” It is impossible to appropriate to oneself spiritual goods and behave toward them as their owner or master, for they have their source in God. One can receive them only from him, without payment.
2122 The minister should ask nothing for the administration of the sacraments beyond the offerings defined by the competent authority, always being careful that the needy are not deprived of the help of the sacraments because of their poverty." The competent authority determines these “offerings” in accordance with the principle that the Christian people ought to contribute to the support of the Church’s ministers. “The laborer deserves his food.”
Selling indulgences was the very thing that spurred Luther’s schism with the Church. The practice was depreciated by the Council of Trent Sess 25:
Whereas the power of conferring Indulgences was granted by Christ to the Church; and she has, even in the most ancient times, used the said power, delivered unto her of God; the sacred holy Synod teaches, and enjoins, that the use of Indulgences, for the Christian people most salutary, and approved of by the authority of sacred Councils, is to be retained in the Church; and It condemns with anathema those who either assert, that they are useless; or who deny that there is in the Church the power of granting them. In granting them, however, It desires that, in accordance with the ancient and approved custom in the Church, moderation be observed; lest, by excessive facility, ecclesastical discipline be enervated. And being desirous that the abuses which have crept therein, and by occasion of which this honourable name of Indulgences is blasphemed by heretics, be amended and corrected, It ordains generally by this decree, that all evil gains for the obtaining thereof,–whence a most prolific cause of abuses amongst the Christian people has been derived,–be wholly abolished. But as regards the other abuses which have proceeded from superstition, ignorance, irreverence, or from what soever other source, since, by reason of the manifold corruptions in the places and provinces where the said abuses are committed, they cannot conveniently be specially prohibited; It commands all bishops, diligently to collect, each in his own church, all abuses of this nature, and to report them in the first provincial Synod; that, after having been reviewed by the opinions of the other bishops also, they may forthwith be referred to the Sovereign Roman Pontiff, by whose authority and prudence that which may be expedient for the universal Church will be ordained; that this the gift of holy Indulgences may be dispensed to all the faithful, piously, holily, and incorruptly.