Hi,
Just verifying that it worked each time after you factory reset the phone twice more in the last 2 months and now it doesn’t work again, is this correct?
If so try some of the following to see if you can narrow down the problem:
a) Check that the Play Store app is up to date. Open the Play Store app and go to ''Settings > About > Play Store Version,'' tap to enter and check if it says that an update is required or not. If it is, tap and follow the prompts. See if downloading works now
b) Start the phone in [https://www.techjunkie.com/samsung-galaxy-j5-turn-safe-mode-on-or-off/|safe mode] and then check if you can download using the Play Store app. If you can then a downloaded app is the cause of the problem. The trick is to find out which one.
c) Clear the [https://www.techjunkie.com/how-to-clear-cache-on-galaxy-j5/|system cache] (scroll down the page to find out how to do this) and then check if you can download OK