transfered test files to separate component

This commit is contained in:
swtmply
2023-03-04 04:05:28 +08:00
parent c8ee9ca5a7
commit aa5110ae13
7 changed files with 130 additions and 63 deletions

View File

@@ -11,8 +11,11 @@ require("dotenv").config({
),
});
const url = process.env.NODE_ENV
? "https://secure.cpteller.com/api/custapi.cfc?method=autoterminal"
: "https://test.cpteller.com/api/custapi.cfc?method=autoterminal";
exports.lightbox_credentials = async (req, res) => {
console.log("In API Lightbox Credential route.");
try {
const options = {
method: "POST",
@@ -21,9 +24,12 @@ exports.lightbox_credentials = async (req, res) => {
data: qs.stringify({
merchantkey: "3B8068",
apikey: "Oepn2B.XqRgzAqHqvOOmYUxD2VW.vGSipi",
operatingenv: "businessattended", // add these for EMV Swipe
operatingenv:
process.env.NODE_ENV === undefined
? process.env.NODE_ENV
: "businessattended",
}),
url: "https://test.cpteller.com/api/custapi.cfc?method=autoterminal", //added .test
url,
};
const response = await axios(options);