If we take equation $(1)$ away from equation $(5)$ we obtain $e=3$.
Similarly:
$(6)-(2)$ gives that $f=3$,
$(7)-(3)$ gives that $g=3$,
$(5)-(2)$ gives that $a=3$,
$(6)-(3)$ gives that $b=3$ and
$(7)-(4)$ gives that $c=3$.
Then using equation $(1)$ we find that $d=7$.
So the code is $3337333$ and the sum of the digits is $25$.