Minor intellipay change.

This commit is contained in:
Patrick Fic
2024-01-05 08:53:17 -08:00
parent 307e244475
commit 9c897972ad

View File

@@ -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.
}),