Implementing 3DS in InAppBrowser


#1

Hi all,

I’m currently writing an app which use 3DS (3DSecure) but I can’t make it work on my mobile device (currently testing on Android).

When I get the Bank URL, I window.open this, post in it, it redirects to the 3DSecured web page, I can authenticate, but I just can’t close the inAppBrowser at the end of the process.

Here is the popup the user clicks :

function showPopup3ds($ionicPopup, $scope, $window) {
	var myPopup = $ionicPopup.show({
		title: 'Paiement sécurisé',
		subTitle: 'Confirmez votre transaction grâce au 3D Secure fourni par votre établissement bancaire.',
		scope: $scope,
		buttons: [{
			text: '<b>Continuer</b>',
			type: 'button-positive',
			onTap: function(e) {
				// creating the 'formresult' window with custom features prior to submitting the form
				ref = $window.open($scope.p3ds.threeDSEncodedPareq, 'formresult', 'toolbar=0,scrollbars=0');

				// <form id="redirectForm" name="redirectForm" target="formresult" action="{{p3ds.threeDSAcsUrl | trusted }}" method="POST" class="hide"> 
				document.forms['redirectForm'].submit();
				e.preventDefault();
			}
		}]
	});
}

And then, juste after :

showPopup3ds($ionicPopup, $scope, $window);
socket.on(result.veResPAReqInfo.threeDSRequestId, function(data) {
	console.log(ref);
	ref.close();
	showPopupResult($ionicPopup, $scope, data.success);
})

But I can’t close it, or listen to any event because de page is redirected. It’s not like a new tab or new window, it’s a redirection.

I feel a bit desperate, I wish I could open a chrome tab or any other.

Wish you can help me.

Kai23


InAppBrowser always activated