Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.128.31.184
Current Path : /var/www/html/pget/js/pg/ |
| Current File : //var/www/html/pget/js/pg/makepayment.js |
// var $host_url1 =
// "http://" +
// window.location.host +
// "/" +
// window.location.pathname.split("/")[1] +
// "/app.php?a=";
var gdata = [];
function makepayment() {
//$.blockUI({ message: "<img src='img/Loading_icon.gif' border='0'>" });
$.ajax({
type: "POST",
url: $host_url + "masbankdet",
success: responce => {
var { error_code, data, status } = JSON.parse(responce);
if (error_code == 0) {
$("#loadTab").load("make-payment.html", function() {
// $.unblockUI();
var table = `<table class="makepayment" width="100%" border = "1" cellspacing="0" cellpadding="5" style = "margin:1% auto;">
<thead>
<tr>
<th style = "text-align: center;width = 20%;">
Logo
</th>
<th style = "text-align: center;width = 30%;">
Bank Charges
</th>
<th style = "text-align: center;width = 10%;" >
Action
</th>
</tr>
</thead>
<tbody>`;
var masbank = data["masbank"];
for (var i = 0; i < masbank.length; i++) {
if (
masbank[i]["fbank"].toLowerCase() == "razorpay" ||
masbank[i]["fbank"].toLowerCase() == "paytm"
) {
var appno = data.appno;
var button = "";
var db = window.location.pathname.split("/")[2];
var funivcode = "";
if (db == "vskub") funivcode = "026";
else if (db == "rcub") funivcode = "027";
else if (db == "dud") funivcode = "023";
table += `<tr>
<td width = "12%;" style = "text-align: center;">
<img height="60" width="150" src = "../${
masbank[i]["fbanklog"]
}" />
</td>;
<td width = "20%;" style = "text-align: center;">
${masbank[i]["fbankcharge"]}
</td>`;
console.log(masbank[i]["fbank"].toLowerCase());
if (masbank[i]["fbank"].toLowerCase() == "razorpay") {
$.ajax({
type: "POST",
async: false,
data: "appno=" + appno + "&funivcode=" + funivcode,
url: "../razorpay/pay.php",
success: function(responce) {
button = responce;
}
});
table += `<td width = "15%;">
<center>${button}</center>
</td> </tr>`;
} else {
table += `<td width = "15%;" >
<center><button class = "btn btn-primary" type="button" onclick="makepaymentdet('${
masbank[i]["fbank"]
}','${appno}','${
masbank[i]["funivcode"]
}')">Make Payment</button></center>
</td>
</tr>`;
}
}
}
table += `</tbody></table>`;
// console.log(table);
$("#makepayment").html(table);
return;
});
} else {
swal({
title: data["msg"],
html: true,
showCancelButton: false,
confirmButtonColor: "#5495ff",
confirmButtonText: "OK",
closeOnConfirm: false
});
}
}
});
}
function makepaymentdet(payment, id, funivcode) {
if (payment.toLowerCase() == "paytm")
window.location.href =
"../Paytm/pgRedirect.php?productinfo=" + id + "&funivcode=" + funivcode;
if (payment == "axis")
window.location.href =
"axis/sampleEasyPay.php?productinfo=" + id + "&funivcode=" + funivcode;
if (payment == "hdfc") {
window.location.href =
"hdfc/ccavRequestHandler.php?productinfo=" +
id +
"&funivcode=" +
funivcode;
}
}
function PrintApplicationFormNETBANKING(appno) {
window.location.href = $host_url + "applicationFormPGReport&appno=" + appno;
}
|