Raphinha opened the scoring in the 52nd minute and Ferran Torres found the back of the net in the 75th and 85th minutes to lift Barcelona to a 3-2 win against Borussia Dortmund.