问题
I'm working with PayTM web based payment gateway in ionic app. I used inAppBrowser to open that gateway and now I want to return back from the webpage to my app. How can I achieve it?
回答1:
Here is my code.
browser.on('loadstart').subscribe((e) => {
let compareURL = "https://myurl.com/folder_name/filename.php?CODE=XXXXX";
console.log(e.url);
if(e.url === compareURL){
this.navCtrl.setRoot(ConfirmationPage, {
orderId: this.orderId
})
browser.close();
console.log('browser closed');
}
}, err => {
console.error(err);
});
来源:https://stackoverflow.com/questions/54005137/how-to-return-back-to-app-from-inappbrowser-in-ionic-3