Closed zuttrax closed 2 years ago
When you use connectsdk.CreateClient
, the default configuration will be used: CommunicatorConfiguration.go#L63. This includes a hard-coded URL: https://world.api-ingenico.com. Is this the same URL you're using in the Node.js SDK?
If not, you'll need to create a configuration.CommunicatorConfiguration
instance in combination with connectsdk.CreateClientFromConfiguration
. This is explained at Initialization of the Go SDK, subsection "Using CommunicatorConfiguration". That uses TOML to set the configuration, but you can also just set the configuration properties directly:
conf, err := connectsdk.CreateConfiguration(apiKeyID, secretAPIKey, "Ingenico");
// omitted: error handling
// for another https URL:
conf.APIEndpoint.Host = "<other host>"
// or to overwrite the URL completely:
//conf.APIEndpoint = URL{ ... }
return connectsdk.CreateClientFromConfiguration(conf)
I have been having troubles with the function to test connection, always I receive the error with code 9002, and when I test with the SDK for node js this works
response