-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I'm trying to call Cybersource Rest Api via Azure Api Management to meet security and complaince requirements. Unfortunately I run into some issues:
- I' m not able to set RestClient Url to Api Management endpoint independently of RunEnviroment setting.
- I'm not able to modify the Host header independently of RunEnviroment setting to establish ssl connection.
- When I set the value of RunEnvironemnt to Azure Api Management endpoint then it is possilbe to connect to APIM but, Cybersource refuses a request becasue of inccorrect value of Signature header
There is a possibility to initialize RestClient with a custom url, however in ApiClient.CallAuthtenticationHeaders the RestClient property is recreated:
ApiClient.cs:
public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null)
{
...
Configuration.DefaultHeader = authenticationHeaders;
RestClient = new RestClient("https://" + merchantConfig.HostName);
if (Configuration.Proxy != null)
{
RestClient.Proxy = Configuration.Proxy;
}
}
In above code merchantConfig.HostName points to RunEnvironement setting.
Metadata
Metadata
Assignees
Labels
No labels