diff --git a/src/__tests__/terminalCloudAPI.spec.ts b/src/__tests__/terminalCloudAPI.spec.ts index 33b2c8a..a780602 100644 --- a/src/__tests__/terminalCloudAPI.spec.ts +++ b/src/__tests__/terminalCloudAPI.spec.ts @@ -34,6 +34,7 @@ beforeEach((): void => { nock.activate(); } client = createClient(process.env.ADYEN_TERMINAL_APIKEY); + client.config.merchantAccount = process.env.ADYEN_TERMINAL_MERCHANT; terminalCloudAPI = new TerminalCloudAPI(client); scope = nock(`${client.config.terminalApiCloudEndpoint}`); diff --git a/src/config.ts b/src/config.ts index 6a4971b..f8ceb40 100644 --- a/src/config.ts +++ b/src/config.ts @@ -19,6 +19,7 @@ interface ConfigConstructor { username?: string; password?: string; + merchantAccount?: string; environment?: Environment; endpoint?: string; marketPayEndpoint?: string; @@ -38,6 +39,7 @@ interface ConfigConstructor { class Config { public username?: string; public password?: string; + public merchantAccount?: string; public environment?: Environment; public endpoint?: string; public marketPayEndpoint?: string; @@ -59,6 +61,7 @@ class Config { public constructor(options: ConfigConstructor = {}) { if (options.username) this.username = options.username; if (options.password) this.password = options.password; + if (options.merchantAccount) this.merchantAccount = options.merchantAccount; if (options.environment) this.environment = options.environment; if (options.endpoint) this.endpoint = options.endpoint; if (options.marketPayEndpoint) this.marketPayEndpoint = options.marketPayEndpoint;