Hi I have problem in making web view. is Like if user hit payment button is should be open in browser by default . but I m not getting how to integrate payment gateway in web view.
Here is my payment.html
<ion-content padding="'true'" class="has-header">
<form class="list">
<ion-radio>Credit Card</ion-radio>
<ion-radio>Net banking</ion-radio>
<ion-radio>COD</ion-radio>
</form>
<!-- <button class="button button-calm button-block ">PAY</button> -->
<button id="btnSubmit" ng-click="paymentOpen()">Make a Payment</button>
</ion-content>
and here is my controller for payment
.controller(‘paymentCtrl’, function ($scope, $ionicPopup, $state,$location,$ionicHistory,$cordovaInAppBrowser) {
function handleResponse(res) {
if (typeof res != 'undefined' && typeof res.paymentMethod != 'undefined' && typeof res.paymentMethod.paymentTransaction != 'undefined' && typeof res.paymentMethod.paymentTransaction.statusCode != 'undefined' && res.paymentMethod.paymentTransaction.statusCode == '0300') {
// success code
} else {
// error code
}
};
$scope.paymentOpen = function () {
//e.preventDefault();
var configJson = {
'tarCall': false,
'features': {
'showPGResponseMsg': true
},
'consumerData': {
'deviceId': 'WEBSH2', //possible values 'WEBSH1', 'WEBSH2' and 'WEBMD5'
'token': 'xxxxxxxxxxxxxxxxxxxx45678gfrhh',
'returnUrl': 'https://www.tekprocess.co.cxcxcxccccxxx',
'responseHandler': handleResponse,
'paymentMode': 'all',
'merchantId': 'T14',
'consumerId': 'c96',
'consumerMobileNo': '9876543210',
'consumerEmailId': 'test@test.com',
'txnId': '1481197581115', //Unique merchant transaction ID
'items': [{
'itemId': 'test',
'amount': '10',
'comAmt': '0'
}]
}
};
new Card(configJson).init();
}
// $scope.paymentOpen2 = window.open($scope.paymentOpen, {openExternal: true});
})
please help me out how to integrate this json config in web view.
Advance thanks