cancel
Showing results for 
Search instead for 
Did you mean: 

Imports for C# not working, how to fix it?

Hi, I'm using CyberSource for the first time and I decided to use C# for this. I wanted to test the API for creating a customer Payment Instrument. I copied the sample code but the using statements are invalid on my box. Is there a Nuget package I need to install to get these to using statements working?

 

using CyberSource.Api;
using CyberSource.Model;
Igor_Perisic
Member
1 REPLY 1

According to my understanding, you are trying to use cybersource sdk and you haven't imported the cybersource sdk in your box. 
Please try to install the cybersource sdk in your box.  You can mention the below line in your package.config file:

<package id="CyberSource.Rest.Client" version="0.0.1.27" targetFramework="net461" />

or can directly download the cybersource nuget package using nuget cli.
 https://www.nuget.org/packages/CyberSource.Rest.Client/0.0.1.27

For more information on dependency packages in c# sample code, you can check below link:
https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/master/packages.config


gauravbansal
Member