-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module '../../test/Integration/Gateways/Terminals/RequestIdProvider' #71
Comments
Please use this version: "globalpayments-api": "3.5.1-fix-4". |
Thanks Above Solved the Previous Issue but Now i am getting some new Error const config = new ServicesConfig() TypeError: ServicesConfig is not a constructor
const config = new ServicesConfig() Also if you could help me , Which Fileld will have What Values and Where i can get them thanks, |
Hi, Going forward, please send all inquiries to the developers group directly. Specifically: [email protected] With regards to your issue. Use the below. const config = new PorticoConfig(); |
Looks Like test Folder is Missing in the modules,
i checked the Node-modules but didn't find test Folder anywhere
Please Help with this
ERROR :
Error: Cannot find module '../../test/Integration/Gateways/Terminals/RequestIdProvider'
Require stack:
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object. (/Users/ranvijay/Desktop/RV/test_Global_Pay/node_modules/globalpayments-api/lib/src/Gateways/RestGateway.js:4:29)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/ranvijay/Desktop/RV/test_Global_Pay/node_modules/globalpayments-api/lib/src/Gateways/RestGateway.js',
'/Users/ranvijay/Desktop/RV/test_Global_Pay/node_modules/globalpayments-api/lib/src/Gateways/GpApiConnector.js',
'/Users/ranvijay/Desktop/RV/test_Global_Pay/node_modules/globalpayments-api/lib/src/Gateways/index.js',
'/Users/ranvijay/Desktop/RV/test_Global_Pay/node_modules/globalpayments-api/lib/src/index.js',
'/Users/ranvijay/Desktop/RV/test_Global_Pay/index.js'
]
}
MY CODE 🥇
const express = require("express");
const GlobalPayments = require("globalpayments-api");
const app = express();
app.use(express.json());
app.post("/create-payment", async (req, res) => {
try {
const { cardNumber, expiry, cvv, amount } = req.body;
const response = await GlobalPayments.cards.charge({
cardNumber,
expiry,
cvv,
amount,
currency: "USD",
});
} catch (error) {
res.status(500).json({ message: error.message });
}
});
app.listen(3000, () => console.log("Server running on port 3000"));
The text was updated successfully, but these errors were encountered: