The $CP$ violation observables $S$ and $C$ in the decay channel $B^0 !rightarrow 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: begin{align*} S &= -0.54 , ^{+0.17}_{-0.16} , text{(stat)} pm 0.05 , text{(syst)},, ewline C &= phantom{-}0.26 , ^{+0.18}_{-0.17} , text{(stat)} pm 0.02 , text{(syst)},. end{align*} 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 begin{align*} Deltaphi = -0.16,^{+0.19}_{-0.21},text{rad},. end{align*}