Third-party opened pages

I am trying to automate a Hybrid application using Appium , the application is using a third party payment gateway, so it opens their page in a webview when the user has to pay using a VISA card. the driver is not able to get the page source for the payment page.
I got the URL of the driver and it is showing the URL of the application instead of showing the URL of the payment page, so the question is how could I make the driver detect the newly opened page?