Sure. The church was super reach in middle age, they collected taxes on everyone and their monasteries were working hard and were very efficient. Also people made a lot of donations in hope of staying out of hell
Also people made a lot of donations in hope of staying bought their way out of hell.
Indulgences were literally sold, those weren't considered donations.
The Catholic church is wild, man!