The site is live not in testing mode:
here is my code
async function makePayment(id, products, method, number, res, mobile) {
const payment = paynow.createPayment(
Invoice ${id}
,
"sbj.premacart@gmail.com"
);
products.map((product) => {
payment.add(product.title, product.price * product.quantiy);
});
if (mobile) {
try {
const response = await paynow.sendMobile(
payment,
number,
method
);
if (response && response.success) {
console.log(response);
res.send(response);
} else {
console.log(response);
res.send(response);
}
} catch (e) {
console.log(e);
}
} else {
paynow.send(payment).then((response) => {
// Check if request was successful
if (response.success) {
// Get the link to redirect the user to, then use it as you see fit
let link = response.redirectUrl;
console.log(“successs \n\n\n\n\n\n\n\n\n”);
console.log(response);
res.send(response);
}
});
}
}