"
jQuery.ajax({
type: "POST",
data: {
amount: amount
},
url: 'https://alnoorpod.ae/wp-content/themes/kidko/ni-access_token.php',
cache: false,
async: false,
headers: {
"cache-control": "no-cache"
},
success: function(token) {
jQuery.ajax({
type: "POST",
data: {
accessToken: token,
amount: amount,
fname: fname,
lname: lname,
billingAddress: billingAddress,
city: city,
country: country,
email: email,
},
url: 'https://alnoorpod.ae/wp-content/themes/kidko/ni-create_order.php',
cache: false,
async: false,
headers: {
"cache-control": "no-cache"
},
success: function(data) {
window.location.replace(data);
},
error: function(data) {
alert("ERROR::Something went wrong!");
}
});
},
error: function(data) {
alert("ERROR::Something went wrong!");
}
});
}
}, false );