CyberSource / cybersource-rest-samples-csharp

C# sample code for the CyberSource REST API
26 stars 41 forks source link

Error while calling samples. #17

Open yogeshonline1 opened 5 years ago

yogeshonline1 commented 5 years ago

Tried to call API though samples (C#) but it always through error "object reference error" Not sure what I am doing wrong.

Below is the stack trace, it failed in CallAuthenticationHeaders

Able to generate by own secratekey and able to download report and access others APIs using same credentials over here: https://developer.cybersource.com/api/reference/api-reference.html

at CyberSource.Client.ApiClient.CallAuthenticationHeaders(String requestType, String requestTarget, String requestJsonData) at CyberSource.Client.ApiClient.PrepareRequest(String path, Method method, Dictionary2 queryParams, Object postBody, Dictionary2 headerParams, Dictionary2 formParams, Dictionary2 fileParams, Dictionary2 pathParams, String contentType) at CyberSource.Client.ApiClient.CallApi(String path, Method method, Dictionary2 queryParams, Object postBody, Dictionary2 headerParams, Dictionary2 formParams, Dictionary2 fileParams, Dictionary2 pathParams, String contentType) at CyberSource.Api.ReportDownloadsApi.DownloadReportWithHttpInfo(Nullable`1 reportDate, String reportName, String organizationId) at Cybersource_rest_samples_dotnet.Samples.Reporting.CoreServices.DownloadReport.Run() in C:\Users\agarwaly\Desktop\CyberSource Reports\cybersource-rest-samples-csharp-master (2)\cybersource-rest-samples-csharp-master\src\Samples\Reporting\CoreServices\DownloadReport.cs:line 35

brutaldev commented 4 years ago

Also having the same problem, I've reported this in the SDK as well: https://github.com/CyberSource/cybersource-rest-client-dotnet/issues/73