Its just a couple of mistranslations. From the ancient Hebrew the real translation of "hypocrites" is exhibitionists and it is not "pray" but masturbate:
"And when you masturbate, you must not be like the exhibitionists, for they love to stand and masturbate in the synagogues and at the street corners, that they may be seen by others. Truly, I say to you, they have received their reward. When you masturbate, go into your room and shut the door (missing from the text - take tissues) and pray to your Father who is in secret. And your father who sees in secret will reward you."
"And when you masturbate, you must not be like the exhibitionists, for they love to stand and masturbate in the synagogues and at the street corners, that they may be seen by others. Truly, I say to you, they have received their reward. When you masturbate, go into your room and shut the door (missing from the text - take tissues) and pray to your Father who is in secret. And your father who sees in secret will reward you."