(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["add-money-add-money-module"],{

/***/ "2DXL":
/*!*************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/add-money/add-money.page.html ***!
  \*************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<ion-content fullscreen class=\"bg_color1\" *ngIf=\"!webpayment\">\r\n\t<!-- <div (click)=\"transactionStatus('1635499479099')\"><h1>Click</h1></div> -->\r\n\t<div class=\"header-wrap\">\r\n\t\t<ion-header class=\"\">\r\n\t\t\t<ion-toolbar>\r\n\t\t\t\t<ion-buttons slot=\"start\" class=\"on-search-hide\">\r\n\t\t\t\t\t<ion-menu-button></ion-menu-button>\r\n\t\t\t\t</ion-buttons>\r\n\t\t\t\t<ion-title class=\"wallet-title\">\r\n\t\t\t\t\t{{'Add Wallet' | translate}}\r\n\r\n\t\t\t\t</ion-title>\r\n\t\t\t</ion-toolbar>\r\n\t\t</ion-header>\r\n\t\t<ion-list-header>\r\n\t\t\t<div class=\"wal-bal\">\r\n\t\t\t\t<ion-grid>\r\n\t\t\t\t\t<ion-row class=\"row1\">\r\n\t\t\t\t\t\t<ion-col size=\"6\" (click)=\"addMoney()\">\r\n\t\t\t\t\t\t\t<ion-icon name=\"wallet\"></ion-icon>\r\n\t\t\t\t\t\t\t<p class=\"bal-text\">Balance</p>\r\n\t\t\t\t\t\t\t<h1 class=\"bal-text\">{{walletData?.balance | currency:'INR':'symbol':'0.0'}}</h1>\r\n\t\t\t\t\t\t</ion-col>\r\n\r\n\t\t\t\t\t\t<ion-col size=\"6\">\r\n\t\t\t\t\t\t\t<ion-icon name=\"shield-half\"></ion-icon>\r\n\t\t\t\t\t\t\t<p class=\"bal-text\">Deposit</p>\r\n\t\t\t\t\t\t\t<h1 class=\"bal-text\">{{walletData?.sec_deposit | currency:'INR':'symbol':'0.0'}}</h1>\r\n\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t</ion-row>\r\n\r\n\t\t\t\t</ion-grid>\r\n\t\t\t\t<ion-grid>\r\n\t\t\t\t\t<ion-row class=\"row3\">\r\n\t\t\t\t\t\t<!-- <ion-col size=\"6\">\r\n\t\t\t\t\t\t\t<p>Transactions</p>\r\n\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t<ion-col size=\"6\" (click)=\"addMoney()\">\r\n\t\t\t\t\t\t\t<p>Add Money</p>\r\n\t\t\t\t\t\t</ion-col> -->\r\n\t\t\t\t\t</ion-row>\r\n\t\t\t\t</ion-grid>\r\n\t\t\t</div>\r\n\t\t</ion-list-header>\r\n\t</div>\r\n\r\n\r\n\r\n\t<ion-list lines=\"none\">\r\n\t\t<div class=\"tab_container\">\r\n\r\n\t\t\t<div class=\"form form-item\">\r\n\t\t\t\t<h1 class=\"bal-text pay-text\"> {{paytext}}</h1>\r\n\t\t\t\t<ion-list lines=\"none\">\r\n\t\t\t\t\t<ion-range step=\"100\" min=\"100\" pin=\"true\" max=\"{{walletData?.suggested_amount}}\" color=\"secondary\"\r\n\t\t\t\t\t\t[(ngModel)]=\"amount\">\r\n\t\t\t\t\t\t<ion-label slot=\"start\">100</ion-label>\r\n\t\t\t\t\t\t<ion-label slot=\"end\">{{walletData?.suggested_amount}}</ion-label>\r\n\t\t\t\t\t</ion-range>\r\n\r\n\t\t\t\t\t<ion-item lines=\"none\" class=\"item-has-focus\">\r\n\t\t\t\t\t\t<ion-label position=\"floating\">{{'Add amount' | translate}}</ion-label>\r\n\t\t\t\t\t\t<ion-input min=\"10\" max=\"100\" type=\"number\" [(ngModel)]=\"amount\" placeholder=\"Amount\" readonly=\"true\" class=\"item-has-focus\"></ion-input>\r\n\t\t\t\t\t</ion-item>\r\n\t\t\t\t\t<!-- <div class=\"form-item\">\r\n\t\t\t\t\t<ion-range step=\"100\" min=\"100\" pin=\"true\" max=\"{{walletData?.max_balance}}\" color=\"secondary\"\r\n\t\t\t\t\t\t[(ngModel)]=\"amount\">\r\n\t\t\t\t\t\t<ion-label slot=\"start\">100</ion-label>\r\n\t\t\t\t\t\t<ion-label slot=\"end\">{{walletData?.max_balance}}</ion-label>\r\n\t\t\t\t\t</ion-range>\r\n\t\t\t\t\t\t<ion-label >Add amount </ion-label>\r\n\t\t\t\t\t\t<ion-input type=\"number\" value=\"50000\" [(ngModel)]=\"amount\" placeholder=\"Amount\"></ion-input>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t</div>-->\r\n\t\t\t\t</ion-list>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ion-list>\r\n\r\n\r\n</ion-content>\r\n<ion-content fullscreen class=\"bg_color1\" *ngIf=\"webpayment\">\r\n\t<iframe class= 'webPage' name= \"eventsPage\" [src]=\"payOnBrowser()\" allowfullscreen width=\"100%\" height=\"100%\">\r\n\t</iframe>\r\n</ion-content>\r\n<ion-footer>\r\n\t<ion-toolbar *ngIf=\"amount > 0\">\r\n\t\t<ion-button size=\"large\" shape=\"block\" class=\"btn\" (click)=\"payment()\">{{'Pay' | translate}}</ion-button>\r\n\t</ion-toolbar>\r\n\t<ion-toolbar *ngIf=\"upi == true && paymentdone == false\">\r\n\t\t<ion-button size=\"default\" class=\"btn\" slot=\"end\" color=\"medium\" (click)=\"toggelupi()\">Cancel</ion-button>\r\n\t\t<ion-button size=\"default\" class=\"btn\" slot=\"end\" (click)=\"pay()\">Submit</ion-button>\r\n\t</ion-toolbar>\r\n\t<ion-toolbar *ngIf=\"paymentdone == true\">\r\n\t\t<ion-button size=\"default\" class=\"btn\" slot=\"end\" color=\"medium\" (click)=\"finesh()\">Finish</ion-button>\r\n\t</ion-toolbar>\r\n</ion-footer>");

/***/ }),

