As I read it, the attack that triggers the retributive damage resolves, then the spell deals damage, then the attacker may continue attacking if they yet live. The "dire consequences" are activated by the attack roll, but "Creatures with multiple attacks take the damage after every attack" indicates that the damage does not interrupt the triggering action. It looks like an upgraded version of those "if you attack me with a non-reach melee weapon you take damage because I am on fire" spells.