In-app purchases taking long to pop up
I've been having issues with my app store where I do an in-app purchase in some games and it just takes so long for the pop up screen where I put in my password. I'm just left with a loading screen on the app for a long time. Sometimes the pop-up will come up and I put the password but it doesn't even process and say the purchase was successful. I've tried logging out and back into the app store but it still takes too long. What could be the issue?
iPhone 6s, iOS 11.2.5