Visa Developer Community

Newbie

Unable to perform DoMutualAuthCall - "'key.pem' is an unexpected token." Error

Hi,

 

I am trying out the sample code provided (C#).

'key.pem' is an unexpected token. Expecting white space. Line 5, position 73. (C:\Users\Jamie\Desktop\VISA\vdp-c-sharp\vdp-c-sharp\bin\Debug\vdp-c-sharp.dll.config line 5)

 

 

Below is the code:

string requestURL = "https://sandbox.api.visa.com/" + path;
string userId = "ABC";
string password = "ABC";
string certificatePath = " openssl pkcs12 -export -in cert.pem -inkey key.pem -certfile cert.pem -out myProject_keyAndCertBundle.p12";
string certificatePassword = "ABC";
string statusCode = "";
LogRequest(requestURL, requestBodyString);
// Create the POST request object
HttpWebRequest request = WebRequest.Create(requestURL) as HttpWebRequest;
request.Method = method;

 

 

Any idea how I can resolve this error?

 

Thanks.

 

 

1 REPLY 1
Valued Supporter

Re: Unable to perform DoMutualAuthCall - "'key.pem' is an unexpected token." Error

Hello,

 

Can you please share complete payload req/response with headers to support email developer@visa.com to investigate the issue. 

 

We are looking to get correlation ID and error message you are receiving. 

 

Thanks

Sanobar