Iphone 5S charging problem


Replaced the battery from Iphone 5S with a new one from ebay, afterwards loudspeaker dead.
Replaced loudspeaker and dock connector unit, sound works again, everything works fine, except now the Iphone won’t charge anymore. Lighnting symbol in the upper corner appears, but battery percentage goes down, even after hours charging. Put the old connector unit back in place, iphone charges again but no sound. I’m missing something ?

Any help would be appreciated.