Skip to content

Conversation

wopietrz
Copy link

@wopietrz wopietrz commented Jul 8, 2022

Each time CallAuthenticationHeaders method is called a new instance of RestClientis created and initialized with merchantConfig.HostName. That makes it impossilbe to set RestClient baseAddress with values different than apitest.cybersource.com or cybersoure.com. Also there should be a possibility to override some of authentication headers like Host to specify custom hostname and and port number of the server to which the request is being sent. That would allow to call Cybersource API via cloud based API management platforms e.g. Azure Api Managment

@wrightsonm
Copy link

@wopietrz ApiClient.cs is code genned.

You might want to look at updating:

https://github.com/CyberSource/cybersource-rest-client-dotnetstandard/blob/master/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache

@wopietrz
Copy link
Author

Thanks for reply. It is a change proposal. I can have a look at *.mustache file but want to be sure if the code chage is acceptable for you.

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

Successfully merging this pull request may close these issues.

3 participants