Skip to content

Commit f7cce9e

Browse files
authored
Merge pull request #109 from CyberSource/february-2025
February 2025
2 parents 86e362f + 6929213 commit f7cce9e

File tree

43 files changed

+2575
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2575
-23
lines changed

cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/AuthenticationSdk.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>0.0.1.15</Version>
6+
<Version>0.0.1.16</Version>
77
<Authors>CyberSource</Authors>
88
<Product>Authentication_SDK</Product>
99
<Description />
@@ -37,8 +37,8 @@
3737
<ItemGroup>
3838
<PackageReference Include="jose-jwt" Version="4.1.0" />
3939
<PackageReference Include="NLog" Version="5.0.0" />
40-
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
41-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
40+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
41+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
4242
<PackageReference Include="System.Runtime.Caching" Version="4.7.0" />
4343
</ItemGroup>
4444

cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public static X509Certificate2 FetchCachedCertificate(string p12FilePath, string
6868
}
6969
}
7070

71+
[Obsolete("This method has been marked as Deprecated and will be removed in coming releases.", false)]
7172
public static RSAParameters FetchCachedRSAParameters(MerchantConfig merchantConfig)
7273
{
7374
lock (mutexForPrivateKeyFromPEM)

cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/JWEUtility.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Org.BouncyCastle.Crypto.Parameters;
44
using Org.BouncyCastle.OpenSsl;
55
using Org.BouncyCastle.Security;
6+
using System;
67
using System.IO;
78
using System.Security.Cryptography;
89
using AuthenticationSdk.core;
@@ -16,6 +17,7 @@ private static string LoadKeyFromFile(string path)
1617
return File.ReadAllText(path);
1718
}
1819

20+
[Obsolete("This method has been marked as Deprecated and will be removed in coming releases. Use DecryptUsingRSAParameters(RSAParameters, string) instead.", false)]
1921
public static string DecryptUsingPEM(MerchantConfig merchantConfig, string encodedData)
2022
{
2123
var privateKey = LoadKeyFromFile(merchantConfig.PemFileDirectory);
@@ -26,5 +28,12 @@ public static string DecryptUsingPEM(MerchantConfig merchantConfig, string encod
2628
rsa.ImportParameters(rsaParams);
2729
return JWT.Decode(encodedData, rsa, JweAlgorithm.RSA_OAEP_256, JweEncryption.A256GCM);
2830
}
31+
32+
public static string DecryptUsingRSAParameters(RSAParameters rsaParameters, string encodedData)
33+
{
34+
var rsa = RSA.Create();
35+
rsa.ImportParameters(rsaParameters);
36+
return JWT.Decode(encodedData, rsa, JweAlgorithm.RSA_OAEP_256, JweEncryption.A256GCM);
37+
}
2938
}
3039
}

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurationsTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ public void VaultTest()
8080
{
8181
// TODO unit test for the property 'Vault'
8282
}
83+
/// <summary>
84+
/// Test the property 'NetworkTokenEnrollment'
85+
/// </summary>
86+
[Test]
87+
public void NetworkTokenEnrollmentTest()
88+
{
89+
// TODO unit test for the property 'NetworkTokenEnrollment'
90+
}
8391

8492
}
8593

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/GenerateCaptureContextRequestTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ public void AllowedPaymentTypesTest()
9696
{
9797
// TODO unit test for the property 'AllowedPaymentTypes'
9898
}
99+
/// <summary>
100+
/// Test the property 'TransientTokenResponseOptions'
101+
/// </summary>
102+
[Test]
103+
public void TransientTokenResponseOptionsTest()
104+
{
105+
// TODO unit test for the property 'TransientTokenResponseOptions'
106+
}
99107

100108
}
101109

cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/GenerateUnifiedCheckoutCaptureContextRequestTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ public void OrderInformationTest()
128128
{
129129
// TODO unit test for the property 'OrderInformation'
130130
}
131+
/// <summary>
132+
/// Test the property 'TransientTokenResponseOptions'
133+
/// </summary>
134+
[Test]
135+
public void TransientTokenResponseOptionsTest()
136+
{
137+
// TODO unit test for the property 'TransientTokenResponseOptions'
138+
}
131139

