A story took place in our times – the man did many deeds to give him merits for his salvation but he was not redeemed until he prayed
Even if a person does all the merit producing deeds in the world, he still has to pray
I heard of a man who came to his rabbi and asked him for a merit that would help him earn a living more easily and plentifully. He explained that because of the great pressure he had, his life was not worth living and he wanted to die. He could not bear the pressure that all the various creditors and loaners were putting upon him. His rabbi told him that he should take upon himself to be stringent in giving tithes (a tenth of his earnings) to charity, as our Sages (Masechta Shabbos) have interpreted the verse, "You should certainly give tithes" – 'Give tithes so that you become rich.' Giving tithes of one's earnings to charity is a merit that brings affluence.
The man followed the advice faithfully and gave away one tenth of his hard-earned money to charity, from any source of profit.
Much time went by but he still did not experience a change and he was still paying up debts as before, running madly from one lender to another, asking desperately for a new redeeming loan, or an extension of time, in order to keep up with his great debts and pay them all back on time. More time elapsed and he saw that his salvation had still not arrived, that there was no one to help him, and no one to whom he could turn for support. He had tried every type of advice and merit and nothing had helped him.
In this sad state he took up his ancestors' craft – he picked up the Book of Psalms and poured out his heart to the Creator, begging G-d with all his heart to have mercy upon him and take him out from his darkness to the light. He prayed that he should earn a living in ease and comfort, not to be dependent on people's gifts or loans. He kept this up for several days and indeed his fortune changed and he began to earn in a dignified and sufficient manner.
He eventually managed to pay back his debts, his good fortune continued and he became very wealthy. When a friend later asked him – "Is it true what they say that giving tithes for charity is a merit for wealth and that's how you became wealthy?" The man answered, "Certainly giving tithes to charity is a great merit, but it must be seasoned with several chapters of Psalms with a full heart, because for everything you need prayers. And even if a person performs all the merit producing deeds in the world, he still needs prayers."