Praise be to Allah.
We praise Allah, may He be exalted, for having guided you to repent from this grave sin. Whoever violates the sanctity of the sacred month by committing the sin of zina, repentance is a blessing from Allah, may He be exalted, that calls for gratitude and appreciation. The greatest act of gratitude for it is to adhere to it and persist in it, to continually ask for forgiveness and to regret what has happened in the past, as well as asking Allah, may He be exalted, in all places and at all times when supplication is answered, for pardon and forgiveness, in the hope that Allah will accept his repentance and forgive what has happened in the past. Allah, may He be exalted, says (interpretation of the meaning):
“O you who believe! Turn to Allah with sincere repentance! It may be that your Lord will remit from you your sins, and admit you into Gardens under which rivers flow (Paradise) the Day that Allah will not disgrace the Prophet (Muhammad SAW) and those who believe with him, their Light will run forward before them and with (their Records Books of deeds) in their right hands they will say: "Our Lord! Keep perfect our Light for us (and do not put it off till we cross over the Sirat (a slippery bridge over Hell) safely) and grant us forgiveness. Verily, You are Able to do all things”
With regard to expiation, it is obligatory for you, according to the consensus of the fuqaha’ of the four madhhabs. They have stated that expiation for intercourse during the day in Ramadan is obligatory in cases such as yours, whether that intercourse took place within the framework of a permissible relationship or a forbidden relationship. If it took place within the framework of a forbidden relationship, then the sin of immoral conduct and transgressing the limit set by Allah is added to the sin of violating the sanctity of the fast and the sacred month.
Al-‘Imraani (may Allah have mercy on him) said:
If he commits zina with a woman during the day in Ramadan… he has broken the fast [and he stated that expiation is obligatory].
End quote from al-Bayaan fi Madhhab al-Imam ash-Shaafa‘i (3/525).
The scholars of the Standing Committee for Issuing Fatwas said:
The Prophet (blessings and peace of Allah be upon him) stated the ruling that expiation was obligatory for a Bedouin because he had intercourse with his wife deliberately during the day in Ramadan when he was fasting. That was an explanation on his part (blessings and peace of Allah be upon him) of the reason for the ruling. The fuqaha’ are unanimously agreed that the fact that the story refers to the Bedouin having had intercourse with his wife implies that expiation is also required in the case of intercourse with a slave woman and in the case of zina. They are also unanimously agreed that the fact that the one who had intercourse came and expressed regret does not have any impact on the obligation of offering expiation.
End quote from Fataawa al-Lajnah ad-Daa’imah (10/300)
‘Abd al-‘Azeez ibn Baaz, ‘Abd ar-Razzaaq ‘Afeefi, ‘Abdullah ibn Ghadyaan
Finally, we advise you to fear Allah, may He be exalted, in private and in public, and to repent from having not prayed and fasted in the past, and to strive hard to make up what you have missed of those actions at the earliest opportunity.
And Allah knows best.