Closed vdoulcier closed 2 years ago
The directSdk
import is the entry point for the SDK. You initialize it, as documented at Initialization of the Node.js SDK. The init
function returns the object itself, but you can ignore its return value - it's the same as the directSdk
import itself.
I tried to find some examples, but I didn't get any further than the integration tests. These do show mostly how to use the SDK. The empty objects at the end are the so-called payment content, which can be used for idempotency (see https://support.direct.ingenico.com/documentation/sdk/server/nodejs/#Idempotent-requests). In your example, you're missing the merchant id.
As for auto-completion, the SDK currently has no TypeScript definitions available. Without those, IDEs are unable to tell what properties and functions are available.
Hello,
I'm currently trying to use this library in a typescript service, but unfortunately neither documentation or readme file help me to start with (would be great if you can share a full code example of some methods).
I can not be sure about the result of the init method ; here are some open questions I have :
new OgoneClient()
ornew directSdk()
),Please find below a code example, and thank's for any help!