All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
First of all, we have consulted some doctors regarding your condition and have been informed that retinal detachment does not cause eye pain and does not affect the validity of fasting; it has nothing to do with the headaches. If you experience eye pain, perhaps it is due to another disease and not retinal detachment.
Our advice to you is to consult a specialist regarding your health condition; if he advised that your illness is curable, then you are obliged to make up for the missed fasts after recovery, Allaah willing. In this case, you should not opt for Fidyah (feeding the poor) instead of making up for the missed fasts; this is regarding the fast days you have missed either due to your illness or because of menses.
However, if the specialist advised that your illness is incurable and inevitable even by means of taking the medication at night or after the Sahoor (pre-dawn meal), and fasting proved to be difficult for you, then in this case you are entitled to opt for Fidyah. In this case, it is incumbent on you to feed one poor person one Mudd (measure) of the staple food of the country for each fast day you miss; that is approximately 750 grams of rice. This is regarding the fast days you have missed because of your illness or menses.
For further information, please refer to Fatwas 86943 and 87332.
Allaah Knows best.