I just bought a portable charger and it's not working?

I just bought it yesterday yesterday night I charged it on my iPhone it was fine then today I put the portable charger to charge for like 4 hours and I plugged my iPhone back in with the charger and it charges for about 3 seconds then it discharged I tryied changing the usb cables but it does he same i don't know what to do yesterday it was working fine?

You probably bought a cheap one and are currently reaping the rewards.

I think, the problem is in your chargers pen. It been damage while you using it in different divices…

Hi so take it back switch mode power supplies are so cheaply made.

If by "portable charger" you mean a battery with a USB socket then you need to read the instructions first. It is impossible to charge it from an iPhone. It worked previously because such batteries come with a half-load of charge. They must first be fully charged before they are brought into use. The instruction leaflet will explain how.