During Ramadan I would pray after it’s prescribed times without knowing it’s haram to do so. Later I found out that all my prayers during Ramadan were invalid due to this habit. Since my prayers were invalid in Ramadan are my fasts accepted? Because I hear if one doesn’t pray during Ramadan his fasts won’t be accepted. and in this case I did pray but my prayers weren’t valid
if you sin without knowing it actually is one, you won't be accounted for it. Surely your prayers were valid and so is your fasting.

