Hi friends,Please help me.I called the in app browser function.After transaction is done in app browser the inappbrowser window should close automatically .
listernBrowser() method handles this event.But window not closing automatically.Please help…
My Code:
private childWindow;
…
constructor(
private iab: InAppBrowser,
) {
this.listenBrowser();
}
listenBrowser()
{
window.addEventListener(“message”, (e) => {
try {
this.childWindow.close();
self.close();
} catch (error) {
console.log(error);
}
}, false);
}
}
openPayment(){
this.childWindow = this.iab.create(this.funService.apiUrl,’_blank’);
}