The way in which the energy from photons is used to drive the synthesis of NADPH is something that you might want to look into. The electrons from NADPH are indirectly supplied to carbon dioxide to bring it to the correct oxidation state, the oxidation state of carbohydrates.