132140
}
133141

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* CyberSource Merged Spec
3+
*
4+
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5+
*
6+
* OpenAPI spec version: 0.0.1
7+
*
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
12+
using NUnit.Framework;
13+
14+
using System;
15+
using System.Linq;
16+
using System.IO;
17+
using System.Collections.Generic;
18+
using CyberSource.Api;
19+
using CyberSource.Model;
20+
using CyberSource.Client;
21+
using System.Reflection;
22+
23+
namespace CyberSource.Test
24+
{
25+
/// <summary>
26+
/// Class for testing Microformv2sessionsTransientTokenResponseOptions
27+
/// </summary>
28+
/// <remarks>
29+
/// This file is automatically generated by Swagger Codegen.
30+
/// Please update the test case below to test the model.
31+
/// </remarks>
32+
[TestFixture]
33+
public class Microformv2sessionsTransientTokenResponseOptionsTests
34+
{
35+
// TODO uncomment below to declare an instance variable for Microformv2sessionsTransientTokenResponseOptions
36+
//private Microformv2sessionsTransientTokenResponseOptions instance;
37+
38+
/// <summary>
39+
/// Setup before each test
40+
/// </summary>
41+
[SetUp]
42+
public void Init()
43+
{
44+
// TODO uncomment below to create an instance of Microformv2sessionsTransientTokenResponseOptions
45+
//instance = new Microformv2sessionsTransientTokenResponseOptions();
46+
}
47+
48+
/// <summary>
49+
/// Clean up after each test
50+
/// </summary>
51+
[TearDown]
52+
public void Cleanup()
53+
{
54+
55+
}
56+
57+
/// <summary>
58+
/// Test an instance of Microformv2sessionsTransientTokenResponseOptions
59+
/// </summary>
60+
[Test]
61+
public void Microformv2sessionsTransientTokenResponseOptionsInstanceTest()
62+
{
63+
// TODO uncomment below to test "IsInstanceOfType" Microformv2sessionsTransientTokenResponseOptions
64+
//Assert.IsInstanceOfType<Microformv2sessionsTransientTokenResponseOptions> (instance, "variable 'instance' is a Microformv2sessionsTransientTokenResponseOptions");
65+
}
66+
67+
/// <summary>
68+
/// Test the property 'IncludeCardPrefix'
69+
/// </summary>
70+
[Test]
71+
public void IncludeCardPrefixTest()
72+
{
73+
// TODO unit test for the property 'IncludeCardPrefix'
74+
}
75+
76+
}
77+
78+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/*
2+
* CyberSource Merged Spec
3+
*
4+
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5+
*
6+
* OpenAPI spec version: 0.0.1
7+
*
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
12+
using NUnit.Framework;
13+
14+
using System;
15+
using System.Linq;
16+
using System.IO;
17+
using System.Collections.Generic;
18+
using CyberSource.Api;
19+
using CyberSource.Model;
20+
using CyberSource.Client;
21+
using System.Reflection;
22+
23+
namespace CyberSource.Test
24+
{
25+
/// <summary>
26+
/// Class for testing NetworkTokenEnrollment
27+
/// </summary>
28+
/// <remarks>
29+
/// This file is automatically generated by Swagger Codegen.
30+
/// Please update the test case below to test the model.
31+
/// </remarks>
32+
[TestFixture]
33+
public class NetworkTokenEnrollmentTests
34+
{
35+
// TODO uncomment below to declare an instance variable for NetworkTokenEnrollment
36+
//private NetworkTokenEnrollment instance;
37+
38+
/// <summary>
39+
/// Setup before each test
40+
/// </summary>
41+
[SetUp]
42+
public void Init()
43+
{
44+
// TODO uncomment below to create an instance of NetworkTokenEnrollment
45+
//instance = new NetworkTokenEnrollment();
46+
}
47+
48+
/// <summary>
49+
/// Clean up after each test
50+
/// </summary>
51+
[TearDown]
52+
public void Cleanup()
53+
{
54+
55+
}
56+
57+
/// <summary>
58+
/// Test an instance of NetworkTokenEnrollment
59+
/// </summary>
60+
[Test]
61+
public void NetworkTokenEnrollmentInstanceTest()
62+
{
63+
// TODO uncomment below to test "IsInstanceOfType" NetworkTokenEnrollment
64+
//Assert.IsInstanceOfType<NetworkTokenEnrollment> (instance, "variable 'instance' is a NetworkTokenEnrollment");
65+
}
66+
67+
/// <summary>
68+
/// Test the property 'BusinessInformation'
69+
/// </summary>
70+
[Test]
71+
public void BusinessInformationTest()
72+
{
73+
// TODO unit test for the property 'BusinessInformation'
74+
}
75+
/// <summary>
76+
/// Test the property 'NetworkTokenServices'
77+
/// </summary>
78+
[Test]
79+
public void NetworkTokenServicesTest()
80+
{
81+
// TODO unit test for the property 'NetworkTokenServices'
82+
}
83+
84+
}
85+
86+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* CyberSource Merged Spec
3+
*
4+
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5+
*
6+
* OpenAPI spec version: 0.0.1
7+
*
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
12+
using NUnit.Framework;
13+
14+
using System;
15+
using System.Linq;
16+
using System.IO;
17+
using System.Collections.Generic;
18+
using CyberSource.Api;
19+
using CyberSource.Model;
20+
using CyberSource.Client;
21+
using System.Reflection;
22+
23+
namespace CyberSource.Test
24+
{
25+
/// <summary>
26+
/// Class for testing NetworkTokenServicesEnablementMastercardDigitalEnablementService
27+
/// </summary>
28+
/// <remarks>
29+
/// This file is automatically generated by Swagger Codegen.
30+
/// Please update the test case below to test the model.
31+
/// </remarks>
32+
[TestFixture]
33+
public class NetworkTokenServicesEnablementMastercardDigitalEnablementServiceTests
34+
{
35+
// TODO uncomment below to declare an instance variable for NetworkTokenServicesEnablementMastercardDigitalEnablementService
36+
//private NetworkTokenServicesEnablementMastercardDigitalEnablementService instance;
37+
38+
/// <summary>
39+
/// Setup before each test
40+
/// </summary>
41+
[SetUp]
42+
public void Init()
43+
{
44+
// TODO uncomment below to create an instance of NetworkTokenServicesEnablementMastercardDigitalEnablementService
45+
//instance = new NetworkTokenServicesEnablementMastercardDigitalEnablementService();
46+
}
47+
48+
/// <summary>
49+
/// Clean up after each test
50+
/// </summary>
51+
[TearDown]
52+
public void Cleanup()
53+
{
54+
55+
}
56+
57+
/// <summary>
58+
/// Test an instance of NetworkTokenServicesEnablementMastercardDigitalEnablementService
59+
/// </summary>
60+
[Test]
61+
public void NetworkTokenServicesEnablementMastercardDigitalEnablementServiceInstanceTest()
62+
{
63+
// TODO uncomment below to test "IsInstanceOfType" NetworkTokenServicesEnablementMastercardDigitalEnablementService
64+
//Assert.IsInstanceOfType<NetworkTokenServicesEnablementMastercardDigitalEnablementService> (instance, "variable 'instance' is a NetworkTokenServicesEnablementMastercardDigitalEnablementService");
65+
}
66+
67+
/// <summary>
68+
/// Test the property 'Enrollment'
69+
/// </summary>
70+
[Test]
71+
public void EnrollmentTest()
72+
{
73+
// TODO unit test for the property 'Enrollment'
74+
}
75+
76+
}
77+
78+
}

0 commit comments

Comments
 (0)