/***/ "XgBl":
/*!***********************************************!*\
  !*** ./src/app/add-money/add-money.page.scss ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("ion-content .header-wrap {\n  background-image: var(--background-banner);\n  background-repeat: round;\n  background-origin: padding-box;\n}\nion-content ion-toolbar {\n  padding: 10px;\n  --background:auto;\n}\nion-content ion-list-header {\n  text-align: center;\n  background-size: cover;\n}\nion-content ion-list-header .row1 {\n  margin-top: 20px;\n  /*.add-btn{\n      border-radius: unset;\n      border: unset !important;\n      font-size: 20px !important;\n  }*/\n}\nion-content ion-list-header .row3 {\n  margin-bottom: 15px;\n}\nion-content ion-list-header .row3 p {\n  color: var(--white);\n  font-style: normal;\n  font-weight: 600;\n  font-size: 18px;\n}\nion-content ion-list-header .wal-bal {\n  padding-bottom: 15%;\n  width: 98%;\n}\nion-content ion-list-header .bal-text {\n  /* Auto Layout */\n  font-style: normal;\n  font-weight: bold;\n  font-size: 16px;\n  margin: 2px;\n  color: var(--white);\n}\nion-content ion-list-header h1.bal-text {\n  font-size: var(--sub_title_font_size);\n  margin: 8px;\n}\nion-content ion-list-header .add-btn {\n  font-size: 18px;\n  margin-left: 5px;\n}\nion-content .pay-text {\n  color: var(--primary);\n  font-weight: bold;\n  font-size: var(--title_font_size);\n}\nion-content ion-header ion-menu-button {\n  /* Menu Icon */\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: flex-start;\n  padding: 10px;\n  position: static;\n  left: 10px;\n  top: 13px;\n  /* Inside Auto Layout */\n  flex: none;\n  order: 0;\n  flex-grow: 0;\n  margin: 0px 10px;\n}\nion-content ion-header ion-title {\n  margin-right: 25%;\n  /* Body/H1 */\n  font-style: normal;\n  font-weight: 900;\n  font-size: var(--title_font_size);\n  line-height: 128.91%;\n  /* identical to box height, or 26px */\n  color: #FFFFFF;\n  /* Inside Auto Layout */\n  flex: none;\n  order: 0;\n  flex-grow: 0;\n}\nion-content ion-header ion-title span {\n  text-align: right;\n  color: #FFFFFF;\n}\nion-content ion-header ion-icon {\n  top: -5px;\n  right: -45px;\n  position: absolute;\n}\nion-content .tab_container .form-item {\n  margin-top: 80px;\n}\nion-content .tab_container .form-item ion-list {\n  border-radius: unset;\n}\nion-content .tab_container .form-item ion-list ion-range {\n  color: var(--text-dark);\n}\nion-content .tab_container .form-item ion-item {\n  border: 0.5px solid var(--bg_light);\n  padding: 5px 5px 0 5px;\n}\nion-content .tab_container .form-item ion-item ion-label, ion-content .tab_container .form-item ion-item ion-input {\n  font-weight: 100 !important;\n  margin: 5px;\n  color: var(--text-dark) !important;\n}\nion-content ion-list {\n  margin-top: -20px;\n  border-radius: 25px;\n  position: relative;\n}\nion-content ion-list ion-card h4 {\n  color: var(--bg-color);\n  margin-left: 5%;\n}\nion-content ion-list h5 {\n  color: #4D4D4D;\n  font-style: normal;\n  font-weight: normal;\n  font-size: 16px;\n  margin: 5px 0 5px 0;\n  /* or 23px */\n  text-align: center;\n}\nion-content ion-list ion-icon {\n  font-size: 12px;\n  border: unset;\n}\nion-content ion-list .credit {\n  color: #6FCF97;\n}\nion-content ion-list .debit {\n  color: #FF7765;\n}\nion-content ion-list ion-col, ion-content ion-list ion-grid {\n  padding: 0px;\n}\nion-content ion-list ion-col.action-button {\n  padding: 5px !important;\n}\nion-content ion-list ion-col.action-button ion-button {\n  text-align: center;\n  height: 40px;\n  font-size: 14px;\n  margin: 15px;\n  --border-radius:10px !important;\n}\nion-content ion-list .com-np {\n  border: 0.5px solid var(--bg_light);\n  padding: 1px 5px;\n  border-radius: 6px;\n  color: #828282 !important;\n  background-color: #FBF686;\n  font-weight: 600 !important;\n}\nion-content ion-list .priv-np {\n  border: 0.5px solid var(--bg_light);\n  padding: 1px 5px;\n  border-radius: 6px;\n  color: #828282 !important;\n  background-color: #fff;\n  font-weight: 600 !important;\n}\nion-content ion-list .np {\n  margin-bottom: 7px !important;\n}\nion-content h1 {\n  color: var(--white);\n}\nion-content ion-icon {\n  font-size: 30px;\n  color: var(--white);\n  border-radius: 50%;\n  padding: 5px;\n  border: 1px solid var(--white);\n}\nion-content ion-list .inactive {\n  opacity: 0.5;\n}\nion-content.active {\n  bottom: 0;\n}\nion-footer {\n  text-align: center;\n  background: #fff;\n}\nion-footer ion-toolbar {\n  border-radius: 10px;\n  margin: auto;\n  width: 98%;\n  --color:#3083FF;\n  margin-bottom: 5px;\n}\nion-footer ion-toolbar .inactive {\n  color: #fff;\n}\nion-footer ion-toolbar ion-icon {\n  font-size: 26px;\n}\nion-footer.active {\n  bottom: -100px;\n}\n/*# sourceMappingURL=data:application/json;base64,  */");

/***/ }),

