The CP violation observables S and C in the decay channel B0→D+D- are determined from a sample of proton-proton collisions at center-of-mass energies of 7 and 8 TeV, collected by the LHCb experiment and corresponding to an integrated luminosity of 3 fb-1. The observable S describes CP violation in the interference between mixing and the decay amplitude, and C parametrizes direct CP violation in the decay. The following values are obtained from a flavor-tagged, decay-time-dependent analysis: S=-0.54-0.16+0.17(stat)±0.05(syst), C=0.26-0.17+0.18(stat)±0.02(syst). These values provide evidence for CP violation at a significance level of 4.0 standard deviations. The phase shift due to higher-order standard model corrections is constrained to a small value of Δφ=-0.16-0.21+0.19 rad.