Adding total of first field for each number in the second field

Dears,

I need a script or command which can find the unique number from the second filed and against that number it adds the total of first field .

17215630 ,   0
907043 ,1
201050 ,10
394149 ,4
1964 ,9
17215630, 0
907043 ,1
201050, 10
394149 ,4
1964 ,9
1234234, 55
23 ,100
33 ,67

Shown below is the expected output

34431260,0
1814086,1
402100,10
788298,4
3928,9
1234234, 55
23 ,100
33 ,67

Please let me know how can I achieve this.

Regards,
XYZ

Unsorted:

 awk -F\, '{a[$2]+=$1}END{for (i in a ){printf("%d ,%d\n", a,i)}}'  file
 ruby -F"," -ane 'BEGIN{h={};h.default=0};h[$F[1].to_i]+=$F[0].to_i;END{h.each_pair{|x,y|puts "#{y},#{x}\n" } }' file