It’s always okay to forgive someone, and it is not unusual for people experiencing the same thing having different takes on what it means. My guess is the slap is being interpreted as a more intimate response of betrayal than your girlfriend would have anticipated. Also, this prank was with the full cooperation, knowledge, and help of your girlfriend — and she didn’t get slapped. You both betrayed her with this prank and you were the one taking the punishment for it.
It is a dangerous game to tug on someone’s feelings of loss and abandonment as a prank. My suggestion? You and your girlfriend apologized for putting your friend in such a bad place, accept your friend’s apology, and work on re-establishing trust with each other.