Closed TheoGautier closed 2 years ago
Hi Theo, thanks for reaching out!
It seems you are using the sdk-nodejs, not this sdk-client-js.
It is currently not possible to use the NodeJS SDK with multiple configurations in a single application. When you call initIngenicoDirectSdk with 'dnidIntegrator' config it overrides the configuration of 'integrator'. This means that your dnid API keys will be used for calls with your main merchant. This is due to the way directSdk.init is set up.
We're working on making multiple instances possible this summer. In the meantime we'll work on getting a work-around available for you. We'll get back to you within a week.
Kind regards, Worldline support team
Hi Theo,
Unfortunately the work-around isn't satisfactory. Instead, we'll focus on the update of the SDK and pull its release forward to next week by the latest.
Kind regards, Worldline support team
Hi Wordline,
Thanks for the update, I'm expecting your release for soon, have a nice day.
Hi Wordline,
Are there any news on this issue?
Have a nice day.
Hello Theo,
We have published a new release on the NodeJS SDK that should resolve this issue. Version 3.4.2. https://github.com/wl-online-payments-direct/sdk-nodejs/releases/tag/3.4.2
Kind regards, Worldline support team
edit: updated referenced version to 3.4.1. edit: updated referenced version to 3.4.2.
After further investigation the fix wasn't deemed enough. The SDK has been updated with a better solution in release 4.0.0: https://github.com/wl-online-payments-direct/sdk-nodejs/releases/tag/4.0.0
apiVersion: v2.
Hi Wordline,
I have an issue when creating multiple instances of the onlinepayments-sdk-nodej defaultApi in the same file, for two separate integrators.
Context
I have the following :
And this:
Issue
The issue is simple: When I have both instances, the second one seems to crush the first one. In this configuration, a payment using
mainDirectSdk
does not succeed -> I cannot even init my session,sdk.sessions.createSession
fails withDIRECT_PLATFORM_ERROR
,ACCESS_TO_MERCHANT_NOT_ALLOWED
. When I comment or remove the second sdk instance,dnidDirectSdk
, it works.Can you help me with this? Thank you.