diff --git a/server/intellipay/lib/handleInvoiceBasedPayment.js b/server/intellipay/lib/handleInvoiceBasedPayment.js index 5a6bad360..21e4500a6 100644 --- a/server/intellipay/lib/handleInvoiceBasedPayment.js +++ b/server/intellipay/lib/handleInvoiceBasedPayment.js @@ -6,7 +6,7 @@ const { GET_BODYSHOP_BY_MERCHANT_ID } = require("../../graphql-client/queries"); -const { sendServerEmail } = require("../../email/sendemail"); +const { sendTaskEmail } = require("../../email/sendemail"); const getPaymentType = require("./getPaymentType"); const moment = require("moment"); @@ -47,7 +47,9 @@ const handleInvoiceBasedPayment = async (values, logger, logMeta, res) => { if (bodyshop?.bodyshops?.[0]) { // Note: changed bodyshops to bodyshop to match query name const email = bodyshop.bodyshops[0].email; - await sendServerEmail({ + + await sendTaskEmail({ + to: email, subject: `Failed to Insert Payment`, text: `The system has attempted to insert a payment that was generated by your merchant terminal but could not find an associated invoice. Transaction details are below. Please input this payment to your system manually.\n\n${Object.keys( values