/***/ "bcHw":
/*!*******************************************************!*\
  !*** ./src/app/add-money/add-money-routing.module.ts ***!
  \*******************************************************/
/*! exports provided: AddMoneyPageRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddMoneyPageRoutingModule", function() { return AddMoneyPageRoutingModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var _add_money_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./add-money.page */ "m7as");




const routes = [
    {
        path: '',
        component: _add_money_page__WEBPACK_IMPORTED_MODULE_3__["AddMoneyPage"]
    }
];
let AddMoneyPageRoutingModule = class AddMoneyPageRoutingModule {
};
AddMoneyPageRoutingModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        imports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forChild(routes)],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"]],
    })
], AddMoneyPageRoutingModule);



/***/ }),

/***/ "m7as":
/*!*********************************************!*\
  !*** ./src/app/add-money/add-money.page.ts ***!
  \*********************************************/
/*! exports provided: AddMoneyPage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddMoneyPage", function() { return AddMoneyPage; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _raw_loader_add_money_page_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! raw-loader!./add-money.page.html */ "2DXL");
/* harmony import */ var _add_money_page_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./add-money.page.scss */ "XgBl");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ionic/angular */ "TEn/");
/* harmony import */ var src_services_common_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/services/common.service */ "FBGF");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "tyNb");
/* harmony import */ var src_services_wallet_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/services/wallet.service */ "vjAt");
/* harmony import */ var _ionic_native_in_app_browser_ngx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic-native/in-app-browser/ngx */ "m/P+");
/* harmony import */ var src_services_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/services/constants */ "k8oS");
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1");











