Merge branch 'hotfix/AIO/2024-05-23' into release/AIO/2024-05-24
This commit is contained in:
@@ -145,19 +145,19 @@ exports.generate_payment_url = async (req, res) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.postback = async (req, res) => {
|
exports.postback = async (req, res) => {
|
||||||
logger.log("intellipay-postback", "DEBUG", req.user?.email, null, req.body);
|
|
||||||
const { body: values } = req;
|
|
||||||
|
|
||||||
const comment = Buffer.from(values?.comment, "base64").toString();
|
|
||||||
|
|
||||||
if ((!values.invoice || values.invoice === "") && !comment) {
|
|
||||||
//invoice is specified through the pay link. Comment by IO.
|
|
||||||
logger.log("intellipay-postback-ignored", "DEBUG", req.user?.email, null, req.body);
|
|
||||||
res.sendStatus(200);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
logger.log("intellipay-postback", "DEBUG", req.user?.email, null, req.body);
|
||||||
|
const { body: values } = req;
|
||||||
|
|
||||||
|
const comment = Buffer.from(values?.comment, "base64").toString();
|
||||||
|
|
||||||
|
if ((!values.invoice || values.invoice === "") && !comment) {
|
||||||
|
//invoice is specified through the pay link. Comment by IO.
|
||||||
|
logger.log("intellipay-postback-ignored", "DEBUG", req.user?.email, null, req.body);
|
||||||
|
res.sendStatus(200);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (values.invoice) {
|
if (values.invoice) {
|
||||||
//This is a link email that's been sent out.
|
//This is a link email that's been sent out.
|
||||||
const job = await gqlClient.request(queries.GET_JOB_BY_PK, {
|
const job = await gqlClient.request(queries.GET_JOB_BY_PK, {
|
||||||
|
|||||||
Reference in New Issue
Block a user