  The astrophysical factor of $^8$B($p$,$\gamma$)$^9$C at zero energy,
$S_{18}(0)$, is determined by a three-body coupled-channels analysis of the
transfer reaction $^{8}$B($d$,$n$)$^{9}$C at 14.4 MeV/nucleon. Effects of the
breakup channels of $d$ and $^9$C are investigated with the
continuum-discretized coupled-channels method. It is found that, in the initial
and final channels, respectively, the transfer process through the breakup
states of $d$ and $^9$C, its interference with that through their ground states
in particular, gives a large increase in the transfer cross section. The
finite-range effects with respect to the proton-neutron relative coordinate are
found to be about 20%. As a result of the present analysis, $S_{18}(0)=22 \pm
6~{\rm eV~b}$ is obtained, which is smaller than the result of the previous
distorted-wave Born approximation analysis by about 51%.
