const getPaymentTypes = ( fadmid, funivcode, degree, fheadcode, fappno, fcollcode ) => { let api = ""; let fentry = ""; if (fcollcode != "ALL" && funivcode == "060") fentry = fcollcode; else fentry = degree; if (funivcode == "060" || funivcode == "098" || funivcode == "P055") { api = "src/getPaymentTypes.php?a=getPaymentTypes"; } else { api = "../../src/getPaymentTypes.php?a=getPaymentTypes"; } $.ajax({ type: "GET", url: api, data: "univcode=" + funivcode + "°ree=" + fentry, success: function (response) { var { status, error_code, paytype } = JSON.parse(response); if (error_code == 0) { var paymentTypes = `
`; paytype.forEach((el, i) => { var prntChallan = ""; if (el.bank_name.toLowerCase() == "razorpay") { var button = ""; $.ajax({ type: "POST", async: false, data: "appno=" + fappno + "&funivcode=" + funivcode + "°ree=" + fentry + "&fheadcode=" + fheadcode, url: "../../razorpay/pay.php", success: function (responce) { button = responce; }, }); prntChallan += button; } else { if ( el.bank_name.toLowerCase() == "post office" || el.bank_name.toLowerCase() == "bank" || el.bank_name.toLowerCase() == "cash at college" ) { } prntChallan += el.bank_name.toLowerCase().includes("post office") || el.bank_name.toLowerCase().includes("bank") || el.bank_name.toLowerCase().includes("cash") || el.bank_name.toLowerCase().includes("cash at college") == true ? `Print Application` : `Make Payment`; } paymentTypes += `
logo
${el.bank_name}

${el.charges}

${prntChallan}
`; }); paymentTypes += `
`; // return paymentTypes; $("#loadPayType").html(paymentTypes); } }, }); }; function gotoPayments(ftype) { let pages = ""; if (hosturl == "universitysolutions.in") pages = "../../admission/html_modules/paymentDetails.html"; else pages = "../../html_modules/paymentDetails.html"; $("#app-personal").load(pages, () => { getStudFeeAdm(ftype); }); } function getStudFeeAdm(ftype) { var funivcode = sessionStorage.getItem("univ"); let regno = document.getElementById("fappno").value; $.ajax({ type: "GET", url: $host_url + "getStudFeeAdm", data: "®no=" + regno + "&univcode=" + funivcode + "&ftype=" + ftype, success: function (res) { let table = ``; if (res.error_code === 0) { let totalAmount = 0; let totalPaid = 0; let totalBal = 0; for (var i = 0; i < res.data.length; i++) { window.fheadcode = res.data[i].fheadcode; totalAmount += parseFloat(res.data[i].ffee); totalPaid += parseFloat(res.data[i].fpaid); totalBal += parseFloat(res.data[i].fbal); table += ``; } // table += ` // // `; // table += ` // // `; table += ``; // table += ` // // `; } else { table += ``; } table += ``; table += `
Sl. No. App. No. Head Name Amount Paid Balance
${i + 1} ${res.data[i].fappno} ${res.data[i].fheadcode} ${res.data[i].ffee} ${res.data[i].fpaid} ${res.data[i].fbal}
Total Amount: ${parseFloat( // totalAmount // )}
Total Paid: ${parseFloat( // totalPaid // )}
Amount to be Paid: ${parseFloat( totalBal )}   
// // //
No data fount
`; $("#paydata").html(table); }, }); } function makepayment(funivcode, bank, appno, fdegree, fheadcode, fadmid) { if (location.protocol != "https:") { var protocol = "http://"; } else { var protocol = "https://"; } var urlarr = window.location.pathname.split("/"); var $url = protocol + window.location.host + "/"; var $hoststr = ""; for (var j = 1; j < urlarr.length - 1; j++) { $hoststr += window.location.pathname.split("/")[j] + "/"; } switch (bank) { case "Paytm": /*console.log($hoststr);*/ if (funivcode == "055") { window.location = $url + $hoststr + "/sjbit_payment.php?productinfo=" + appno + "&funivcode=" + funivcode; } else { window.location = $url + $hoststr + "/Paytm/pgRedirect.php?productinfo=" + appno + "&funivcode=" + funivcode; } break; case "axis": window.location = $url + $hoststr + "/axis/axispay.php?productinfo=" + appno + "&funivcode=" + funivcode; break; case "Easebuzz": window.open( $url + $hoststr + `ebbuze/easebuzz.php?funivcode=${funivcode}&appno=${appno}&fdegree=${fdegree}&fheadcode=${fheadcode}&fadmid=${fadmid}` ); break; case "payu": window.location = $url + $hoststr + `payu/pay.php?funivcode=${funivcode}&productinfo=${appno}`; break; default: break; } } function payFeeAmount() { let regno = document.getElementById("fappno").value; let fdegree = window["fdegree"]; let degArr = fdegree.split("-"); let degree = degArr[0]; let fheadcode = window["fheadcode"]; var funivcode = sessionStorage.getItem("univ"); let balAmt = $("#balamt").val(); if (parseFloat(balAmt) <= 0) { alert("No Active payments"); return; } console.log(fdegree); const formdata = new FormData(); formdata.append("regno", regno); formdata.append("balAmt", balAmt); formdata.append("univcode", funivcode); formdata.append("fheadcode", fheadcode); formdata.append("fdegree", degree); console.log(); $.ajax({ type: "POST", url: $host_url + "saveStudFeeAmt", data: formdata, cache: false, processData: false, contentType: false, success: function (res) { if (res.error_code === 0) { document.getElementById("paydata").style.display = "none"; let fadmid = res.data.fadmid; let fappno = res.data.fleadid; let fcollcode = res.data.fcollcode; getPaymentTypes( fadmid, funivcode, degree, window.fheadcode, fappno, fcollcode ); } else { Swal.fire({ title: res.data.msg, type: "warning", confirmButtonText: `OK`, confirmButtonColor: "#5495ff.", }); document.getElementById("paydata").style.display = "block"; return; } }, }); } function paymentstatus(fregno, funivcode, ftype, femail) { console.log(fregno, funivcode, ftype, femail); }