Iframe solution is not working for https links.
Need to use RSA key encryption method provided by ccavenue mobile integration KIT.
Use the non-seamless mobile kit integration of php.
Add inappbrowser in application to visualize the ccavenue response.
$ cordova plugin add cordova-plugin-inappbrowser
After successful installation write the following code in the controller -
$scope.data = {
orderId: 1,
amount: 1,
};
$scope.ref = null;
$scope.getStateSecondWindow = function()
{
$scope.ref.executeScript(
{code: "localStorage.getItem('isCloseSelf')"},
function(data)
{
if (data == 'yes')
{
$scope.ref.close();
}
}
);
}
$scope.onSubmit = function(){
$scope.ref = window.open(CONFIG.BASE_URL + 'getRSA.php?orderId=' + $scope.data.orderId + '&amount=' + $scope.data.amount,'_blank','location=no');
$scope.ref.addEventListener('loadstart', function(event) { });
$scope.ref.addEventListener('loadstop', function(event) {
setInterval($scope.getStateSecondWindow, 5000);
});
$scope.ref.addEventListener('exit', function(event) { });
}
Refer the link for php code: https://github.com/manjitlatthe/ionic-php-ccavenue-integration