Intellipay improvements with Allan

This commit is contained in:
Patrick Fic
2023-08-15 14:59:35 -07:00
parent 6b66b76f84
commit c10517a11b
2 changed files with 58 additions and 11 deletions

View File

@@ -12,6 +12,7 @@ require("dotenv").config({
});
const domain = process.env.NODE_ENV ? "secure" : "test";
const SecretsManager = require("./aws-secrets-manager");
const {
SecretsManagerClient,
@@ -56,12 +57,13 @@ exports.lightbox_credentials = async (req, res) => {
const options = {
method: "POST",
headers: { "content-type": "application/x-www-form-urlencoded" },
//TODO: Move these to environment variables/database.
data: qs.stringify({
...shopCredentials,
operatingenv: "businessattended",
}),
url: `https://${domain}.cpteller.com/api/custapi.cfc?method=autoterminal`,
url: `https://${domain}.cpteller.com/api/custapi.cfc?method=autoterminal${
req.body.refresh ? "_refresh" : ""
}`, //autoterminal_refresh
};
const response = await axios(options);