Skip to content
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

Upgrade Issue - "ServicesConfig is not a constructor" #73

Open
MilesTFox opened this issue Jun 21, 2024 · 3 comments
Open

Upgrade Issue - "ServicesConfig is not a constructor" #73

MilesTFox opened this issue Jun 21, 2024 · 3 comments

Comments

@MilesTFox
Copy link

MilesTFox commented Jun 21, 2024

Tried upgrading from 1.4.9 to 3.7.0.
We were on 1.4.9 with a custom patch due to the PCI compliance issue that has been open here since Sep 15, 2023.

Expected results: API to work as normal.

Actual results: API does not work, throwing "ServicesConfig is not a constructor"

Steps to reproduce: Upgrade from 1.4.9 (working code) to 3.7.0.

Example Code:

const {
Address,
ServicesConfig,
ServicesContainer,
CreditCardData,
Transaction
} = require('globalpayments-api');

let servicesConfig = new ServicesConfig();
servicesConfig.secretApiKey = "REDACTED";
servicesConfig.developerId = "REDACTED";
servicesConfig.versionNumber = "REDACTED";
servicesConfig.serviceUrl = "https://api2.heartlandportico.com";
servicesConfig.enableLogging = false;
ServicesContainer.configure(servicesConfig);

@matrix125
Copy link

Hi Miles,

Going forward, please contact this group with such inquiries: [email protected].
Support contact Page on Heartland Developer portal: https://developer.heartlandpaymentsystems.com/Support

@zxfrank
Copy link

zxfrank commented Nov 28, 2024

const 
{
    Address,
    CreditCardData,
    ServicesContainer,
    HostedPaymentConfig,
    GpEcomConfig,
    Transaction
}               = require('globalpayments-api');
...
const config = new GpEcomConfig(); //might need to use another config class, this is what we use with realex
... config stuff
ServicesContainer.configureService(config);

@feraudh
Copy link

feraudh commented Dec 2, 2024

Hi All,

Kindly use our new contact form going forward to submit these types of issues.

https://developer.heartlandpaymentsystems.com/Contact

If your integration is connecting to Portico, then use the below config for the sandbox environment.

const config = new PorticoConfig();
config.secretApiKey = 'skapi_cert_Your secret API Key';
config.developerId = '000000';
config.versionNumber = '0000';
config.serviceUrl = 'https://cert.api2.heartlandportico.com'; // When going to prod use: https://api2.heartlandportico.com
ServicesContainer.configureService(config);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants