IO-3176 IntelliPay Payment Method Mapping

Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
Allan Carr
2025-03-19 09:10:20 -07:00
parent de3f1972a6
commit 38119f7f1f
5 changed files with 11432 additions and 11316 deletions

View File

@@ -371,6 +371,7 @@ exports.postback = async (req, res) => {
iprequest: values,
decodedComment
};
const ipMapping = req.body?.bodyshop?.intellipay_config?.payment_map;
logger.log("intellipay-postback-received", "DEBUG", req.user?.email, null, logResponseMeta);
@@ -417,7 +418,7 @@ exports.postback = async (req, res) => {
amount: p.amount,
transactionid: values.authcode,
payer: "Customer",
type: values.cardtype,
type: ipMapping[(values.cardtype || "").toLowerCase()] || values.cardtype,
jobid: p.jobid,
date: moment(Date.now()),
payment_responses: {
@@ -481,7 +482,7 @@ exports.postback = async (req, res) => {
amount: values.total,
transactionid: values.authcode,
payer: "Customer",
type: values.cardtype,
type: ipMapping[(values.cardtype || "").toLowerCase()] || values.cardtype,
jobid: values.invoice,
date: moment(Date.now())
}