I'm trying to integrate PayU payment services in my app. All is done in WKWebview. The user hits the payment button, web view pops up and in the web view the payU service is loaded. All works fine.
The problem appears when the user gets notification from the bank at the end of the navigation. If he clicks on notification and accepts the payment in his bank (clicking notification means he is navigated to his bank app), my app is suspended and lo longer executing JS methods. Because of that, if the user goes back to my app, he still sees the last screen from the web view saying 'confirm the payment in the bank', but it should now show accepted or failed payment. My question is: how to make JS methods run in background and not be suspended? Is there a way for that? Anyone has ideas?