The CNO cycle is the main source of energy in stars more massive than our Sun. It defines the energy production and the duration contributes in determining the lifetime of massive stars. The cycle is an important tool for the determination of the age of globular clusters. Radiative capture p + 14N →15O + γ, at energies of astrophysical interest, is one of the important processes in the CNO cycle. In this project, we apply a potential model to describe both non-resonant and resonant reactions in the channels where radiative capture occurs through electric E1 transitions. We employed the R-matrix method to describe the reactions going via M1 resonant transitions, when it was not possible to correctly reproduce the experimental data by a potential model. The partial components of the astrophysical S-factor were calculated for all possible electric and magnetic dipole transitions in 15O. The linear extrapolated S-factor at zero energy (S(0)) is in good agreement with earlier reported values for all types of transitions considered in this work. Based on the value of the total astrophysical S-factor, depending on the collision energy, we calculate the nuclear reaction rates for p + 14N →15O + γ. The computed rates are in good agreement with the results of the NACRE II Collaboration.