01 -
Warm the milk in a saucepan until steaming. In a bowl, whisk sugar, salt, egg yolks, and cornstarch until smooth. Slowly whisk in about half of the hot milk, then return everything to the saucepan. Cook over medium heat, whisking constantly, until thick and bubbling, about 2-3 minutes.
02 -
Remove the pastry cream from the heat and stir in the butter and vanilla. Transfer to a bowl, press plastic wrap directly onto the surface, and refrigerate until cold and firm, at least 2 hours.
03 -
Heat the oven to 350°F. Grease and flour a 9-inch round cake pan, then line the bottom with parchment paper.
04 -
Whisk the flour, baking powder, and salt in a bowl. In a separate bowl, beat the butter and sugar until pale and fluffy, about 3 minutes. Beat in the eggs one at a time, then add vanilla. Mix in the dry ingredients in three additions, alternating with the milk, just until smooth.
05 -
Spread the batter in the prepared pan. Bake for 28-32 minutes, until the top springs back and a toothpick inserted in the center comes out clean. Cool in the pan for 10 minutes, then turn out onto a rack and cool completely.
06 -
Use a serrated knife to split the cooled cake into two layers. Place the bottom layer on a serving plate and spread the chilled pastry cream evenly over it, leaving a 1/2-inch border. Set the top cake layer over the cream.
07 -
Place chopped chocolate in a heatproof bowl. Heat the cream until steaming, then pour it over the chocolate. Let stand for 1 minute, then stir until smooth. Stir in corn syrup, if using, and vanilla.
08 -
Let the ganache cool until slightly thickened but still pourable, about 5-10 minutes. Pour it over the center of the cake and nudge it toward the edges. Chill for at least 30 minutes before slicing.