feature/IO-2885-IntelliPay-App-Postback

- Refactor / Add Tests
This commit is contained in:
Dave Richer
2025-04-02 11:09:03 -04:00
parent c78b9866a3
commit 9bf6ba9cf0
12 changed files with 686 additions and 275 deletions

View File

@@ -0,0 +1,14 @@
/**
* @description Decode the comment from base64
* @param comment
* @returns {any|null}
*/
const decodeComment = (comment) => {
try {
return comment ? JSON.parse(Buffer.from(comment, "base64").toString()) : null;
} catch (error) {
return null; // Handle malformed base64 string gracefully
}
};
module.exports = decodeComment;