diff --git a/server/intellipay/intellipay.js b/server/intellipay/intellipay.js index 0ece0c69c..60b74c1b5 100644 --- a/server/intellipay/intellipay.js +++ b/server/intellipay/intellipay.js @@ -132,6 +132,7 @@ exports.payment_refund = async (req, res) => { exports.generate_payment_url = async (req, res) => { logger.log("intellipay-payment-url", "DEBUG", req.user?.email, null, null); const shopCredentials = await getShopCredentials(req.body.bodyshop); + try { const options = { method: "POST", @@ -139,7 +140,12 @@ exports.generate_payment_url = async (req, res) => { //TODO: Move these to environment variables/database. data: qs.stringify({ ...shopCredentials, - ...req.body, + //...req.body, + amount: Dinero({ amount: Math.round(req.body.amount * 100) }).toFormat( + "0.00" + ), + account: req.body.account, + invoice: req.body.invoice, createshorturl: true, //The postback URL is set at the CP teller global terminal settings page. }),