let AddMoneyPage = class AddMoneyPage {
    constructor(navCtrl, _commonService, _walletService, _iab, _route, sanitizer) {
        this.navCtrl = navCtrl;
        this._commonService = _commonService;
        this._walletService = _walletService;
        this._iab = _iab;
        this._route = _route;
        this.sanitizer = sanitizer;
        this.fileName = 'add-money.page.ts';
        this.webpayment = false;
        this.tagId = '';
        this.upi = false;
        this.paymentdone = false;
        this.beginPaymentObj = null;
        this.config = {
            allowNumbersOnly: true,
            length: 6,
            allowKeyCodes: ['numbers'],
            isPasswordInput: true,
            inputStyles: {
            //  'color': 'white',
            //  'width': '30px',
            //  'height': '50px',
            //  'border': 'none',
            //  'background': 'white'
            // 'padding-left':'50px'
            },
            containerStyles: {
            //  'color': 'white',
            //  'width': '30px',
            //  'height': '50px',
            //  'border': 'none',
            //  'background': 'white'
            //'padding-left': '50px'
            }
        };
        this.payType = JSON.parse(this._route.getCurrentNavigation().extras.queryParams.data);
        this.payType = this.payType.op;
        if (this.payType === 'BAL') {
            this.paytext = 'Wallet Recharge';
        }
        else {
            this.paytext = 'Security Deposit Recharge';
        }
        this.amount = 100;
        console.log({ tst: this.payType });
        this.otherSelect = false;
    }
    ngOnInit() {
        try {
            this._walletService.checkBalance({ mode: this.payType }).subscribe(res => {
                if (res.status === true) {
                    this._commonService.log({ response: res });
                    this.walletData = res.data;
                }
            });
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'ngOnInit()',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    submit() {
        try {
            this._commonService.simpleAlert('Saved', 'You have successfully raised a new Support Request. Your request ID is T202107C1000105');
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'submit()',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    openModule(list) {
        try {
            //console.log(list);
            if (list.routeTo == null)
                return false;
            this._commonService.routeToPage(list.routeTo, {
                op: list.option
            });
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'openModule(list)',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    payment() {
        try {
            this._walletService.beginPayment({ amount: this.amount, mode: this.payType }).subscribe((res) => Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
                if (res.status === true) {
                    this._commonService.log({ response1: res });
                    this.walletData = res.data;
                    let ng = this;
                    let deviceInfo = yield this._commonService.getDeviceInfo();
                    if (deviceInfo.platform !== "web") {
                        this.webpayment = false;
                        setTimeout(function () {
                            ng.payOnDevice(res.data);
                        }, 1000);
                    }
                    else {
                        this.webpayment = true;
                        this.beginPaymentObj = res.data;
                        this.payOnBrowser();
                    }
                }
                else {
                    this._commonService.errorToast("Error in payment at step1. Please try again");
                }
            }));
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'payment()',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    payOnBrowser() {
        window.open("https://driver.1pay.devops.merce.co/index.php", '_self', 'location=no');
        //let url = Enums.CONSTANTS.PG_MERCE_URL + "?merchantId=" + obj.merchant_id + "&reqData=" + encodeURIComponent(obj.pg_request_enc) + "&pg_url=" + encodeURIComponent(obj.pg_url);
        // console.log({
        //   xxx:obj,
        //   url:url
        // })
        //this.beginPaymentObj = null;
        /*
            let obj = this.beginPaymentObj;
            let url = "https://driver.1pay.devops.merce.co/index.php";
            return this.sanitizer.bypassSecurityTrustResourceUrl(url);
            */
    }
    payOnDevice(obj) {
        try {
            let cnt = 0;
            let autoCloseFlag = 'n';
            this._commonService.log({
                paymentObj: obj
            });
            let url = src_services_constants__WEBPACK_IMPORTED_MODULE_9__["CONSTANTS"].PG_MERCE_URL + "?merchantId=" + obj.merchant_id + "&reqData=" + encodeURIComponent(obj.pg_request_enc) + "&pg_url=" + encodeURIComponent(obj.pg_url);
            //_system opens in browser
            const browser = this._iab.create(url, '_blank', "hidden=no,location=no,clearsessioncache=yes,clearcache=yes,beforeload=yes,EnableViewPortScale=yes");
            let ng = this;
            setTimeout(function () {
                if (autoCloseFlag == 'n') {
                    ng._commonService.notificationToast('Time expires', 3000);
                    browser.close();
                }
            }, src_services_constants__WEBPACK_IMPORTED_MODULE_9__["CONSTANTS"].API_TIMEOUT);
            browser.on('loadstop').subscribe(event => {
                //browser.insertCSS({ code: "body{color: blue;}" });
                //alert('loadstop: >>>>> ' + JSON.stringify(event));
                //|| event.url.includes("TranVbyV")
                if (event.url.includes("TranVbyV")) {
                    cnt++;
                    if (cnt == 2) {
                        autoCloseFlag = 'y';
                        browser.close();
                        this.transactionStatus(obj.txn_id);
                        cnt = 0;
                    }
                }
                if (event.url.includes("respHandlerDemoBank")) {
                    autoCloseFlag = 'y';
                    browser.close();
                    this.transactionStatus(obj.txn_id);
                }
            });
            browser.on('exit').subscribe(event => {
                autoCloseFlag = 'y';
                if (!event.url.includes("respHandlerDemoBank")) {
                    //let sc = "alert('exit listener: '+JSON.stringify(event))";
                    //browser.executeScript({ code: sc });
                }
            });
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'payOnDevice(obj)',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    transactionStatus(txt_id) {
        this._walletService.getTransactionStatus({ txt_id: txt_id }).subscribe(res => {
            console.log({
                txnResp: res
            });
            if (res.status === true) {
                this._commonService.log({ response: res });
                this._commonService.simpleAlert(this.paytext + '', 'Your txn_id: ' + txt_id + ' txn_status: ' + res.data.txnStatus);
                //this._route.navigate(['/wallet']);
                this._commonService.routeToPage('/wallet', {});
            }
            else {
                this._commonService.simpleAlert(this.paytext + '', 'Your txn_id: ' + txt_id + ' message:' + res.message);
                //this._route.navigate(['/wallet']);
                this._commonService.routeToPage('/wallet', {});
            }
        }, (error) => Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            this._commonService.simpleToast('Your txn_id: ' + txt_id + ' transaction failed for  error: ' + error);
            this._commonService.simpleToast('Transaction id is ' + txt_id);
            this._commonService.routeToPage('/wallet', {});
        }));
    }
    inAppBrowserdemo(obj) {
        try {
            this._commonService.log({
                paymentObj: obj
            });
            let url = "https://driver.1pay.devops.merce.co/demo.php?merchantId=" + obj.merchant_id + "&reqData=" + encodeURIComponent(obj.pg_request_enc) + "&pg_url=" + encodeURIComponent(obj.pg_url);
            let frm1 = '<form id="payment" action="' + obj.pg_url + '" method="post" enctype="application/x-www-form-urlencoded"><input type="hidden" name="merchantId" value="' + obj.merchant_id + '"><input type="hidden" name="reqData" value="' + obj.pg_request_enc + '"></form>';
            let htmlForm = 'alert("Alert from InAppBrowser1"); var div = document.createElement("div"); div.id = "myapp-merce"; document.body.appendChild(div); document.getElementById("myapp-merce").innerHTML = ' + frm1 + ';document.getElementById("payment").submit();alert("Alert from InAppBrowser2");';
            //document.getElementById("payment").submit();
            let test = 'alert("ggg");var a=5;var b=6; alert("sum"+a+b);';
            this._commonService.log({
                formdata: htmlForm
            });
            //_system opens in browser 
            const browser = this._iab.create(url, '_blank', "hidden=no,location=no,clearsessioncache=yes,clearcache=yes,beforeload=yes,EnableViewPortScale=yes,usewkwebview=no");
            //
            //setTimeout(function() { alert('closing the inappbrowser: ');browser.close(); }, 5000);
            browser.on('loadstart').subscribe(event => {
                alert('loadstart: ' + JSON.stringify(event));
            });
            browser.on('loadstop').subscribe(event => {
                //browser.insertCSS({ code: "body{color: blue;}" });
                alert('loadstop: ' + JSON.stringify(event));
                if (event.url.includes("respHandlerDemoBank")) {
                    browser.close();
                }
                //browser.executeScript({code: "(function() { alert('Load stop event: ');testfun(); })()"});
                //browser.close();
            });
            browser.on('exit').subscribe(event => {
                alert('exit: ' + JSON.stringify(event));
                let sc = "alert('exit: '+JSON.stringify(event))";
                browser.executeScript({ code: sc });
            });
            browser.on('beforeload').subscribe(event => {
                alert('beforeload: ' + JSON.stringify(event));
                //browser.executeScript({code: "(function() { alert('beforeload event: '); })()"});
            });
            browser.on('message').subscribe(event => {
                alert('message: ' + JSON.stringify(event));
                //browser.executeScript({code: "(function() { alert('message event: '); })()"});
            });
            browser.on('loaderror').subscribe(event => {
                alert('loaderror: ' + JSON.stringify(event));
                //browser.executeScript({code: "(function() { alert('loaderror event: '); })()"});
            });
            //browser.show();
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'payOnDevice(obj)',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    toggelupi() {
        try {
            if (this.upi == true)
                this.upi = false;
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'toggelupi()',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    pay() {
        try {
            this.paymentdone = true;
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'pay()',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    finesh() {
        try {
            this.upi = false;
            this.paymentdone = false;
            this.amount = 0;
            this._commonService.routeToPage('wallet-recharge', {});
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'finesh()',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    showPwd() {
        try {
            this.config.isPasswordInput = false;
            console.log(this.config);
        }
        catch (error) {
            let obj = {
                fileName: this.fileName,
                functionName: 'showPwd()',
                error: error
            };
            this._commonService.systemException(obj);
        }
    }
    addMoney() {
    }
};
AddMoneyPage.ctorParameters = () => [
    { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_4__["NavController"] },
    { type: src_services_common_service__WEBPACK_IMPORTED_MODULE_5__["CommonService"] },
    { type: src_services_wallet_service__WEBPACK_IMPORTED_MODULE_7__["WalletService"] },
    { type: _ionic_native_in_app_browser_ngx__WEBPACK_IMPORTED_MODULE_8__["InAppBrowser"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_10__["DomSanitizer"] }
];
AddMoneyPage = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-add-money',
        template: _raw_loader_add_money_page_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_add_money_page_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
    }),
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_4__["NavController"], src_services_common_service__WEBPACK_IMPORTED_MODULE_5__["CommonService"], src_services_wallet_service__WEBPACK_IMPORTED_MODULE_7__["WalletService"], _ionic_native_in_app_browser_ngx__WEBPACK_IMPORTED_MODULE_8__["InAppBrowser"], _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"], _angular_platform_browser__WEBPACK_IMPORTED_MODULE_10__["DomSanitizer"]])
], AddMoneyPage);



/***/ }),

/***/ "xUdR":
/*!***********************************************!*\
  !*** ./src/app/add-money/add-money.module.ts ***!
  \***********************************************/
/*! exports provided: AddMoneyPageModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddMoneyPageModule", function() { return AddMoneyPageModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "mrSG");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "ofXK");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ "3Pt+");
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ngx-translate/core */ "sYmb");
/* harmony import */ var ng_otp_input__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ng-otp-input */ "9OaD");
/* harmony import */ var _ngx_formly_ionic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ngx-formly/ionic */ "8mWu");
/* harmony import */ var _ngx_formly_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ngx-formly/core */ "0FS3");
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic/angular */ "TEn/");
/* harmony import */ var _add_money_routing_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./add-money-routing.module */ "bcHw");
/* harmony import */ var _add_money_page__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./add-money.page */ "m7as");
/* harmony import */ var src_pipes_shared_module__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/pipes/shared.module */ "hFmk");






//import { FormatDatePipe } from '../../pipes/format-date.pipe';






let AddMoneyPageModule = class AddMoneyPageModule {
};
AddMoneyPageModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"],
            ng_otp_input__WEBPACK_IMPORTED_MODULE_5__["NgOtpInputModule"],
            _ionic_angular__WEBPACK_IMPORTED_MODULE_8__["IonicModule"],
            _ngx_translate_core__WEBPACK_IMPORTED_MODULE_4__["TranslateModule"],
            _ngx_formly_ionic__WEBPACK_IMPORTED_MODULE_6__["FormlyIonicModule"],
            _ngx_formly_core__WEBPACK_IMPORTED_MODULE_7__["FormlyModule"].forRoot({ extras: { lazyRender: true } }),
            _add_money_routing_module__WEBPACK_IMPORTED_MODULE_9__["AddMoneyPageRoutingModule"],
            src_pipes_shared_module__WEBPACK_IMPORTED_MODULE_11__["SharedModule"]
        ],
        declarations: [_add_money_page__WEBPACK_IMPORTED_MODULE_10__["AddMoneyPage"]] //FormatDatePipe
    })
], AddMoneyPageModule);



/***/ })

}]);
//# sourceMappingURL=add-money-add-money-module-es2015.js.map