State-to-state chemistry and rotational excitation of CH+ in photon-dominated regions.