The World Federation One Stop Fiqh

Ruling 1573

If someone intentionally indulges in courtship with the intention of ejaculating but he does not ejaculate and does not make another intention to fast, his fast is invalid; and if he makes the intention to fast, then based on obligatory precaution he must complete his fast and also keep a qaḍāʾ fast.