From ed8867f8449617ee7220cb123c2f7704d50251f3 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Wed, 3 Sep 2025 16:39:12 +0530 Subject: [PATCH 01/41] renamed MleKeyAlias to RequestMleKeyAlias --- .../AuthenticationSdk/core/MerchantConfig.cs | 30 ++++++++++++------- .../AuthenticationSdk/util/Cache.cs | 10 +++---- .../AuthenticationSdk/util/MLEUtility.cs | 2 +- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index 9cfd8b4b..ed776516 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -177,10 +177,10 @@ public bool UseMLEGlobally public Dictionary MapToControlMLEonAPI { get; set; } - public string MleKeyAlias { get; set; } - public string MleForRequestPublicCertPath { get; set; } + public string RequestMleKeyAlias { get; set; } + #endregion public void LogMerchantConfigurationProperties() @@ -285,14 +285,18 @@ private void SetValuesFromAppConfig(NameValueCollection merchantConfigSection, D MapToControlMLEonAPI = mapToControlMLEonAPI; - if (merchantConfigSection["mleKeyAlias"] != null) + if (!string.IsNullOrWhiteSpace(merchantConfigSection["requestMleKeyAlias"])) + { + RequestMleKeyAlias = merchantConfigSection["requestMleKeyAlias"]?.Trim(); + } + else if (!string.IsNullOrWhiteSpace(merchantConfigSection["mleKeyAlias"])) { - MleKeyAlias = merchantConfigSection["mleKeyAlias"]?.Trim(); + RequestMleKeyAlias = merchantConfigSection["mleKeyAlias"]?.Trim(); } - if (string.IsNullOrWhiteSpace(MleKeyAlias?.Trim())) + if(string.IsNullOrWhiteSpace(RequestMleKeyAlias?.Trim())) { - MleKeyAlias = Constants.DefaultMleAliasForCert; + RequestMleKeyAlias = Constants.DefaultMleAliasForCert; } } @@ -547,15 +551,19 @@ private void SetValuesUsingDictObj(IReadOnlyDictionary merchantC MapToControlMLEonAPI = mapToControlMLEonAPI; } - if (merchantConfigDictionary.ContainsKey("mleKeyAlias")) + if (merchantConfigDictionary.ContainsKey("requestMleKeyAlias")) + { + RequestMleKeyAlias = merchantConfigDictionary["requestMleKeyAlias"]?.Trim(); + } + else if (merchantConfigDictionary.ContainsKey("mleKeyAlias")) { - MleKeyAlias = merchantConfigDictionary["mleKeyAlias"]?.Trim(); + RequestMleKeyAlias = merchantConfigDictionary["mleKeyAlias"]?.Trim(); } - //if MleKeyAlias is null or empty or contains only whitespace then set default value - if (string.IsNullOrWhiteSpace(MleKeyAlias?.Trim())) + //if RequestMleKeyAlias is null or empty or contains only whitespace then set default value + if (string.IsNullOrWhiteSpace(RequestMleKeyAlias?.Trim())) { - MleKeyAlias = Constants.DefaultMleAliasForCert; + RequestMleKeyAlias = Constants.DefaultMleAliasForCert; } if (merchantConfigDictionary.ContainsKey("mleForRequestPublicCertPath") && !string.IsNullOrEmpty(merchantConfigDictionary["mleForRequestPublicCertPath"].Trim())) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs index 43517fd2..a1c909f9 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs @@ -181,7 +181,7 @@ private static void SetupCache(MerchantConfig merchantConfig, string cacheKey, s try { - mleCertificate = GetCertBasedOnKeyAlias(certificates, merchantConfig.MleKeyAlias); + mleCertificate = GetCertBasedOnKeyAlias(certificates, merchantConfig.RequestMleKeyAlias); } catch (Exception) { @@ -189,7 +189,7 @@ private static void SetupCache(MerchantConfig merchantConfig, string cacheKey, s { // If no certificate found for the specified alias, fall back to first certificate string fileName = Path.GetFileName(certificateFilePath); - logger.Warn($"No certificate found for the specified mleKeyAlias '{merchantConfig.MleKeyAlias}'. Using the first certificate from file {fileName} as the MLE request certificate."); + logger.Warn($"No certificate found for the specified requestMleKeyAlias '{merchantConfig.RequestMleKeyAlias}'. Using the first certificate from file {fileName} as the MLE request certificate."); mleCertificate = certificates[0]; } } @@ -199,13 +199,13 @@ private static void SetupCache(MerchantConfig merchantConfig, string cacheKey, s { try { - mleCertificate = GetCertBasedOnKeyAlias(FetchCertificateCollectionFromP12File(merchantConfig.P12Keyfilepath, merchantConfig.KeyPass), merchantConfig.MleKeyAlias); + mleCertificate = GetCertBasedOnKeyAlias(FetchCertificateCollectionFromP12File(merchantConfig.P12Keyfilepath, merchantConfig.KeyPass), merchantConfig.RequestMleKeyAlias); } catch (Exception) { string fileName = Path.GetFileName(merchantConfig.P12Keyfilepath); - logger.Error($"No certificate found for the specified mleKeyAlias '{merchantConfig.MleKeyAlias}' in file {fileName}."); - throw new ArgumentException($"No certificate found for the specified mleKeyAlias '{merchantConfig.MleKeyAlias}' in file {fileName}."); + logger.Error($"No certificate found for the specified requestMleKeyAlias '{merchantConfig.RequestMleKeyAlias}' in file {fileName}."); + throw new ArgumentException($"No certificate found for the specified requestMleKeyAlias '{merchantConfig.RequestMleKeyAlias}' in file {fileName}."); } } diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index b8c33089..bab61522 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -116,7 +116,7 @@ private static string GetSerialNumberFromCertificate(X509Certificate2 certificat } if (string.IsNullOrEmpty(serialNumber)) { - logger.Warn($"Serial number not found in MLE certificate for alias {merchantConfig.MleKeyAlias} in {merchantConfig.P12Keyfilepath}.p12"); + logger.Warn($"Serial number not found in MLE certificate for alias {merchantConfig.RequestMleKeyAlias} in {merchantConfig.P12Keyfilepath}.p12"); return certificate.SerialNumber; } From d0ffbf4544952a981f5d03337d3772a6a1b66861 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Wed, 10 Sep 2025 11:30:37 +0530 Subject: [PATCH 02/41] Added Response MLE Params in the Merchant Config --- .../AuthenticationSdk/core/MerchantConfig.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index ed776516..de8c935e 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -181,6 +181,34 @@ public bool UseMLEGlobally public string RequestMleKeyAlias { get; set; } + /// + /// Flag to enable MLE (Message Level Encryption) for response body for all APIs in SDK to get MLE Response (encrypted response) if supported by API. + /// + public bool EnableResponseMleGlobally { get; set; } + + /// + /// Parameter to pass the KID value for the MLE response public certificate. This value will be provided in the merchant portal when retrieving the MLE response certificate. + /// + public string ResponseMleKID { get; set; } + + /// + /// Path to the private key file used for Response MLE decryption by the SDK. + /// Supported formats: .p12, .key, .pem, etc. + /// + public string ResponseMlePrivateKeyFilePath { get; set; } + + /// + /// Password for the private key file used in Response MLE decryption by the SDK. + /// Required for .p12 files or encrypted private keys. + /// + public string ResponseMlePrivateKeyFilePassword { get; set; } + + /// + /// AsymmetricAlgorithm instance used for Response MLE decryption by the SDK. + /// Optional — either provide this object directly or specify the private key file path via configuration. + /// + public System.Security.Cryptography.AsymmetricAlgorithm ResponseMlePrivateKey { get; set; } + #endregion public void LogMerchantConfigurationProperties() From 7e8886563c9b60930146d34d34571b86eb7cd94a Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Wed, 10 Sep 2025 11:43:56 +0530 Subject: [PATCH 03/41] updated Constructor and set the Merchant Config Params --- .../AuthenticationSdk/core/MerchantConfig.cs | 57 ++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index de8c935e..d218b66e 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -18,7 +18,7 @@ namespace AuthenticationSdk.core *============================================================================================*/ public class MerchantConfig { - public MerchantConfig(IReadOnlyDictionary merchantConfigDictionary = null, Dictionary mapToControlMLEonAPI = null) + public MerchantConfig(IReadOnlyDictionary merchantConfigDictionary = null, Dictionary mapToControlMLEonAPI = null, System.Security.Cryptography.AsymmetricAlgorithm responseMlePrivateKey = null) { var _propertiesSetUsing = string.Empty; @@ -57,6 +57,11 @@ public MerchantConfig(IReadOnlyDictionary merchantConfigDictiona } } + if(responseMlePrivateKey != null) + { + ResponseMlePrivateKey = responseMlePrivateKey; + } + Logger.Debug("APPLICATION LOGGING START:\n"); // Logging the source of properties' values @@ -326,6 +331,31 @@ private void SetValuesFromAppConfig(NameValueCollection merchantConfigSection, D { RequestMleKeyAlias = Constants.DefaultMleAliasForCert; } + + // Adding Response MLE Related Params + if (merchantConfigSection["enableResponseMleGlobally"] != null) + { + EnableResponseMleGlobally = bool.Parse(merchantConfigSection["enableResponseMleGlobally"]); + } + else + { + EnableResponseMleGlobally = false; + } + + if (merchantConfigSection["responseMleKID"] != null && !string.IsNullOrEmpty(merchantConfigSection["responseMleKID"]?.Trim())) + { + ResponseMleKID = merchantConfigSection["responseMleKID"].Trim(); + } + + if (merchantConfigSection["responseMlePrivateKeyFilePath"] != null && !string.IsNullOrWhiteSpace(merchantConfigSection["responseMlePrivateKeyFilePath"])) + { + ResponseMlePrivateKeyFilePath = merchantConfigSection["responseMlePrivateKeyFilePath"].Trim(); + } + + if (merchantConfigSection["responseMlePrivateKeyFilePassword"] != null && !string.IsNullOrEmpty(merchantConfigSection["responseMlePrivateKeyFilePassword"])) + { + ResponseMlePrivateKeyFilePassword = merchantConfigSection["responseMlePrivateKeyFilePassword"]; + } } private void SetValuesUsingDictObj(IReadOnlyDictionary merchantConfigDictionary, Dictionary mapToControlMLEonAPI) @@ -598,6 +628,31 @@ private void SetValuesUsingDictObj(IReadOnlyDictionary merchantC { MleForRequestPublicCertPath = merchantConfigDictionary["mleForRequestPublicCertPath"].Trim(); } + + // Adding Response MLE Related Params + if (merchantConfigDictionary.ContainsKey("enableResponseMleGlobally")) + { + EnableResponseMleGlobally = bool.Parse(merchantConfigDictionary["enableResponseMleGlobally"]); + } + else + { + EnableResponseMleGlobally = false; + } + + if (merchantConfigDictionary.ContainsKey("responseMleKID") && !string.IsNullOrEmpty(merchantConfigDictionary["responseMleKID"]?.Trim())) + { + ResponseMleKID = merchantConfigDictionary["responseMleKID"].Trim(); + } + + if (merchantConfigDictionary.ContainsKey("responseMlePrivateKeyFilePath") && !string.IsNullOrWhiteSpace(merchantConfigDictionary["responseMlePrivateKeyFilePath"])) + { + ResponseMlePrivateKeyFilePath = merchantConfigDictionary["responseMlePrivateKeyFilePath"].Trim(); + } + + if (merchantConfigDictionary.ContainsKey("responseMlePrivateKeyFilePassword") && !string.IsNullOrEmpty(merchantConfigDictionary["responseMlePrivateKeyFilePassword"])) + { + ResponseMlePrivateKeyFilePassword = merchantConfigDictionary["responseMlePrivateKeyFilePassword"]; + } } } catch (KeyNotFoundException err) From b84c08e758767d5d99630d82941aa133ec055e1d Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Wed, 10 Sep 2025 11:54:25 +0530 Subject: [PATCH 04/41] Added Validation for Response MLE Params --- .../AuthenticationSdk/core/MerchantConfig.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index d218b66e..37f67852 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -810,6 +810,45 @@ private void ValidateMLEProperties() throw new Exception(err.Message); } } + + // Validation for MLE Response Configuration + if (EnableResponseMleGlobally) + { + // Validate for Auth type - Currently responseMLE feature will be enabled for JWT auth type only + if (!Enumerations.AuthenticationType.JWT.ToString().Equals(AuthenticationType, StringComparison.OrdinalIgnoreCase)) + { + Logger.Error("Response MLE is only supported for JWT auth type"); + throw new Exception("Response MLE is only supported for JWT auth type"); + } + + // Check if either private key object or private key file path is provided + if (ResponseMlePrivateKey == null && string.IsNullOrEmpty(ResponseMlePrivateKeyFilePath)) + { + Logger.Error("Response MLE is enabled but no private key provided. Either set ResponseMlePrivateKey object or provide ResponseMlePrivateKeyFilePath."); + throw new Exception("Response MLE is enabled but no private key provided. Either set ResponseMlePrivateKey object or provide ResponseMlePrivateKeyFilePath."); + } + + // If private key file path is provided, validate the file exists + if (!string.IsNullOrEmpty(ResponseMlePrivateKeyFilePath)) + { + try + { + CertificateUtility.ValidatePathAndFile(ResponseMlePrivateKeyFilePath, "responseMlePrivateKeyFilePath"); + } + catch (IOException err) + { + Logger.Error("Invalid responseMlePrivateKeyFilePath - " + err.Message); + throw new Exception("Invalid responseMlePrivateKeyFilePath - " + err.Message); + } + } + + // Uncomment below if responseMleKID is mandatory when response MLE is enabled + // if (string.IsNullOrEmpty(ResponseMleKID)) + // { + // Logger.Error("Response MLE is enabled but responseMleKID is not provided."); + // throw new Exception("Response MLE is enabled but responseMleKID is not provided."); + // } + } } public bool CheckKeyFile() From 39db3fba8249abe75faa360d71348b259810a32f Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Thu, 11 Sep 2025 11:31:02 +0530 Subject: [PATCH 05/41] added new constructor and convert function for mapToControlMLEonAPI --- .../AuthenticationSdk/core/MerchantConfig.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index 37f67852..4971ef7c 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -18,7 +18,7 @@ namespace AuthenticationSdk.core *============================================================================================*/ public class MerchantConfig { - public MerchantConfig(IReadOnlyDictionary merchantConfigDictionary = null, Dictionary mapToControlMLEonAPI = null, System.Security.Cryptography.AsymmetricAlgorithm responseMlePrivateKey = null) + public MerchantConfig(IReadOnlyDictionary merchantConfigDictionary = null, Dictionary mapToControlMLEonAPI = null, System.Security.Cryptography.AsymmetricAlgorithm responseMlePrivateKey = null) { var _propertiesSetUsing = string.Empty; @@ -73,6 +73,19 @@ public MerchantConfig(IReadOnlyDictionary merchantConfigDictiona ValidateMLEProperties(); } + private static Dictionary ConvertMLEApiMapToString(Dictionary mapToControlMLEonAPI) + { + return mapToControlMLEonAPI?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToString()); + } + + public MerchantConfig(IReadOnlyDictionary merchantConfigDictionary = null, Dictionary mapToControlMLEonAPI = null, System.Security.Cryptography.AsymmetricAlgorithm responseMlePrivateKey = null) + : this( + merchantConfigDictionary, + ConvertMLEApiMapToString(mapToControlMLEonAPI), + responseMlePrivateKey) + { + // This constructor delegates to the main constructor. + } #region Class Properties public string MerchantId { get; set; } @@ -247,7 +260,7 @@ public void LogMerchantConfigurationProperties() Logger.Debug($"Merchant Configuration :\n{merchCfgLogString}"); } - private void SetValuesFromAppConfig(NameValueCollection merchantConfigSection, Dictionary mapToControlMLEonAPI) + private void SetValuesFromAppConfig(NameValueCollection merchantConfigSection, Dictionary mapToControlMLEonAPI) { MerchantId = merchantConfigSection["merchantID"]; PortfolioId = merchantConfigSection["portfolioID"]; @@ -358,7 +371,7 @@ private void SetValuesFromAppConfig(NameValueCollection merchantConfigSection, D } } - private void SetValuesUsingDictObj(IReadOnlyDictionary merchantConfigDictionary, Dictionary mapToControlMLEonAPI) + private void SetValuesUsingDictObj(IReadOnlyDictionary merchantConfigDictionary, Dictionary mapToControlMLEonAPI) { var key = string.Empty; From 92967760611a0cb9b96f1d7cd2055a070ab2d5cd Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Thu, 11 Sep 2025 11:32:32 +0530 Subject: [PATCH 06/41] modified setter for mapToControlMLEonAPI and added validation for Map Values --- .../AuthenticationSdk/core/MerchantConfig.cs | 113 +++++++++++++++++- .../AuthenticationSdk/util/Utility.cs | 20 ++++ 2 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index 4971ef7c..1d988669 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -193,7 +193,60 @@ public bool UseMLEGlobally set => EnableRequestMLEForOptionalApisGlobally = value; } - public Dictionary MapToControlMLEonAPI { get; set; } + public Dictionary MapToControlMLEonAPI { get => MapToControlMLEonAPI; + set { + // Validate the map values of MLE Config if not null + if (value != null) + { + ValidateMapToControlMLEonAPIValues(value); + // Populate the internal Maps for MLE control + var internalMapToControlRequestMLEonAPI = new Dictionary(); + var internalMapToControlResponseMLEonAPI = new Dictionary(); + + foreach (var entry in value) + { + var apiName = entry.Key; + var configValue = entry.Value; + + + if (string.IsNullOrEmpty(configValue)) + { + // Throw exception if configValue is empty for the given apiName + throw new Exception($"Invalid MLE control map value for key '{apiName}'. Value cannot be null or empty."); + } + else if (configValue.Contains("::")) + { + // Format: "requestMLE::responseMLE" + var parts = configValue.Split(new[] { "::" }, StringSplitOptions.None); + var requestMLE = parts.Length > 0 ? parts[0] : string.Empty; + var responseMLE = parts.Length > 1 ? parts[1] : string.Empty; + + // Set request MLE value + if (!string.IsNullOrEmpty(requestMLE)) + { + internalMapToControlRequestMLEonAPI[apiName] = bool.Parse(requestMLE); + } + + // Set response MLE value + if (!string.IsNullOrEmpty(responseMLE)) + { + internalMapToControlResponseMLEonAPI[apiName] = bool.Parse(responseMLE); + } + } + else + { + // Format: "true" or "false" - applies to request MLE only + internalMapToControlRequestMLEonAPI[apiName] = bool.Parse(configValue); + } + } + + this.InternalMapToControlRequestMLEonAPI = internalMapToControlRequestMLEonAPI; + this.InternalMapToControlResponseMLEonAPI = internalMapToControlResponseMLEonAPI; + } + } + } + public Dictionary InternalMapToControlRequestMLEonAPI { get; set; } + public Dictionary InternalMapToControlResponseMLEonAPI { get; set; } public string MleForRequestPublicCertPath { get; set; } @@ -675,6 +728,64 @@ private void SetValuesUsingDictObj(IReadOnlyDictionary merchantC } } + private void ValidateMapToControlMLEonAPIValues(Dictionary mapToControlMLEonAPI) + { + if (mapToControlMLEonAPI == null) + { + return; + } + + foreach (var entry in mapToControlMLEonAPI) + { + var key = entry.Key; + var value = entry.Value; + + if (string.IsNullOrEmpty(value)) + { + Logger.Error($"ConfigException : Invalid MLE control map value for key '{key}'. Value cannot be null or empty."); + throw new Exception($"Invalid MLE control map value for key '{key}'. Value cannot be null or empty."); + } + + // Check if value contains "::" separator + if (value.Contains("::")) + { + var parts = value.Split(new[] { "::" }, StringSplitOptions.None); + + if (parts.Length != 2) + { + Logger.Error($"ConfigException : Invalid MLE control map value format for key '{key}'. Expected format: true/false for 'requestMLE::responseMLE' but got: '{value}'"); + throw new Exception($"Invalid MLE control map value format for key '{key}'. Expected format: true/false for 'requestMLE::responseMLE' but got: '{value}'"); + } + + var requestMLE = parts[0]; + var responseMLE = parts[1]; + + // Validate first part (request MLE) - can be empty, "true", or "false" + if (!string.IsNullOrEmpty(requestMLE) && !Utility.IsValidBooleanString(requestMLE)) + { + Logger.Error($"ConfigException : Invalid request MLE value for key '{key}'. Expected 'true', 'false', or empty but got: '{requestMLE}'"); + throw new Exception($"Invalid request MLE value for key '{key}'. Expected 'true', 'false', or empty but got: '{requestMLE}'"); + } + + // Validate second part (response MLE) - can be empty, "true", or "false" + if (!string.IsNullOrEmpty(responseMLE) && !Utility.IsValidBooleanString(responseMLE)) + { + Logger.Error($"ConfigException : Invalid response MLE value for key '{key}'. Expected 'true', 'false', or empty but got: '{responseMLE}'"); + throw new Exception($"Invalid response MLE value for key '{key}'. Expected 'true', 'false', or empty but got: '{responseMLE}'"); + } + } + else + { + // Value without "::" separator - should be "true" or "false" + if (!Utility.IsValidBooleanString(value)) + { + Logger.Error($"ConfigException : Invalid MLE control map value for key '{key}'. Expected 'true' or 'false' for requestMLE but got: '{value}'"); + throw new Exception($"Invalid MLE control map value for key '{key}'. Expected 'true' or 'false' for requestMLE but got: '{value}'"); + } + } + } + } + private void ValidateProperties() { // Validating and setting up Authentication type diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs new file mode 100644 index 00000000..ab5a2640 --- /dev/null +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace AuthenticationSdk.util +{ + public static class Utility + { + /// + /// Checks if the provided string represents a valid boolean value ("true" or "false", case-insensitive). + /// + /// The string to validate. + /// True if the string is "true" or "false" (case-insensitive); otherwise, false. + public static bool IsValidBooleanString(string value) + { + return string.Equals(value, "true", StringComparison.OrdinalIgnoreCase) || + string.Equals(value, "false", StringComparison.OrdinalIgnoreCase); + } + } +} From 8b7321ec39ac5895e6c91ed35348d29972dcc7ec Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Thu, 11 Sep 2025 11:35:03 +0530 Subject: [PATCH 07/41] modified MLE Validation to work with new split maps and changed the map names in MLE Utility --- .../AuthenticationSdk/core/MerchantConfig.cs | 26 ++++++++++++------- .../AuthenticationSdk/util/MLEUtility.cs | 6 ++--- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index 1d988669..d3781fc0 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -902,9 +902,9 @@ private void ValidateMLEProperties() bool requestMleConfigured = EnableRequestMLEForOptionalApisGlobally; - if (MapToControlMLEonAPI != null && MapToControlMLEonAPI.Count > 0) + if (InternalMapToControlRequestMLEonAPI != null && InternalMapToControlRequestMLEonAPI.Count > 0) { - foreach (bool value in MapToControlMLEonAPI.Values) + foreach (bool value in InternalMapToControlRequestMLEonAPI.Values) { if (value) { @@ -936,7 +936,20 @@ private void ValidateMLEProperties() } // Validation for MLE Response Configuration - if (EnableResponseMleGlobally) + + bool responseMleConfigured = EnableResponseMleGlobally; + if (InternalMapToControlResponseMLEonAPI != null && InternalMapToControlResponseMLEonAPI.Count > 0) + { + foreach (bool value in InternalMapToControlResponseMLEonAPI.Values) + { + if (value) + { + responseMleConfigured = true; + break; + } + } + } + if (responseMleConfigured) { // Validate for Auth type - Currently responseMLE feature will be enabled for JWT auth type only if (!Enumerations.AuthenticationType.JWT.ToString().Equals(AuthenticationType, StringComparison.OrdinalIgnoreCase)) @@ -965,13 +978,6 @@ private void ValidateMLEProperties() throw new Exception("Invalid responseMlePrivateKeyFilePath - " + err.Message); } } - - // Uncomment below if responseMleKID is mandatory when response MLE is enabled - // if (string.IsNullOrEmpty(ResponseMleKID)) - // { - // Logger.Error("Response MLE is enabled but responseMleKID is not provided."); - // throw new Exception("Response MLE is enabled but responseMleKID is not provided."); - // } } } diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index bab61522..d06de179 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -36,13 +36,13 @@ public static bool CheckIsMLEForAPI(MerchantConfig merchantConfig, string inboun } // Control the MLE only from map - if (merchantConfig.MapToControlMLEonAPI != null && merchantConfig.MapToControlMLEonAPI.Count > 0) + if (merchantConfig.InternalMapToControlRequestMLEonAPI != null && merchantConfig.InternalMapToControlRequestMLEonAPI.Count > 0) { foreach (string operationId in operationArray) { - if (merchantConfig.MapToControlMLEonAPI.ContainsKey(operationId)) + if (merchantConfig.InternalMapToControlRequestMLEonAPI.ContainsKey(operationId)) { - isMLEForAPI = merchantConfig.MapToControlMLEonAPI[operationId]; + isMLEForAPI = merchantConfig.InternalMapToControlRequestMLEonAPI[operationId]; break; } } From a35a638250272b41d770cda403cae9b1f0f9de44 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Thu, 11 Sep 2025 11:42:00 +0530 Subject: [PATCH 08/41] added Validation for resonseMleKID config --- .../AuthenticationSdk/core/MerchantConfig.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index d3781fc0..d53d6c06 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -978,6 +978,12 @@ private void ValidateMLEProperties() throw new Exception("Invalid responseMlePrivateKeyFilePath - " + err.Message); } } + // Validate responseMleKID is provided when response MLE is enabled + if (string.IsNullOrEmpty(ResponseMleKID)) + { + Logger.Error("ConfigException : Response MLE is enabled but responseMleKID is not provided."); + throw new Exception("Response MLE is enabled but responseMleKID is not provided."); + } } } From 9dc1b91f3dd3f353f120852e3c39bba8bb2d9386 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Thu, 11 Sep 2025 12:00:36 +0530 Subject: [PATCH 09/41] added CheckIsResponseMLEForAPI function in MLEUtility --- .../AuthenticationSdk/util/MLEUtility.cs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index d06de179..d258d740 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -128,5 +128,37 @@ private static object CreateJsonObject(string jweToken) var jsonObject = new { encryptedRequest = jweToken }; return JsonConvert.SerializeObject(jsonObject); } + public static bool CheckIsResponseMLEForAPI(MerchantConfig merchantConfig, string operationIds) + { + // isMLE for response for an api is false by default + bool isResponseMLEForAPI = false; + + if (merchantConfig.EnableResponseMleGlobally) + { + isResponseMLEForAPI = true; + } + + // operationIds are array as there are multiple public functions for apiCallFunction such as apiCall, apiCallAsync .. + string[] operationArray = operationIds.Split(','); + for (int i = 0; i < operationArray.Length; i++) + { + operationArray[i] = operationArray[i].Trim(); + } + + // Control the Response MLE only from map + // Special Note: If API expects MLE Response mandatory and map is saying to receive non MLE response then API might throw an error from CyberSource + if (merchantConfig.InternalMapToControlResponseMLEonAPI != null && merchantConfig.InternalMapToControlResponseMLEonAPI.Count > 0) + { + foreach (string operationId in operationArray) + { + if (merchantConfig.InternalMapToControlResponseMLEonAPI.ContainsKey(operationId)) + { + isResponseMLEForAPI = merchantConfig.InternalMapToControlResponseMLEonAPI[operationId]; + break; + } + } + } + return isResponseMLEForAPI; + } } } \ No newline at end of file From 50f0ee1ecafe99bf561a7d6f38ed0916f30d573b Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Fri, 12 Sep 2025 15:15:19 +0530 Subject: [PATCH 10/41] dropping support for mapToControlMLEonAPI --- .../AuthenticationSdk/core/MerchantConfig.cs | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index d53d6c06..72d9b4ef 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -73,19 +73,6 @@ public MerchantConfig(IReadOnlyDictionary merchantConfigDictiona ValidateMLEProperties(); } - private static Dictionary ConvertMLEApiMapToString(Dictionary mapToControlMLEonAPI) - { - return mapToControlMLEonAPI?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToString()); - } - - public MerchantConfig(IReadOnlyDictionary merchantConfigDictionary = null, Dictionary mapToControlMLEonAPI = null, System.Security.Cryptography.AsymmetricAlgorithm responseMlePrivateKey = null) - : this( - merchantConfigDictionary, - ConvertMLEApiMapToString(mapToControlMLEonAPI), - responseMlePrivateKey) - { - // This constructor delegates to the main constructor. - } #region Class Properties public string MerchantId { get; set; } @@ -192,9 +179,12 @@ public bool UseMLEGlobally get => EnableRequestMLEForOptionalApisGlobally; set => EnableRequestMLEForOptionalApisGlobally = value; } - - public Dictionary MapToControlMLEonAPI { get => MapToControlMLEonAPI; - set { + private Dictionary _mapToControlMLEonAPI { get; set; } + public Dictionary MapToControlMLEonAPI + { + get => _mapToControlMLEonAPI; + set + { // Validate the map values of MLE Config if not null if (value != null) { @@ -242,8 +232,9 @@ public bool UseMLEGlobally this.InternalMapToControlRequestMLEonAPI = internalMapToControlRequestMLEonAPI; this.InternalMapToControlResponseMLEonAPI = internalMapToControlResponseMLEonAPI; + _mapToControlMLEonAPI = value; } - } + } } public Dictionary InternalMapToControlRequestMLEonAPI { get; set; } public Dictionary InternalMapToControlResponseMLEonAPI { get; set; } From 3fb548de88310e4eb405e02a70d1d969fcdb1386 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Wed, 17 Sep 2025 13:30:58 +0530 Subject: [PATCH 11/41] added doc for RequestMleKeyAlias --- .../AuthenticationSdk/core/MerchantConfig.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index 72d9b4ef..aa72f013 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -241,6 +241,11 @@ public Dictionary MapToControlMLEonAPI public string MleForRequestPublicCertPath { get; set; } + + /** + * Optional parameter. User can pass a custom requestMleKeyAlias to fetch from the certificate. + * Older flag "mleKeyAlias" is deprecated and will be used as alias/another name for requestMleKeyAlias. + */ public string RequestMleKeyAlias { get; set; } /// From 5dff2f48dbc30229930912dc1805305255084432 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Wed, 17 Sep 2025 13:35:31 +0530 Subject: [PATCH 12/41] added v-c-response-mle-kid in jwt body if response MLE for API is enabled --- .../authentication/jwt/JwtToken.cs | 5 +++- .../authentication/jwt/JwtTokenGenerator.cs | 25 +++++++++++++++---- .../AuthenticationSdk/core/Authorize.cs | 4 +-- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtToken.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtToken.cs index b9ea5ff9..0bdb30a3 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtToken.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtToken.cs @@ -8,7 +8,7 @@ namespace AuthenticationSdk.authentication.jwt { public class JwtToken : Token { - public JwtToken(MerchantConfig merchantConfig) + public JwtToken(MerchantConfig merchantConfig, bool isResponseMLEForApi) { RequestJsonData = merchantConfig.RequestJsonData; HostName = merchantConfig.HostName; @@ -23,6 +23,7 @@ public JwtToken(MerchantConfig merchantConfig) KeyPass = merchantConfig.KeyPass; X509Certificate2Collection certs = Cache.FetchCachedCertificate(P12FilePath, KeyPass); Certificate = Cache.GetCertBasedOnKeyAlias(certs, merchantConfig.KeyAlias); + IsResponseMLEForApi = isResponseMLEForApi; } public string BearerToken { get; set; } @@ -37,6 +38,8 @@ public JwtToken(MerchantConfig merchantConfig) public string KeyPass { get; } + public bool IsResponseMLEForApi { get; set; } + public X509Certificate2 Certificate { get; } } } \ No newline at end of file diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs index 77bb54d6..310b93c2 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs @@ -12,10 +12,10 @@ public class JwtTokenGenerator : ITokenGenerator private readonly MerchantConfig _merchantConfig; private readonly JwtToken _jwtToken; - public JwtTokenGenerator(MerchantConfig merchantConfig) + public JwtTokenGenerator(MerchantConfig merchantConfig,bool isResponseMLEForApi) { _merchantConfig = merchantConfig; - _jwtToken = new JwtToken(_merchantConfig); + _jwtToken = new JwtToken(_merchantConfig,isResponseMLEForApi); } public Token GetToken() @@ -54,7 +54,15 @@ private string SetToken() private string TokenForCategory1() { - var jwtBody = $"{{ \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\"}}"; + var jwtBody = ""; + if (_jwtToken.IsResponseMLEForApi) + { + jwtBody = $"{{ \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\", \"v-c-response-mle-kid\":\"{_merchantConfig.ResponseMleKID}\" }}"; + } + else + { + jwtBody = $"{{ \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\"}}"; + } var x5Cert = _jwtToken.Certificate; @@ -81,8 +89,15 @@ private string TokenForCategory1() private string TokenForCategory2() { var digest = GenerateDigest(_jwtToken.RequestJsonData); - - var jwtBody = $"{{\n \"digest\":\"{digest}\", \"digestAlgorithm\":\"SHA-256\", \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\"}}"; + var jwtBody = ""; + if (_jwtToken.IsResponseMLEForApi) + { + jwtBody = $"{{\n \"digest\":\"{digest}\", \"digestAlgorithm\":\"SHA-256\", \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\", \"v-c-response-mle-kid\":\"{_merchantConfig.ResponseMleKID}\"}}"; + } + else + { + jwtBody = $"{{\n \"digest\":\"{digest}\", \"digestAlgorithm\":\"SHA-256\", \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\"}}"; + } var x5Cert = _jwtToken.Certificate; diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/Authorize.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/Authorize.cs index 0cb1ed2b..0b8db77d 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/Authorize.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/Authorize.cs @@ -86,7 +86,7 @@ public HttpToken GetSignature() * @return a JwtToken object (JWT Bearer Token), * based on the Merchant Configuration passed to the Constructor of Authorize Class */ - public JwtToken GetToken() + public JwtToken GetToken(bool isResponseMLEForApi = false) { try { @@ -101,7 +101,7 @@ public JwtToken GetToken() throw new Exception("Missing or Empty Credentials : MerchantID or KeyAlias or KeyPassphrase"); } - var tokenObj = (JwtToken)new JwtTokenGenerator(_merchantConfig).GetToken(); + var tokenObj = (JwtToken)new JwtTokenGenerator(_merchantConfig,isResponseMLEForApi).GetToken(); if (_merchantConfig.IsGetRequest || _merchantConfig.IsDeleteRequest) { From 71f717dec63d85ea52a444ffa3511d871554ad4c Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Wed, 17 Sep 2025 14:34:15 +0530 Subject: [PATCH 13/41] renamed GetMLECertificate to GetRequestMLECertificate --- .../AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index d258d740..eb17a37f 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -60,7 +60,7 @@ public static object EncryptRequestPayload(MerchantConfig merchantConfig, object string payload = requestBody.ToString(); logUtility.LogDebugMessage(logger, Constants.LOG_REQUEST_BEFORE_MLE + payload); - X509Certificate2 mleCertificate = GetMLECertificate(merchantConfig); + X509Certificate2 mleCertificate = GetRequestMLECertificate(merchantConfig); // Handling special case : MLE Certificate is not currently available for HTTP Signature if (mleCertificate == null && Constants.AuthMechanismHttp.Equals(merchantConfig.AuthenticationType, StringComparison.OrdinalIgnoreCase)) @@ -90,7 +90,7 @@ public static object EncryptRequestPayload(MerchantConfig merchantConfig, object return mleRequest; } - private static X509Certificate2 GetMLECertificate(MerchantConfig merchantConfig) + private static X509Certificate2 GetRequestMLECertificate(MerchantConfig merchantConfig) { X509Certificate2 mleCertificate = Cache.GetRequestMLECertFromCache(merchantConfig); return mleCertificate; From 06136a9fe44750068378bb053e39ad54dd20a3b6 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Wed, 17 Sep 2025 14:40:22 +0530 Subject: [PATCH 14/41] Added validation for responseMlePrivateKey and responseMlePrivateKeyFilePath- both should not be provided --- .../AuthenticationSdk/core/MerchantConfig.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index aa72f013..5b3e50be 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -961,6 +961,13 @@ private void ValidateMLEProperties() throw new Exception("Response MLE is enabled but no private key provided. Either set ResponseMlePrivateKey object or provide ResponseMlePrivateKeyFilePath."); } + // Check if both private key object and private key file path are provided + if (ResponseMlePrivateKey != null && !string.IsNullOrEmpty(ResponseMlePrivateKeyFilePath)) + { + Logger.Error("ConfigException : Both responseMlePrivateKey object and responseMlePrivateKeyFilePath are provided. Please provide only one of them for response mle private key."); + throw new Exception("Both responseMlePrivateKey object and responseMlePrivateKeyFilePath are provided. Please provide only one of them for response mle private key."); + } + // If private key file path is provided, validate the file exists if (!string.IsNullOrEmpty(ResponseMlePrivateKeyFilePath)) { From 4cb207b40637dd0ac477f8a00b6d8e1d6e422f76 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Thu, 18 Sep 2025 13:22:03 +0530 Subject: [PATCH 15/41] Added function to read private key from files like pem, p12 , p8 etc --- .../AuthenticationSdk/util/Utility.cs | 345 ++++++++++++++++++ 1 file changed, 345 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs index ab5a2640..c133a603 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs @@ -1,6 +1,15 @@ using System; using System.Collections.Generic; +using System.IO; +using System.Security.Cryptography; +using System.Security.Cryptography.X509Certificates; using System.Text; +using Org.BouncyCastle.Asn1.Pkcs; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Parameters; +using Org.BouncyCastle.OpenSsl; +using Org.BouncyCastle.Pkcs; +using Org.BouncyCastle.Security; namespace AuthenticationSdk.util { @@ -16,5 +25,341 @@ public static bool IsValidBooleanString(string value) return string.Equals(value, "true", StringComparison.OrdinalIgnoreCase) || string.Equals(value, "false", StringComparison.OrdinalIgnoreCase); } + + /// + /// Reads a private key from a PKCS#12 (.p12 or .pfx) file. + /// + /// Path to the PKCS#12 file. + /// Password to unlock the file. + /// The RSA or ECDsa private key. + /// If the file doesn't exist. + /// If no private key is found. + /// If the file is invalid or the password is wrong. + public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, string password = "") + { + if (string.IsNullOrWhiteSpace(p12FilePath)) + throw new ArgumentException("File path cannot be null or empty", nameof(p12FilePath)); + + if (!File.Exists(p12FilePath)) + throw new FileNotFoundException("The specified PKCS#12 file was not found.", p12FilePath); + + try + { + // Load the certificate (including private key) from the P12 file + var cert = new X509Certificate2( + p12FilePath, + password, + X509KeyStorageFlags.Exportable | X509KeyStorageFlags.MachineKeySet + ); + + // Check if private key exists + if (!cert.HasPrivateKey) + throw new InvalidOperationException("No private key found in the P12 file."); + + // Try RSA first + var rsaKey = cert.GetRSAPrivateKey(); + if (rsaKey != null) + return rsaKey; + + // Try ECDsa next + var ecdsaKey = cert.GetECDsaPrivateKey(); + if (ecdsaKey != null) + return ecdsaKey; + + throw new InvalidOperationException("Private key found but unsupported algorithm type."); + } + catch (CryptographicException ex) + { + throw new CryptographicException("Failed to read private key. Possible causes: wrong password, corrupted file, or unsupported format.", ex); + } + } + + /// + /// Extracts private key supporting PKCS#1 and PKCS#8, encrypted and unencrypted + /// + /// PEM content as string + /// Password for encrypted keys (optional) + /// RSA private key object + public static RSA ExtractPrivateKey(string pemContent, string password = null) + { + try + { + // First try with PemReader (handles most PEM formats) + var privateKey = ExtractWithPemReader(pemContent, password); + if (privateKey != null) + return ConvertToRSA(privateKey); + + // If PemReader fails, try manual parsing + return ExtractWithManualParsing(pemContent, password); + } + catch (Exception ex) + { + throw new InvalidOperationException($"Failed to extract private key: {ex.Message}", ex); + } + } + + /// + /// Extracts private key from file + /// + public static RSA ExtractPrivateKeyFromFile(string filePath, string password = null) + { + if (!File.Exists(filePath)) + throw new FileNotFoundException($"Private key file not found: {filePath}"); + + string pemContent = File.ReadAllText(filePath); + return ExtractPrivateKey(pemContent, password); + } + + /// + /// Extract using PemReader (handles standard PEM formats) + /// + private static AsymmetricKeyParameter ExtractWithPemReader(string pemContent, string password) + { + try + { + using var stringReader = new StringReader(pemContent); + var pemReader = new PemReader(stringReader, new PasswordFinder(password)); + + var keyObject = pemReader.ReadObject(); + + if (keyObject is AsymmetricCipherKeyPair keyPair) + { + return keyPair.Private; + } + else if (keyObject is AsymmetricKeyParameter keyParam && keyParam.IsPrivate) + { + return keyParam; + } + + return null; + } + catch + { + return null; + } + } + + /// + /// Manual parsing for different key formats + /// + private static RSA ExtractWithManualParsing(string pemContent, string password) + { + // Remove PEM headers and decode base64 + var base64Content = ExtractBase64FromPem(pemContent); + var keyBytes = Convert.FromBase64String(base64Content); + + // Determine the key format and handle accordingly + if (IsPkcs8Format(pemContent)) + { + return HandlePkcs8Key(keyBytes, password); + } + else if (IsPkcs1Format(pemContent)) + { + return HandlePkcs1Key(keyBytes, password); + } + else + { + throw new NotSupportedException("Unsupported key format"); + } + } + + /// + /// Handle PKCS#8 format keys (encrypted and unencrypted) + /// + private static RSA HandlePkcs8Key(byte[] keyBytes, string password) + { + try + { + if (string.IsNullOrEmpty(password)) + { + // Unencrypted PKCS#8 + var privateKeyInfo = PrivateKeyInfo.GetInstance(keyBytes); + var privateKey = PrivateKeyFactory.CreateKey(privateKeyInfo); + return ConvertToRSA(privateKey); + } + else + { + // Encrypted PKCS#8 + var encryptedPrivateKeyInfo = EncryptedPrivateKeyInfo.GetInstance(keyBytes); + var privateKeyInfo = PrivateKeyInfoFactory.CreatePrivateKeyInfo( + password.ToCharArray(), encryptedPrivateKeyInfo); + var privateKey = PrivateKeyFactory.CreateKey(privateKeyInfo); + return ConvertToRSA(privateKey); + } + } + catch (Exception ex) + { + throw new InvalidOperationException($"Failed to parse PKCS#8 key: {ex.Message}", ex); + } + } + + /// + /// Handle PKCS#1 format keys + /// + private static RSA HandlePkcs1Key(byte[] keyBytes, string password) + { + try + { + if (!string.IsNullOrEmpty(password)) + { + throw new NotSupportedException("Encrypted PKCS#1 keys are not directly supported. Use PKCS#8 format for encrypted keys."); + } + + // Parse PKCS#1 RSA private key + var rsaPrivateKey = RsaPrivateKeyStructure.GetInstance(keyBytes); + var rsaParams = new RsaPrivateCrtKeyParameters( + rsaPrivateKey.Modulus, + rsaPrivateKey.PublicExponent, + rsaPrivateKey.PrivateExponent, + rsaPrivateKey.Prime1, + rsaPrivateKey.Prime2, + rsaPrivateKey.Exponent1, + rsaPrivateKey.Exponent2, + rsaPrivateKey.Coefficient); + + return ConvertToRSA(rsaParams); + } + catch (Exception ex) + { + throw new InvalidOperationException($"Failed to parse PKCS#1 key: {ex.Message}", ex); + } + } + + /// + /// Convert Bouncy Castle RSA parameters to .NET RSA object + /// + private static RSA ConvertToRSA(AsymmetricKeyParameter privateKey) + { + if (!(privateKey is RsaPrivateCrtKeyParameters rsaParams)) + { + throw new InvalidOperationException("Key is not an RSA private key"); + } + + var rsa = RSA.Create(); + var parameters = new RSAParameters + { + Modulus = rsaParams.Modulus.ToByteArrayUnsigned(), + Exponent = rsaParams.PublicExponent.ToByteArrayUnsigned(), + D = rsaParams.Exponent.ToByteArrayUnsigned(), + P = rsaParams.P.ToByteArrayUnsigned(), + Q = rsaParams.Q.ToByteArrayUnsigned(), + DP = rsaParams.DP.ToByteArrayUnsigned(), + DQ = rsaParams.DQ.ToByteArrayUnsigned(), + InverseQ = rsaParams.QInv.ToByteArrayUnsigned() + }; + + rsa.ImportParameters(parameters); + return rsa; + } + + /// + /// Extract base64 content from PEM format + /// + private static string ExtractBase64FromPem(string pemContent) + { + var lines = pemContent.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + var base64Lines = new System.Collections.Generic.List(); + + bool inKey = false; + foreach (var line in lines) + { + if (line.StartsWith("-----BEGIN")) + { + inKey = true; + continue; + } + if (line.StartsWith("-----END")) + { + break; + } + if (inKey && !line.StartsWith("Proc-Type:") && !line.StartsWith("DEK-Info:")) + { + base64Lines.Add(line.Trim()); + } + } + + return string.Join("", base64Lines); + } + + /// + /// Check if PEM content is PKCS#8 format + /// + private static bool IsPkcs8Format(string pemContent) + { + return pemContent.Contains("-----BEGIN PRIVATE KEY-----") || + pemContent.Contains("-----BEGIN ENCRYPTED PRIVATE KEY-----"); + } + + /// + /// Check if PEM content is PKCS#1 format + /// + private static bool IsPkcs1Format(string pemContent) + { + return pemContent.Contains("-----BEGIN RSA PRIVATE KEY-----"); + } + + /// + /// Password finder for encrypted keys + /// + private class PasswordFinder : IPasswordFinder + { + private readonly string _password; + + public PasswordFinder(string password) + { + _password = password; + } + + public char[] GetPassword() + { + return _password?.ToCharArray(); + } + } + + /// + /// Get detailed information about the extracted key + /// + public static KeyInfo GetKeyInfo(string pemContent, string password = null) + { + using var rsa = ExtractPrivateKey(pemContent, password); + var parameters = rsa.ExportParameters(false); // Export public parameters only for info + + return new KeyInfo + { + KeySize = rsa.KeySize, + KeyFormat = DetermineKeyFormat(pemContent), + IsEncrypted = DetermineIfEncrypted(pemContent), + ModulusSize = parameters.Modulus?.Length * 8 ?? 0 + }; + } + + private static string DetermineKeyFormat(string pemContent) + { + if (IsPkcs8Format(pemContent)) + return "PKCS#8"; + else if (IsPkcs1Format(pemContent)) + return "PKCS#1"; + else + return "Unknown"; + } + + private static bool DetermineIfEncrypted(string pemContent) + { + return pemContent.Contains("-----BEGIN ENCRYPTED PRIVATE KEY-----") || + pemContent.Contains("Proc-Type: 4,ENCRYPTED"); + } + + } + public class KeyInfo + { + public int KeySize { get; set; } + public string KeyFormat { get; set; } + public bool IsEncrypted { get; set; } + public int ModulusSize { get; set; } + + public override string ToString() + { + return $"Key Size: {KeySize} bits, Format: {KeyFormat}, Encrypted: {IsEncrypted}, Modulus: {ModulusSize} bits"; + } } } From 9b4505b834ee0670d062c93f00fb26b3c8078af6 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Thu, 18 Sep 2025 13:22:54 +0530 Subject: [PATCH 16/41] new label added for response mle key --- .../AuthenticationSdk/AuthenticationSdk/util/Constants.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs index 2cd44363..05451032 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs @@ -45,5 +45,7 @@ public static class Constants public static readonly string MLE_CACHE_IDENTIFIER_FOR_CONFIG_CERT = "mleCertFromMerchantConfig"; public static readonly string MLE_CACHE_IDENTIFIER_FOR_P12_CERT = "mleCertFromP12"; + + public static readonly string MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY = "mleResponsePrivateKeyFromFile"; } } From 9006dc7edb65cf67d84db164fc21e500331ec7c1 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Sun, 21 Sep 2025 18:10:23 +0530 Subject: [PATCH 17/41] added Caching support for Response MLE Private Key --- .../AuthenticationSdk/util/Cache.cs | 92 +++++++++++++++++-- 1 file changed, 86 insertions(+), 6 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs index a1c909f9..422d538d 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs @@ -7,6 +7,7 @@ using Org.BouncyCastle.Security; using System; using System.Collections.Generic; +using System.Configuration; using System.IO; using System.Runtime.Caching; using System.Security.Cryptography; @@ -35,6 +36,12 @@ private class CertInfo public X509Certificate2 MLECertificate { get; set; } } + private class PrivateKeyInfo + { + public AsymmetricAlgorithm PrivateKey { get; set; } + public DateTime Timestamp { get; set; } + } + public static X509Certificate2Collection FetchCachedCertificate(string p12FilePath, string keyPassword) { try @@ -173,6 +180,57 @@ private static X509Certificate2 GetMLECertBasedOnCacheKey(MerchantConfig merchan private static void SetupCache(MerchantConfig merchantConfig, string cacheKey, string certificateFilePath) { + var policy = new CacheItemPolicy(); + var filePaths = new List(); + var cachedFilePath = Path.GetFullPath(certificateFilePath); + filePaths.Add(cachedFilePath); + policy.ChangeMonitors.Add(new HostFileChangeMonitor(filePaths)); + + ObjectCache cache = MemoryCache.Default; + + if (cacheKey.EndsWith(Constants.MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY)) + { + try + { + string fileExtension = Path.GetExtension(certificateFilePath)?.TrimStart('.').ToLowerInvariant(); + AsymmetricAlgorithm mlePrivateKey = null; + string password = merchantConfig.ResponseMlePrivateKeyFilePassword; + + // Case 1 - PKCS#12 formats (.p12, .pfx) + if (fileExtension == "p12" || fileExtension == "pfx") + { + mlePrivateKey = Utility.ReadPrivateKeyFromP12(certificateFilePath, password); + } + // Case 2 - PEM-based formats (.pem, .key, .p8) + else if (fileExtension == "pem" || fileExtension == "key" || fileExtension == "p8") + { + mlePrivateKey = (AsymmetricAlgorithm) Utility.ExtractPrivateKeyFromFile(certificateFilePath, password); + } + else + { + throw new Exception($"Unsupported Response MLE Private Key file format: {fileExtension}. Supported formats are: .p12, .pfx, .pem, .key, .p8"); + } + + PrivateKeyInfo privateKeyInfo = new PrivateKeyInfo + { + PrivateKey = mlePrivateKey, + Timestamp = File.GetLastWriteTime(certificateFilePath) + }; + + lock (mutex) + { + cache.Set(cacheKey, privateKeyInfo, policy); + } + } + catch (Exception e) + { + logger.Error($"Error loading MLE response private key from: {certificateFilePath}. Error: {e.Message}"); + throw new Exception($"Error loading MLE response private key from: {certificateFilePath}. Error: {e.Message}", e); + } + return; + } + + // ... existing code for other cacheKey cases ... X509Certificate2 mleCertificate = null; if (cacheKey.EndsWith(Constants.MLE_CACHE_IDENTIFIER_FOR_CONFIG_CERT)) @@ -215,13 +273,7 @@ private static void SetupCache(MerchantConfig merchantConfig, string cacheKey, s Timestamp = File.GetLastWriteTime(certificateFilePath) }; - var policy = new CacheItemPolicy(); - var filePaths = new List(); - var cachedFilePath = Path.GetFullPath(certificateFilePath); - filePaths.Add(cachedFilePath); - policy.ChangeMonitors.Add(new HostFileChangeMonitor(filePaths)); - ObjectCache cache = MemoryCache.Default; lock(mutex) { cache.Set(cacheKey, certInfo, policy); @@ -236,5 +288,33 @@ private static X509Certificate2Collection FetchCertificateCollectionFromP12File( //return all certs in p12 return certificates; } + public static AsymmetricAlgorithm GetMleResponsePrivateKeyFromFilePath(MerchantConfig merchantConfig) + { + string merchantId = merchantConfig.MerchantId; + string identifier = Constants.MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY; + string cacheKey = $"{merchantId}_{identifier}"; + string mleResponsePrivateKeyFilePath = merchantConfig.ResponseMlePrivateKeyFilePath; + + ObjectCache cache = MemoryCache.Default; + + if (!cache.Contains(cacheKey)) + { + SetupCache(merchantConfig, cacheKey, mleResponsePrivateKeyFilePath); + } + else + { + var responseMlePrivateKeyInfo = (PrivateKeyInfo)cache.Get(cacheKey); + if (responseMlePrivateKeyInfo == null || responseMlePrivateKeyInfo.Timestamp != File.GetLastWriteTime(mleResponsePrivateKeyFilePath)) + { + SetupCache(merchantConfig, cacheKey, mleResponsePrivateKeyFilePath); + } + } + + var cachedResponseMlePrivateKeyInfo = (PrivateKeyInfo)cache.Get(cacheKey); + RSA privateKey = (RSA)cachedResponseMlePrivateKeyInfo?.PrivateKey; + // Assuming CertInfo is extended to include MLEPrivateKey for response + return cachedResponseMlePrivateKeyInfo?.PrivateKey; + + } } } From 08dce7ff3ec23bdf7c2e6b32e4e7b4ce4fac5d47 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Sun, 21 Sep 2025 20:18:07 +0530 Subject: [PATCH 18/41] added CheckIsMleEncryptedResponse and DecryptMleResponsePayload in MLE Utility --- .../AuthenticationSdk/util/MLEUtility.cs | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index eb17a37f..f050eb23 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Security.Cryptography.X509Certificates; +using System.Security.Cryptography; namespace AuthenticationSdk.util { @@ -160,5 +161,95 @@ public static bool CheckIsResponseMLEForAPI(MerchantConfig merchantConfig, strin } return isResponseMLEForAPI; } + + public static bool CheckIsMleEncryptedResponse(string responseBody) + { + if (string.IsNullOrWhiteSpace(responseBody)) + { + return false; + } + try + { + var jsonObject = JsonConvert.DeserializeObject(responseBody); + if (jsonObject == null || jsonObject.Count != 1) + { + return false; + } + if (jsonObject.ContainsKey("encryptedResponse")) + { + var value = jsonObject["encryptedResponse"]; + return value != null && value.Type == Newtonsoft.Json.Linq.JTokenType.String; + } + return false; + } + catch + { + // If JSON parsing fails, it's not a valid JSON thus not a MLE response + return false; + } + } + private static string GetResponseMleToken(string mleResponseBody) + { + try + { + var jsonObject = JsonConvert.DeserializeObject(mleResponseBody); + return jsonObject?["encryptedResponse"]?.ToString(); + } + catch (Exception e) + { + logger.Error("Failed to extract Response MLE token: " + e.Message); + return null; + } + } + private static AsymmetricAlgorithm GetMleResponsePrivateKey(MerchantConfig merchantConfig) + { + // First priority - if privateKey is given in merchant config return that + if (merchantConfig.ResponseMlePrivateKey != null) + { + return merchantConfig.ResponseMlePrivateKey; + } + // Second priority - get the privateKey from merchantConfig.ResponseMlePrivateKeyFilePath + var responseMlePrivateKey = Cache.GetMleResponsePrivateKeyFromFilePath(merchantConfig); + return responseMlePrivateKey; + } + public static string DecryptMleResponsePayload(MerchantConfig merchantConfig, string mleResponseBody) + { + if (!CheckIsMleEncryptedResponse(mleResponseBody)) + { + throw new Exception("Response body is not MLE encrypted."); + } + + var mlePrivateKey = GetMleResponsePrivateKey(merchantConfig); + string jweResponseToken = GetResponseMleToken(mleResponseBody); + + if (string.IsNullOrEmpty(jweResponseToken)) + { + // When MLE token is empty or null then fall back to non MLE encrypted response + return mleResponseBody; + } + + try + { + logger.Debug("LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION: " + mleResponseBody); + + // Convert AsymmetricAlgorithm to RSA if needed + RSA rsaKey = mlePrivateKey as RSA; + if (rsaKey == null) + { + throw new Exception("MLE Response private key is not an RSA key. Only RSA keys are supported for MLE decryption."); + } + string decryptedResponse = JWEUtilty.DecryptUsingRSAParameters(rsaKey.ExportParameters(true), jweResponseToken); + logger.Debug("LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION: " + decryptedResponse); + return decryptedResponse; + } + catch (Jose.JoseException e) + { + throw new Exception("MLE Response decryption JoseException: " + e.Message); + } + catch (Exception e) + { + throw new Exception("MLE Response token Exception: " + e.Message); + } + } } } \ No newline at end of file From da3f3d4059258bf089809142c394206c9c1e39bd Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Tue, 23 Sep 2025 10:44:44 +0530 Subject: [PATCH 19/41] changed error messages for private key handling from files --- .../AuthenticationSdk/AuthenticationSdk/util/Utility.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs index c133a603..0b3648d1 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs @@ -189,7 +189,7 @@ private static RSA HandlePkcs8Key(byte[] keyBytes, string password) } catch (Exception ex) { - throw new InvalidOperationException($"Failed to parse PKCS#8 key: {ex.Message}", ex); + throw new InvalidOperationException($"Possible causes: wrong password, corrupted file, or unsupported format.: {ex.Message}", ex); } } @@ -221,7 +221,7 @@ private static RSA HandlePkcs1Key(byte[] keyBytes, string password) } catch (Exception ex) { - throw new InvalidOperationException($"Failed to parse PKCS#1 key: {ex.Message}", ex); + throw new InvalidOperationException($"Possible causes: wrong password, corrupted file, or unsupported format.: {ex.Message}", ex); } } From f068c074349460a849365aee7091c7e46c980403 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Tue, 23 Sep 2025 10:45:52 +0530 Subject: [PATCH 20/41] fixed log message --- .../AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index f050eb23..c8942f00 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -239,7 +239,7 @@ public static string DecryptMleResponsePayload(MerchantConfig merchantConfig, st throw new Exception("MLE Response private key is not an RSA key. Only RSA keys are supported for MLE decryption."); } string decryptedResponse = JWEUtilty.DecryptUsingRSAParameters(rsaKey.ExportParameters(true), jweResponseToken); - logger.Debug("LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION: " + decryptedResponse); + logger.Debug("LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION: " + decryptedResponse); return decryptedResponse; } catch (Jose.JoseException e) From 57de1761234b2d97dc7ab365f4953f170be157e8 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Tue, 23 Sep 2025 10:49:38 +0530 Subject: [PATCH 21/41] changed the mustache files for API , added isResponseMLEForApi flag and passed ResponseMlePrivate in merchant config --- .../Api/BatchesApi.cs | 64 +++++---- .../Api/BillingAgreementsApi.cs | 48 ++++--- .../Api/BinLookupApi.cs | 16 ++- .../Api/CaptureApi.cs | 16 ++- .../Api/ChargebackDetailsApi.cs | 16 ++- .../Api/ChargebackSummariesApi.cs | 16 ++- .../Api/ConversionDetailsApi.cs | 16 ++- .../Api/CreateNewWebhooksApi.cs | 48 ++++--- .../Api/CreditApi.cs | 16 ++- .../Api/CustomerApi.cs | 60 +++++--- .../Api/CustomerPaymentInstrumentApi.cs | 76 +++++++---- .../Api/CustomerShippingAddressApi.cs | 76 +++++++---- .../Api/DecisionManagerApi.cs | 80 +++++++---- .../Api/DeviceDeAssociationApi.cs | 28 ++-- .../Api/DeviceSearchApi.cs | 32 +++-- .../Api/DownloadDTDApi.cs | 12 +- .../Api/DownloadXSDApi.cs | 12 +- .../Api/EMVTagDetailsApi.cs | 32 +++-- .../Api/FlexAPIApi.cs | 16 ++- .../Api/InstrumentIdentifierApi.cs | 88 +++++++----- .../Api/InterchangeClearingLevelDetailsApi.cs | 16 ++- .../Api/InvoiceSettingsApi.cs | 32 +++-- .../Api/InvoicesApi.cs | 112 +++++++++------ .../Api/ManageWebhooksApi.cs | 104 ++++++++------ .../Api/MerchantBoardingApi.cs | 32 +++-- .../Api/MicroformIntegrationApi.cs | 16 ++- .../Api/NetFundingsApi.cs | 16 ++- .../Api/NotificationOfChangesApi.cs | 16 ++- .../Api/OrdersApi.cs | 32 +++-- .../Api/PayerAuthenticationApi.cs | 48 ++++--- .../Api/PaymentBatchSummariesApi.cs | 16 ++- .../Api/PaymentInstrumentApi.cs | 60 +++++--- .../Api/PaymentLinksApi.cs | 64 +++++---- .../Api/PaymentTokensApi.cs | 16 ++- .../Api/PaymentsApi.cs | 96 ++++++++----- .../Api/PayoutsApi.cs | 16 ++- .../Api/PlansApi.cs | 128 +++++++++++------- .../Api/PurchaseAndRefundDetailsApi.cs | 16 ++- .../Api/PushFundsApi.cs | 16 ++- .../Api/RefundApi.cs | 32 +++-- .../Api/ReportDefinitionsApi.cs | 32 +++-- .../Api/ReportDownloadsApi.cs | 12 +- .../Api/ReportSubscriptionsApi.cs | 68 ++++++---- .../Api/ReportsApi.cs | 44 +++--- .../Api/RetrievalDetailsApi.cs | 16 ++- .../Api/RetrievalSummariesApi.cs | 16 ++- .../Api/ReversalApi.cs | 32 +++-- .../Api/SearchTransactionsApi.cs | 32 +++-- .../Api/SecureFileShareApi.cs | 28 ++-- .../Api/SubscriptionsApi.cs | 128 +++++++++++------- .../Api/SubscriptionsFollowOnsApi.cs | 32 +++-- .../Api/TaxesApi.cs | 32 +++-- .../Api/TokenApi.cs | 32 +++-- .../Api/TokenizedCardApi.cs | 44 +++--- .../Api/TransactionBatchesApi.cs | 56 +++++--- .../Api/TransactionDetailsApi.cs | 16 ++- .../Api/TransientTokenDataApi.cs | 28 ++-- .../Api/UnifiedCheckoutCaptureContextApi.cs | 16 ++- .../Api/UserManagementApi.cs | 16 ++- .../Api/UserManagementSearchApi.cs | 16 ++- .../Api/VerificationApi.cs | 32 +++-- .../Api/VoidApi.cs | 80 +++++++---- .../cybersource-csharp-template/api.mustache | 16 ++- 63 files changed, 1558 insertions(+), 918 deletions(-) diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs index 0fbf4d61..080f84ca 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs @@ -429,7 +429,7 @@ public ApiResponse< InlineResponse20011 > GetBatchReportWithHttpInfo (string bat } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo")) { try @@ -443,12 +443,14 @@ public ApiResponse< InlineResponse20011 > GetBatchReportWithHttpInfo (string bat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -464,7 +466,7 @@ public ApiResponse< InlineResponse20011 > GetBatchReportWithHttpInfo (string bat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011))); // Return statement + (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011),merchantConfig)); // Return statement } /// @@ -546,7 +548,7 @@ public async System.Threading.Tasks.Task> GetBa } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo")) { try @@ -560,12 +562,14 @@ public async System.Threading.Tasks.Task> GetBa } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -581,7 +585,7 @@ public async System.Threading.Tasks.Task> GetBa return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011))); // Return statement + (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011),merchantConfig)); // Return statement } /// /// Retrieve a Batch Status **Get Batch Status**<br>This resource accepts a batch id and returns: - The batch status. - The total number of accepted, rejected, updated records. - The total number of card association responses. - The billable quantities of: - New Account Numbers (NAN) - New Expiry Dates (NED) - Account Closures (ACL) - Contact Card Holders (CCH) @@ -661,7 +665,7 @@ public ApiResponse< InlineResponse20010 > GetBatchStatusWithHttpInfo (string bat } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo")) { try @@ -675,12 +679,14 @@ public ApiResponse< InlineResponse20010 > GetBatchStatusWithHttpInfo (string bat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -696,7 +702,7 @@ public ApiResponse< InlineResponse20010 > GetBatchStatusWithHttpInfo (string bat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010))); // Return statement + (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010),merchantConfig)); // Return statement } /// @@ -778,7 +784,7 @@ public async System.Threading.Tasks.Task> GetBa } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo")) { try @@ -792,12 +798,14 @@ public async System.Threading.Tasks.Task> GetBa } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -813,7 +821,7 @@ public async System.Threading.Tasks.Task> GetBa return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010))); // Return statement + (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010),merchantConfig)); // Return statement } /// /// List Batches **List Batches**<br>This resource accepts a optional date range, record offset and limit, returning a paginated response of batches containing: - The batch id. - The batch status. - The batch created / modified dates. - The total number of accepted, rejected, updated records. - The total number of card association responses. @@ -908,7 +916,7 @@ public ApiResponse< InlineResponse2009 > GetBatchesListWithHttpInfo (long? offse } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo")) { try @@ -922,12 +930,14 @@ public ApiResponse< InlineResponse2009 > GetBatchesListWithHttpInfo (long? offse } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -943,7 +953,7 @@ public ApiResponse< InlineResponse2009 > GetBatchesListWithHttpInfo (long? offse return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009))); // Return statement + (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009),merchantConfig)); // Return statement } /// @@ -1040,7 +1050,7 @@ public async System.Threading.Tasks.Task> GetBat } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo")) { try @@ -1054,12 +1064,14 @@ public async System.Threading.Tasks.Task> GetBat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1075,7 +1087,7 @@ public async System.Threading.Tasks.Task> GetBat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009))); // Return statement + (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009),merchantConfig)); // Return statement } /// /// Create a Batch **Create a Batch**<br>This resource accepts TMS tokens ids of a Customer, Payment Instrument or Instrument Identifier. <br> The card numbers for the supplied tokens ids are then sent to the relevant card associations to check for updates.<br>The following type of batches can be submitted: - **oneOff** batch containing tokens id for Visa or MasterCard card numbers. - **amexRegistration** batch containing tokens id for Amex card numbers. A batch id will be returned on a successful response which can be used to get the batch status and the batch report. The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -1146,7 +1158,7 @@ public ApiResponse< InlineResponse202 > PostBatchWithHttpInfo (Body body) } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo")) { try @@ -1160,13 +1172,15 @@ public ApiResponse< InlineResponse202 > PostBatchWithHttpInfo (Body body) } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1182,7 +1196,7 @@ public ApiResponse< InlineResponse202 > PostBatchWithHttpInfo (Body body) return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202))); // Return statement + (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202),merchantConfig)); // Return statement } /// @@ -1255,7 +1269,7 @@ public async System.Threading.Tasks.Task> PostBat } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo")) { try @@ -1269,13 +1283,15 @@ public async System.Threading.Tasks.Task> PostBat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1291,7 +1307,7 @@ public async System.Threading.Tasks.Task> PostBat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202))); // Return statement + (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BillingAgreementsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BillingAgreementsApi.cs index 9ceb42e6..d71e1a31 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BillingAgreementsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BillingAgreementsApi.cs @@ -387,7 +387,7 @@ public ApiResponse< PtsV2ModifyBillingAgreementPost201Response > BillingAgreemen } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "BillingAgreementsDeRegistration,BillingAgreementsDeRegistrationAsync,BillingAgreementsDeRegistrationWithHttpInfo,BillingAgreementsDeRegistrationAsyncWithHttpInfo")) { try @@ -401,13 +401,15 @@ public ApiResponse< PtsV2ModifyBillingAgreementPost201Response > BillingAgreemen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "BillingAgreementsDeRegistration,BillingAgreementsDeRegistrationAsync,BillingAgreementsDeRegistrationWithHttpInfo,BillingAgreementsDeRegistrationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -423,7 +425,7 @@ public ApiResponse< PtsV2ModifyBillingAgreementPost201Response > BillingAgreemen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response))); // Return statement + (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response),merchantConfig)); // Return statement } /// @@ -509,7 +511,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response))); // Return statement + (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response),merchantConfig)); // Return statement } /// /// Standing Instruction intimation Standing Instruction with or without Token. @@ -629,7 +633,7 @@ public ApiResponse< PtsV2CreditsPost201Response1 > BillingAgreementsIntimationWi } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "BillingAgreementsIntimation,BillingAgreementsIntimationAsync,BillingAgreementsIntimationWithHttpInfo,BillingAgreementsIntimationAsyncWithHttpInfo")) { try @@ -643,13 +647,15 @@ public ApiResponse< PtsV2CreditsPost201Response1 > BillingAgreementsIntimationWi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "BillingAgreementsIntimation,BillingAgreementsIntimationAsync,BillingAgreementsIntimationWithHttpInfo,BillingAgreementsIntimationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -665,7 +671,7 @@ public ApiResponse< PtsV2CreditsPost201Response1 > BillingAgreementsIntimationWi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1))); // Return statement + (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1),merchantConfig)); // Return statement } /// @@ -751,7 +757,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1))); // Return statement + (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1),merchantConfig)); // Return statement } /// /// Create a Billing Agreement #### Standing Instruction: Standing Instruction with or without Token. Transaction amount in case First payment is coming along with registration. Only 2 decimal places allowed #### Create Mandate: You can create a mandate through the direct debit mandate flow. Possible create mandate status values: - Pending—the create mandate request was successfully processed. - Failed—the create mandate request was not accepted. #### Import Mandate: In the Bacs scheme, a mandate is created with a status of active. Direct debit collections can be made against it immediately. You can import a mandate to the CyberSource database when: - You have existing customers with signed, active mandates - You manage mandates outside of CyberSource. When you import an existing mandate to the CyberSource database, provide a unique value for the mandate ID or the request results in an error. If an import mandate request is not accepted, the import mandate status value is failed. @@ -858,7 +866,7 @@ public ApiResponse< PtsV2CreateBillingAgreementPost201Response > BillingAgreemen } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "BillingAgreementsRegistration,BillingAgreementsRegistrationAsync,BillingAgreementsRegistrationWithHttpInfo,BillingAgreementsRegistrationAsyncWithHttpInfo")) { try @@ -872,13 +880,15 @@ public ApiResponse< PtsV2CreateBillingAgreementPost201Response > BillingAgreemen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "BillingAgreementsRegistration,BillingAgreementsRegistrationAsync,BillingAgreementsRegistrationWithHttpInfo,BillingAgreementsRegistrationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -894,7 +904,7 @@ public ApiResponse< PtsV2CreateBillingAgreementPost201Response > BillingAgreemen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response))); // Return statement + (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response),merchantConfig)); // Return statement } /// @@ -967,7 +977,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response))); // Return statement + (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BinLookupApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BinLookupApi.cs index 572dd789..33201f02 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BinLookupApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BinLookupApi.cs @@ -283,7 +283,7 @@ public ApiResponse< InlineResponse2012 > GetAccountInfoWithHttpInfo (CreateBinLo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo")) { try @@ -297,13 +297,15 @@ public ApiResponse< InlineResponse2012 > GetAccountInfoWithHttpInfo (CreateBinLo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -319,7 +321,7 @@ public ApiResponse< InlineResponse2012 > GetAccountInfoWithHttpInfo (CreateBinLo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012))); // Return statement + (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012),merchantConfig)); // Return statement } /// @@ -392,7 +394,7 @@ public async System.Threading.Tasks.Task> GetAcc } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo")) { try @@ -406,13 +408,15 @@ public async System.Threading.Tasks.Task> GetAcc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -428,7 +432,7 @@ public async System.Threading.Tasks.Task> GetAcc return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012))); // Return statement + (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CaptureApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CaptureApi.cs index 30a60a33..e5a12b61 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CaptureApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CaptureApi.cs @@ -299,7 +299,7 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CapturePayment,CapturePaymentAsync,CapturePaymentWithHttpInfo,CapturePaymentAsyncWithHttpInfo")) { try @@ -313,13 +313,15 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CapturePayment,CapturePaymentAsync,CapturePaymentWithHttpInfo,CapturePaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -335,7 +337,7 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response))); // Return statement + (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response),merchantConfig)); // Return statement } /// @@ -421,7 +423,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response))); // Return statement + (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackDetailsApi.cs index eb061ae7..7751d1bc 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackDetailsApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetChargebackDetails,GetChargebackDetailsAsync,GetChargebackDetailsWithHttpInfo,GetChargebackDetailsAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetChargebackDetails,GetChargebackDetailsAsync,GetChargebackDetailsWithHttpInfo,GetChargebackDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response))); // Return statement + (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response),merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response))); // Return statement + (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackSummariesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackSummariesApi.cs index 8edfe553..4551a6b6 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackSummariesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackSummariesApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetChargebackSummaries,GetChargebackSummariesAsync,GetChargebackSummariesWithHttpInfo,GetChargebackSummariesAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetChargebackSummaries,GetChargebackSummariesAsync,GetChargebackSummariesWithHttpInfo,GetChargebackSummariesAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response))); // Return statement + (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response),merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response))); // Return statement + (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ConversionDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ConversionDetailsApi.cs index b15f6576..8e48544c 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ConversionDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ConversionDetailsApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetConversionDetail,GetConversionDetailAsync,GetConversionDetailWithHttpInfo,GetConversionDetailAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetConversionDetail,GetConversionDetailAsync,GetConversionDetailWithHttpInfo,GetConversionDetailAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response))); // Return statement + (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response),merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response))); // Return statement + (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs index 7567bcfd..0f710f61 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs @@ -387,7 +387,7 @@ public ApiResponse< List > FindProductsToSubscribeWithHttpIn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo")) { try @@ -401,12 +401,14 @@ public ApiResponse< List > FindProductsToSubscribeWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -422,7 +424,7 @@ public ApiResponse< List > FindProductsToSubscribeWithHttpIn return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -504,7 +506,7 @@ public async System.Threading.Tasks.Task>> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo")) { try @@ -518,12 +520,14 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -539,7 +543,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// /// Create a New Webhook Subscription Create a new webhook subscription. Before creating a webhook, ensure that a signature key has been created. For the example \"Create Webhook using oAuth with Client Credentials\" - for clients who have more than one oAuth Provider and have different client secrets that they would like to config for a given webhook, they may do so by overriding the keyId inside security config of webhook subscription. See the Developer Center examples section titled \"Webhook Security - Create or Store Egress Symmetric Key - Store oAuth Credentials For Symmetric Key\" to store these oAuth credentials that CYBS will need for oAuth. For JWT authentication, attach your oAuth details to the webhook subscription. See the example \"Create Webhook using oAuth with JWT\" @@ -604,7 +608,7 @@ public ApiResponse< InlineResponse2015 > NotificationSubscriptionsV2WebhooksPost } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo")) { try @@ -618,13 +622,15 @@ public ApiResponse< InlineResponse2015 > NotificationSubscriptionsV2WebhooksPost } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -640,7 +646,7 @@ public ApiResponse< InlineResponse2015 > NotificationSubscriptionsV2WebhooksPost return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015))); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015),merchantConfig)); // Return statement } /// @@ -707,7 +713,7 @@ public async System.Threading.Tasks.Task> Notifi } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo")) { try @@ -721,13 +727,15 @@ public async System.Threading.Tasks.Task> Notifi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -743,7 +751,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015))); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015),merchantConfig)); // Return statement } /// /// Create Webhook Security Keys Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later. @@ -838,7 +846,7 @@ public ApiResponse< InlineResponse2014 > SaveSymEgressKeyWithHttpInfo (string vC } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo")) { try @@ -852,13 +860,15 @@ public ApiResponse< InlineResponse2014 > SaveSymEgressKeyWithHttpInfo (string vC } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -874,7 +884,7 @@ public ApiResponse< InlineResponse2014 > SaveSymEgressKeyWithHttpInfo (string vC return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014))); // Return statement + (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014),merchantConfig)); // Return statement } /// @@ -971,7 +981,7 @@ public async System.Threading.Tasks.Task> SaveSy } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo")) { try @@ -985,13 +995,15 @@ public async System.Threading.Tasks.Task> SaveSy } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1007,7 +1019,7 @@ public async System.Threading.Tasks.Task> SaveSy return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014))); // Return statement + (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreditApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreditApi.cs index 5bcf49ee..6e3ba268 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreditApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreditApi.cs @@ -282,7 +282,7 @@ public ApiResponse< PtsV2CreditsPost201Response > CreateCreditWithHttpInfo (Crea } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateCredit,CreateCreditAsync,CreateCreditWithHttpInfo,CreateCreditAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< PtsV2CreditsPost201Response > CreateCreditWithHttpInfo (Crea } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateCredit,CreateCreditAsync,CreateCreditWithHttpInfo,CreateCreditAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< PtsV2CreditsPost201Response > CreateCreditWithHttpInfo (Crea return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response))); // Return statement + (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response),merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response))); // Return statement + (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerApi.cs index eb7261a4..26ab65ee 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerApi.cs @@ -444,7 +444,7 @@ public ApiResponse DeleteCustomerWithHttpInfo (string customerId, string } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomer,DeleteCustomerAsync,DeleteCustomerWithHttpInfo,DeleteCustomerAsyncWithHttpInfo")) { try @@ -458,12 +458,14 @@ public ApiResponse DeleteCustomerWithHttpInfo (string customerId, string } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomer,DeleteCustomerAsync,DeleteCustomerWithHttpInfo,DeleteCustomerAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -565,7 +567,7 @@ public async System.Threading.Tasks.Task> DeleteCustomerAsyn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomer,DeleteCustomerAsync,DeleteCustomerWithHttpInfo,DeleteCustomerAsyncWithHttpInfo")) { try @@ -579,12 +581,14 @@ public async System.Threading.Tasks.Task> DeleteCustomerAsyn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomer,DeleteCustomerAsync,DeleteCustomerWithHttpInfo,DeleteCustomerAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -687,7 +691,7 @@ public ApiResponse< PostCustomerRequest > GetCustomerWithHttpInfo (string custom } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomer,GetCustomerAsync,GetCustomerWithHttpInfo,GetCustomerAsyncWithHttpInfo")) { try @@ -701,12 +705,14 @@ public ApiResponse< PostCustomerRequest > GetCustomerWithHttpInfo (string custom } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomer,GetCustomerAsync,GetCustomerWithHttpInfo,GetCustomerAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -722,7 +728,7 @@ public ApiResponse< PostCustomerRequest > GetCustomerWithHttpInfo (string custom return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest))); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest),merchantConfig)); // Return statement } /// @@ -810,7 +816,7 @@ public async System.Threading.Tasks.Task> GetCu } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomer,GetCustomerAsync,GetCustomerWithHttpInfo,GetCustomerAsyncWithHttpInfo")) { try @@ -824,12 +830,14 @@ public async System.Threading.Tasks.Task> GetCu } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomer,GetCustomerAsync,GetCustomerWithHttpInfo,GetCustomerAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -845,7 +853,7 @@ public async System.Threading.Tasks.Task> GetCu return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest))); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest),merchantConfig)); // Return statement } /// /// Update a Customer | | | | | - -- | - -- | - -- | |**Customers**<br>A Customer represents your tokenized customer information.<br>You should associate the Customer Id with the customer account on your systems.<br>A Customer can have one or more [Payment Instruments](#token-management_customer-payment-instrument_create-a-customer-payment-instrumentl) or [Shipping Addresses](#token-management_customer-shipping-address_create-a-customer-shipping-address) with one allocated as the Customers default.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customer**<br>Your system can use this API to update a Customers details including selecting a [default Payment Instrument](#token-management_customer_update-a-customer_samplerequests-dropdown_update-customers-default-payment-instrument_liveconsole-tab-request-body) or [default Shipping Address](#token-management_customer_update-a-customer_samplerequests-dropdown_update-customers-default-shipping-address_liveconsole-tab-request-body) for use in payments.<br>Note: Updating a Customers [Payment Instrument](#token-management_customer-payment-instrument_update-a-customer-payment-instrument) or [Shipping Address](#token-management_customer-shipping-address_update-a-customer-shipping-address) details is performed using their own dedicated API resources. @@ -941,7 +949,7 @@ public ApiResponse< PatchCustomerRequest > PatchCustomerWithHttpInfo (string cus } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchCustomer,PatchCustomerAsync,PatchCustomerWithHttpInfo,PatchCustomerAsyncWithHttpInfo")) { try @@ -955,13 +963,15 @@ public ApiResponse< PatchCustomerRequest > PatchCustomerWithHttpInfo (string cus } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchCustomer,PatchCustomerAsync,PatchCustomerWithHttpInfo,PatchCustomerAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -977,7 +987,7 @@ public ApiResponse< PatchCustomerRequest > PatchCustomerWithHttpInfo (string cus return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest))); // Return statement + (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest),merchantConfig)); // Return statement } /// @@ -1075,7 +1085,7 @@ public async System.Threading.Tasks.Task> Patc } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchCustomer,PatchCustomerAsync,PatchCustomerWithHttpInfo,PatchCustomerAsyncWithHttpInfo")) { try @@ -1089,13 +1099,15 @@ public async System.Threading.Tasks.Task> Patc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchCustomer,PatchCustomerAsync,PatchCustomerWithHttpInfo,PatchCustomerAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1111,7 +1123,7 @@ public async System.Threading.Tasks.Task> Patc return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest))); // Return statement + (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest),merchantConfig)); // Return statement } /// /// Create a Customer | | | | | - -- | - -- | - -- | |**Customers**<br>A Customer represents your tokenized customer information.<br>You should associate the Customer Id with the customer account on your systems.<br>A Customer can have one or more [Payment Instruments](#token-management_customer-payment-instrument_create-a-customer-payment-instrumentl) or [Shipping Addresses](#token-management_customer-shipping-address_create-a-customer-shipping-address) with one allocated as the Customers default.<br><br>**Creating a Customer**<br>It is recommended you [create a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>The Customer will be created with a Payment Instrument and Shipping Address.<br>You can also [add additional Payment Instruments to a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body).<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Customers**<br>To perform a payment with the Customers default details specify the [Customer Id in the payments request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-token-id_liveconsole-tab-request-body).<br>To perform a payment with a particular Payment Instrument or Shipping Address <br>specify the [Payment Instrument or Shipping Address Ids in the payments request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -1188,7 +1200,7 @@ public ApiResponse< PostCustomerRequest > PostCustomerWithHttpInfo (PostCustomer } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostCustomer,PostCustomerAsync,PostCustomerWithHttpInfo,PostCustomerAsyncWithHttpInfo")) { try @@ -1202,13 +1214,15 @@ public ApiResponse< PostCustomerRequest > PostCustomerWithHttpInfo (PostCustomer } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostCustomer,PostCustomerAsync,PostCustomerWithHttpInfo,PostCustomerAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1224,7 +1238,7 @@ public ApiResponse< PostCustomerRequest > PostCustomerWithHttpInfo (PostCustomer return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest))); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest),merchantConfig)); // Return statement } /// @@ -1303,7 +1317,7 @@ public async System.Threading.Tasks.Task> PostC } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostCustomer,PostCustomerAsync,PostCustomerWithHttpInfo,PostCustomerAsyncWithHttpInfo")) { try @@ -1317,13 +1331,15 @@ public async System.Threading.Tasks.Task> PostC } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostCustomer,PostCustomerAsync,PostCustomerWithHttpInfo,PostCustomerAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1339,7 +1355,7 @@ public async System.Threading.Tasks.Task> PostC return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest))); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerPaymentInstrumentApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerPaymentInstrumentApi.cs index 3b7eb3c7..7b669a4b 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerPaymentInstrumentApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerPaymentInstrumentApi.cs @@ -527,7 +527,7 @@ public ApiResponse DeleteCustomerPaymentInstrumentWithHttpInfo (string c } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomerPaymentInstrument,DeleteCustomerPaymentInstrumentAsync,DeleteCustomerPaymentInstrumentWithHttpInfo,DeleteCustomerPaymentInstrumentAsyncWithHttpInfo")) { try @@ -541,12 +541,14 @@ public ApiResponse DeleteCustomerPaymentInstrumentWithHttpInfo (string c } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomerPaymentInstrument,DeleteCustomerPaymentInstrumentAsync,DeleteCustomerPaymentInstrumentWithHttpInfo,DeleteCustomerPaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -661,7 +663,7 @@ public async System.Threading.Tasks.Task> DeleteCustomerPaym } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomerPaymentInstrument,DeleteCustomerPaymentInstrumentAsync,DeleteCustomerPaymentInstrumentWithHttpInfo,DeleteCustomerPaymentInstrumentAsyncWithHttpInfo")) { try @@ -675,12 +677,14 @@ public async System.Threading.Tasks.Task> DeleteCustomerPaym } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomerPaymentInstrument,DeleteCustomerPaymentInstrumentAsync,DeleteCustomerPaymentInstrumentWithHttpInfo,DeleteCustomerPaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -796,7 +800,7 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > GetCustomerPaymentIns } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerPaymentInstrument,GetCustomerPaymentInstrumentAsync,GetCustomerPaymentInstrumentWithHttpInfo,GetCustomerPaymentInstrumentAsyncWithHttpInfo")) { try @@ -810,12 +814,14 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > GetCustomerPaymentIns } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerPaymentInstrument,GetCustomerPaymentInstrumentAsync,GetCustomerPaymentInstrumentWithHttpInfo,GetCustomerPaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -831,7 +837,7 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > GetCustomerPaymentIns return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest))); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement } /// @@ -932,7 +938,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest))); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement } /// /// List Payment Instruments for a Customer | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Customer Payment Instruments**<br>Your system can use this API to retrieve all existing Payment Instruments for a Customer. @@ -1067,7 +1075,7 @@ public ApiResponse< PaymentInstrumentList > GetCustomerPaymentInstrumentsListWit } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerPaymentInstrumentsList,GetCustomerPaymentInstrumentsListAsync,GetCustomerPaymentInstrumentsListWithHttpInfo,GetCustomerPaymentInstrumentsListAsyncWithHttpInfo")) { try @@ -1081,12 +1089,14 @@ public ApiResponse< PaymentInstrumentList > GetCustomerPaymentInstrumentsListWit } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerPaymentInstrumentsList,GetCustomerPaymentInstrumentsListAsync,GetCustomerPaymentInstrumentsListWithHttpInfo,GetCustomerPaymentInstrumentsListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1102,7 +1112,7 @@ public ApiResponse< PaymentInstrumentList > GetCustomerPaymentInstrumentsListWit return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList))); // Return statement + (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList),merchantConfig)); // Return statement } /// @@ -1204,7 +1214,7 @@ public async System.Threading.Tasks.Task> Get } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerPaymentInstrumentsList,GetCustomerPaymentInstrumentsListAsync,GetCustomerPaymentInstrumentsListWithHttpInfo,GetCustomerPaymentInstrumentsListAsyncWithHttpInfo")) { try @@ -1218,12 +1228,14 @@ public async System.Threading.Tasks.Task> Get } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerPaymentInstrumentsList,GetCustomerPaymentInstrumentsListAsync,GetCustomerPaymentInstrumentsListWithHttpInfo,GetCustomerPaymentInstrumentsListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1239,7 +1251,7 @@ public async System.Threading.Tasks.Task> Get return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList))); // Return statement + (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList),merchantConfig)); // Return statement } /// /// Update a Customer Payment Instrument | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customers Payment Instrument**<br>Your system can use this API to update an existing Payment Instrument for a Customer, including selecting a [default Payment Instrument](#token-management_customer-payment-instrument_update-a-customer-payment-instrument_samplerequests-dropdown_make-customer-payment-instrument-the-default_liveconsole-tab-request-body) for use in payments. @@ -1348,7 +1360,7 @@ public ApiResponse< PatchCustomerPaymentInstrumentRequest > PatchCustomersPaymen } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchCustomersPaymentInstrument,PatchCustomersPaymentInstrumentAsync,PatchCustomersPaymentInstrumentWithHttpInfo,PatchCustomersPaymentInstrumentAsyncWithHttpInfo")) { try @@ -1362,13 +1374,15 @@ public ApiResponse< PatchCustomerPaymentInstrumentRequest > PatchCustomersPaymen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchCustomersPaymentInstrument,PatchCustomersPaymentInstrumentAsync,PatchCustomersPaymentInstrumentWithHttpInfo,PatchCustomersPaymentInstrumentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1384,7 +1398,7 @@ public ApiResponse< PatchCustomerPaymentInstrumentRequest > PatchCustomersPaymen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest))); // Return statement + (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement } /// @@ -1495,7 +1509,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest))); // Return statement + (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement } /// /// Create a Customer Payment Instrument | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br><br>**Creating a Customer Payment Instrument**<br>It is recommended you [create a Customer Payment Instrument via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body), this can be for a zero amount.<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Customers Payment Instrument**<br>To perform a payment with a particular Payment Instrument or Shipping Address specify the [Payment Instrument in the payment request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). @@ -1621,7 +1637,7 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > PostCustomerPaymentIn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostCustomerPaymentInstrument,PostCustomerPaymentInstrumentAsync,PostCustomerPaymentInstrumentWithHttpInfo,PostCustomerPaymentInstrumentAsyncWithHttpInfo")) { try @@ -1635,13 +1651,15 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > PostCustomerPaymentIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostCustomerPaymentInstrument,PostCustomerPaymentInstrumentAsync,PostCustomerPaymentInstrumentWithHttpInfo,PostCustomerPaymentInstrumentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1657,7 +1675,7 @@ public ApiResponse< PostCustomerPaymentInstrumentRequest > PostCustomerPaymentIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest))); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement } /// @@ -1749,7 +1767,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest))); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerShippingAddressApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerShippingAddressApi.cs index 68ca5729..0b052fd6 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerShippingAddressApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerShippingAddressApi.cs @@ -527,7 +527,7 @@ public ApiResponse DeleteCustomerShippingAddressWithHttpInfo (string cus } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomerShippingAddress,DeleteCustomerShippingAddressAsync,DeleteCustomerShippingAddressWithHttpInfo,DeleteCustomerShippingAddressAsyncWithHttpInfo")) { try @@ -541,12 +541,14 @@ public ApiResponse DeleteCustomerShippingAddressWithHttpInfo (string cus } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomerShippingAddress,DeleteCustomerShippingAddressAsync,DeleteCustomerShippingAddressWithHttpInfo,DeleteCustomerShippingAddressAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -661,7 +663,7 @@ public async System.Threading.Tasks.Task> DeleteCustomerShip } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteCustomerShippingAddress,DeleteCustomerShippingAddressAsync,DeleteCustomerShippingAddressWithHttpInfo,DeleteCustomerShippingAddressAsyncWithHttpInfo")) { try @@ -675,12 +677,14 @@ public async System.Threading.Tasks.Task> DeleteCustomerShip } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteCustomerShippingAddress,DeleteCustomerShippingAddressAsync,DeleteCustomerShippingAddressWithHttpInfo,DeleteCustomerShippingAddressAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -796,7 +800,7 @@ public ApiResponse< PostCustomerShippingAddressRequest > GetCustomerShippingAddr } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerShippingAddress,GetCustomerShippingAddressAsync,GetCustomerShippingAddressWithHttpInfo,GetCustomerShippingAddressAsyncWithHttpInfo")) { try @@ -810,12 +814,14 @@ public ApiResponse< PostCustomerShippingAddressRequest > GetCustomerShippingAddr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerShippingAddress,GetCustomerShippingAddressAsync,GetCustomerShippingAddressWithHttpInfo,GetCustomerShippingAddressAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -831,7 +837,7 @@ public ApiResponse< PostCustomerShippingAddressRequest > GetCustomerShippingAddr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest))); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest),merchantConfig)); // Return statement } /// @@ -932,7 +938,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest))); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest),merchantConfig)); // Return statement } /// /// List Shipping Addresses for a Customer | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Customer Shipping Addresses**<br>Your system can use this API to retrieve all existing Shipping Addresses for a Customer. @@ -1067,7 +1075,7 @@ public ApiResponse< ShippingAddressListForCustomer > GetCustomerShippingAddresse } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCustomerShippingAddressesList,GetCustomerShippingAddressesListAsync,GetCustomerShippingAddressesListWithHttpInfo,GetCustomerShippingAddressesListAsyncWithHttpInfo")) { try @@ -1081,12 +1089,14 @@ public ApiResponse< ShippingAddressListForCustomer > GetCustomerShippingAddresse } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCustomerShippingAddressesList,GetCustomerShippingAddressesListAsync,GetCustomerShippingAddressesListWithHttpInfo,GetCustomerShippingAddressesListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1102,7 +1112,7 @@ public ApiResponse< ShippingAddressListForCustomer > GetCustomerShippingAddresse return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer))); // Return statement + (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer),merchantConfig)); // Return statement } /// @@ -1204,7 +1214,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer))); // Return statement + (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer),merchantConfig)); // Return statement } /// /// Update a Customer Shipping Address | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customers Shipping Address**<br>Your system can use this API to update an existing Shipping Addresses for a Customer, including selecting a [default Shipping Address](#token-management_customer-shipping-address_update-a-customer-shipping-address_samplerequests-dropdown_make-customer-shipping-address-the-default_liveconsole-tab-request-body) for use in payments. @@ -1348,7 +1360,7 @@ public ApiResponse< PatchCustomerShippingAddressRequest > PatchCustomersShipping } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchCustomersShippingAddress,PatchCustomersShippingAddressAsync,PatchCustomersShippingAddressWithHttpInfo,PatchCustomersShippingAddressAsyncWithHttpInfo")) { try @@ -1362,13 +1374,15 @@ public ApiResponse< PatchCustomerShippingAddressRequest > PatchCustomersShipping } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchCustomersShippingAddress,PatchCustomersShippingAddressAsync,PatchCustomersShippingAddressWithHttpInfo,PatchCustomersShippingAddressAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1384,7 +1398,7 @@ public ApiResponse< PatchCustomerShippingAddressRequest > PatchCustomersShipping return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest))); // Return statement + (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest),merchantConfig)); // Return statement } /// @@ -1495,7 +1509,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest))); // Return statement + (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest),merchantConfig)); // Return statement } /// /// Create a Customer Shipping Address | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Creating a Customer Shipping Address**<br>Your system can use this API to create an existing Customers default or non default Shipping Address.<br>You can also create additional Customer Shipping Addresses via the [Payments API](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body). @@ -1621,7 +1637,7 @@ public ApiResponse< PostCustomerShippingAddressRequest > PostCustomerShippingAdd } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostCustomerShippingAddress,PostCustomerShippingAddressAsync,PostCustomerShippingAddressWithHttpInfo,PostCustomerShippingAddressAsyncWithHttpInfo")) { try @@ -1635,13 +1651,15 @@ public ApiResponse< PostCustomerShippingAddressRequest > PostCustomerShippingAdd } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostCustomerShippingAddress,PostCustomerShippingAddressAsync,PostCustomerShippingAddressWithHttpInfo,PostCustomerShippingAddressAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1657,7 +1675,7 @@ public ApiResponse< PostCustomerShippingAddressRequest > PostCustomerShippingAdd return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest))); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest),merchantConfig)); // Return statement } /// @@ -1749,7 +1767,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest))); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DecisionManagerApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DecisionManagerApi.cs index 08d45a6f..16487190 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DecisionManagerApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DecisionManagerApi.cs @@ -479,7 +479,7 @@ public ApiResponse< InlineResponse2001 > ActionDecisionManagerCaseWithHttpInfo ( } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ActionDecisionManagerCase,ActionDecisionManagerCaseAsync,ActionDecisionManagerCaseWithHttpInfo,ActionDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -493,13 +493,15 @@ public ApiResponse< InlineResponse2001 > ActionDecisionManagerCaseWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ActionDecisionManagerCase,ActionDecisionManagerCaseAsync,ActionDecisionManagerCaseWithHttpInfo,ActionDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -515,7 +517,7 @@ public ApiResponse< InlineResponse2001 > ActionDecisionManagerCaseWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001))); // Return statement + (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001),merchantConfig)); // Return statement } /// @@ -601,7 +603,7 @@ public async System.Threading.Tasks.Task> Action } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ActionDecisionManagerCase,ActionDecisionManagerCaseAsync,ActionDecisionManagerCaseWithHttpInfo,ActionDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -615,13 +617,15 @@ public async System.Threading.Tasks.Task> Action } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ActionDecisionManagerCase,ActionDecisionManagerCaseAsync,ActionDecisionManagerCaseWithHttpInfo,ActionDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -637,7 +641,7 @@ public async System.Threading.Tasks.Task> Action return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001))); // Return statement + (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001),merchantConfig)); // Return statement } /// /// List Management This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be 'postiive', 'negative' or 'review'. @@ -721,7 +725,7 @@ public ApiResponse< RiskV1UpdatePost201Response > AddNegativeWithHttpInfo (strin } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "AddNegative,AddNegativeAsync,AddNegativeWithHttpInfo,AddNegativeAsyncWithHttpInfo")) { try @@ -735,13 +739,15 @@ public ApiResponse< RiskV1UpdatePost201Response > AddNegativeWithHttpInfo (strin } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "AddNegative,AddNegativeAsync,AddNegativeWithHttpInfo,AddNegativeAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -757,7 +763,7 @@ public ApiResponse< RiskV1UpdatePost201Response > AddNegativeWithHttpInfo (strin return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response))); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response),merchantConfig)); // Return statement } /// @@ -843,7 +849,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response))); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response),merchantConfig)); // Return statement } /// /// Add a comment to a DM post-transactional case Add a comment to a DM post-transactional case @@ -963,7 +971,7 @@ public ApiResponse< InlineResponse2011 > CommentDecisionManagerCaseWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CommentDecisionManagerCase,CommentDecisionManagerCaseAsync,CommentDecisionManagerCaseWithHttpInfo,CommentDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -977,13 +985,15 @@ public ApiResponse< InlineResponse2011 > CommentDecisionManagerCaseWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CommentDecisionManagerCase,CommentDecisionManagerCaseAsync,CommentDecisionManagerCaseWithHttpInfo,CommentDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -999,7 +1009,7 @@ public ApiResponse< InlineResponse2011 > CommentDecisionManagerCaseWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011))); // Return statement + (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011),merchantConfig)); // Return statement } /// @@ -1085,7 +1095,7 @@ public async System.Threading.Tasks.Task> Commen } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CommentDecisionManagerCase,CommentDecisionManagerCaseAsync,CommentDecisionManagerCaseWithHttpInfo,CommentDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -1099,13 +1109,15 @@ public async System.Threading.Tasks.Task> Commen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CommentDecisionManagerCase,CommentDecisionManagerCaseAsync,CommentDecisionManagerCaseWithHttpInfo,CommentDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1121,7 +1133,7 @@ public async System.Threading.Tasks.Task> Commen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011))); // Return statement + (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011),merchantConfig)); // Return statement } /// /// Create Decision Manager Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values. @@ -1192,7 +1204,7 @@ public ApiResponse< RiskV1DecisionsPost201Response > CreateBundledDecisionManage } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateBundledDecisionManagerCase,CreateBundledDecisionManagerCaseAsync,CreateBundledDecisionManagerCaseWithHttpInfo,CreateBundledDecisionManagerCaseAsyncWithHttpInfo")) { try @@ -1206,13 +1218,15 @@ public ApiResponse< RiskV1DecisionsPost201Response > CreateBundledDecisionManage } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateBundledDecisionManagerCase,CreateBundledDecisionManagerCaseAsync,CreateBundledDecisionManagerCaseWithHttpInfo,CreateBundledDecisionManagerCaseAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1228,7 +1242,7 @@ public ApiResponse< RiskV1DecisionsPost201Response > CreateBundledDecisionManage return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response))); // Return statement + (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response),merchantConfig)); // Return statement } /// @@ -1301,7 +1315,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response))); // Return statement + (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response),merchantConfig)); // Return statement } /// /// Fraud Marking This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request. @@ -1421,7 +1437,7 @@ public ApiResponse< RiskV1UpdatePost201Response > FraudUpdateWithHttpInfo (strin } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "FraudUpdate,FraudUpdateAsync,FraudUpdateWithHttpInfo,FraudUpdateAsyncWithHttpInfo")) { try @@ -1435,13 +1451,15 @@ public ApiResponse< RiskV1UpdatePost201Response > FraudUpdateWithHttpInfo (strin } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "FraudUpdate,FraudUpdateAsync,FraudUpdateWithHttpInfo,FraudUpdateAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1457,7 +1475,7 @@ public ApiResponse< RiskV1UpdatePost201Response > FraudUpdateWithHttpInfo (strin return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response))); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response),merchantConfig)); // Return statement } /// @@ -1543,7 +1561,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response))); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs index 53bd409a..977b2d87 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs @@ -321,7 +321,7 @@ public ApiResponse DeleteTerminalAssociationWithHttpInfo (DeAssociationR } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteTerminalAssociation,DeleteTerminalAssociationAsync,DeleteTerminalAssociationWithHttpInfo,DeleteTerminalAssociationAsyncWithHttpInfo")) { try @@ -335,13 +335,15 @@ public ApiResponse DeleteTerminalAssociationWithHttpInfo (DeAssociationR } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteTerminalAssociation,DeleteTerminalAssociationAsync,DeleteTerminalAssociationWithHttpInfo,DeleteTerminalAssociationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -428,7 +430,7 @@ public async System.Threading.Tasks.Task> DeleteTerminalAsso } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteTerminalAssociation,DeleteTerminalAssociationAsync,DeleteTerminalAssociationWithHttpInfo,DeleteTerminalAssociationAsyncWithHttpInfo")) { try @@ -442,13 +444,15 @@ public async System.Threading.Tasks.Task> DeleteTerminalAsso } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteTerminalAssociation,DeleteTerminalAssociationAsync,DeleteTerminalAssociationWithHttpInfo,DeleteTerminalAssociationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -536,7 +540,7 @@ public ApiResponse< List > PostDeAssociateV3TerminalWithHttp } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostDeAssociateV3Terminal,PostDeAssociateV3TerminalAsync,PostDeAssociateV3TerminalWithHttpInfo,PostDeAssociateV3TerminalAsyncWithHttpInfo")) { try @@ -550,13 +554,15 @@ public ApiResponse< List > PostDeAssociateV3TerminalWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostDeAssociateV3Terminal,PostDeAssociateV3TerminalAsync,PostDeAssociateV3TerminalWithHttpInfo,PostDeAssociateV3TerminalAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -572,7 +578,7 @@ public ApiResponse< List > PostDeAssociateV3TerminalWithHttp return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -645,7 +651,7 @@ public async System.Threading.Tasks.Task>> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostDeAssociateV3Terminal,PostDeAssociateV3TerminalAsync,PostDeAssociateV3TerminalWithHttpInfo,PostDeAssociateV3TerminalAsyncWithHttpInfo")) { try @@ -659,13 +665,15 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostDeAssociateV3Terminal,PostDeAssociateV3TerminalAsync,PostDeAssociateV3TerminalWithHttpInfo,PostDeAssociateV3TerminalAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -681,7 +689,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs index 5344a246..d6469278 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs @@ -324,7 +324,7 @@ public ApiResponse< InlineResponse2006 > PostSearchQueryWithHttpInfo (PostDevice } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostSearchQuery,PostSearchQueryAsync,PostSearchQueryWithHttpInfo,PostSearchQueryAsyncWithHttpInfo")) { try @@ -338,13 +338,15 @@ public ApiResponse< InlineResponse2006 > PostSearchQueryWithHttpInfo (PostDevice } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostSearchQuery,PostSearchQueryAsync,PostSearchQueryWithHttpInfo,PostSearchQueryAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -360,7 +362,7 @@ public ApiResponse< InlineResponse2006 > PostSearchQueryWithHttpInfo (PostDevice return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006))); // Return statement + (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006),merchantConfig)); // Return statement } /// @@ -433,7 +435,7 @@ public async System.Threading.Tasks.Task> PostSe } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostSearchQuery,PostSearchQueryAsync,PostSearchQueryWithHttpInfo,PostSearchQueryAsyncWithHttpInfo")) { try @@ -447,13 +449,15 @@ public async System.Threading.Tasks.Task> PostSe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostSearchQuery,PostSearchQueryAsync,PostSearchQueryWithHttpInfo,PostSearchQueryAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -469,7 +473,7 @@ public async System.Threading.Tasks.Task> PostSe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006))); // Return statement + (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006),merchantConfig)); // Return statement } /// /// Retrieve List of Devices for a given search query Search for devices matching a given search query. The search query supports serialNumber, readerId, terminalId, status, statusChangeReason or organizationId Matching results are paginated. @@ -540,7 +544,7 @@ public ApiResponse< InlineResponse2008 > PostSearchQueryV3WithHttpInfo (PostDevi } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostSearchQueryV3,PostSearchQueryV3Async,PostSearchQueryV3WithHttpInfo,PostSearchQueryV3AsyncWithHttpInfo")) { try @@ -554,13 +558,15 @@ public ApiResponse< InlineResponse2008 > PostSearchQueryV3WithHttpInfo (PostDevi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostSearchQueryV3,PostSearchQueryV3Async,PostSearchQueryV3WithHttpInfo,PostSearchQueryV3AsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -576,7 +582,7 @@ public ApiResponse< InlineResponse2008 > PostSearchQueryV3WithHttpInfo (PostDevi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2008) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2008))); // Return statement + (InlineResponse2008) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2008),merchantConfig)); // Return statement } /// @@ -649,7 +655,7 @@ public async System.Threading.Tasks.Task> PostSe } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostSearchQueryV3,PostSearchQueryV3Async,PostSearchQueryV3WithHttpInfo,PostSearchQueryV3AsyncWithHttpInfo")) { try @@ -663,13 +669,15 @@ public async System.Threading.Tasks.Task> PostSe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostSearchQueryV3,PostSearchQueryV3Async,PostSearchQueryV3WithHttpInfo,PostSearchQueryV3AsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -685,7 +693,7 @@ public async System.Threading.Tasks.Task> PostSe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2008) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2008))); // Return statement + (InlineResponse2008) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2008),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DownloadDTDApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DownloadDTDApi.cs index 26584933..c2e292ff 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DownloadDTDApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DownloadDTDApi.cs @@ -287,7 +287,7 @@ public ApiResponse GetDTDV2WithHttpInfo (string reportDefinitionNameVers } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetDTDV2,GetDTDV2Async,GetDTDV2WithHttpInfo,GetDTDV2AsyncWithHttpInfo")) { try @@ -301,12 +301,14 @@ public ApiResponse GetDTDV2WithHttpInfo (string reportDefinitionNameVers } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetDTDV2,GetDTDV2Async,GetDTDV2WithHttpInfo,GetDTDV2AsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -402,7 +404,7 @@ public async System.Threading.Tasks.Task> GetDTDV2AsyncWithH } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetDTDV2,GetDTDV2Async,GetDTDV2WithHttpInfo,GetDTDV2AsyncWithHttpInfo")) { try @@ -416,12 +418,14 @@ public async System.Threading.Tasks.Task> GetDTDV2AsyncWithH } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetDTDV2,GetDTDV2Async,GetDTDV2WithHttpInfo,GetDTDV2AsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DownloadXSDApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DownloadXSDApi.cs index 111ce2a4..7415ec8f 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DownloadXSDApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DownloadXSDApi.cs @@ -287,7 +287,7 @@ public ApiResponse GetXSDV2WithHttpInfo (string reportDefinitionNameVers } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetXSDV2,GetXSDV2Async,GetXSDV2WithHttpInfo,GetXSDV2AsyncWithHttpInfo")) { try @@ -301,12 +301,14 @@ public ApiResponse GetXSDV2WithHttpInfo (string reportDefinitionNameVers } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetXSDV2,GetXSDV2Async,GetXSDV2WithHttpInfo,GetXSDV2AsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -402,7 +404,7 @@ public async System.Threading.Tasks.Task> GetXSDV2AsyncWithH } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetXSDV2,GetXSDV2Async,GetXSDV2WithHttpInfo,GetXSDV2AsyncWithHttpInfo")) { try @@ -416,12 +418,14 @@ public async System.Threading.Tasks.Task> GetXSDV2AsyncWithH } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetXSDV2,GetXSDV2Async,GetXSDV2WithHttpInfo,GetXSDV2AsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/EMVTagDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/EMVTagDetailsApi.cs index 10d76956..bca391a4 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/EMVTagDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/EMVTagDetailsApi.cs @@ -316,7 +316,7 @@ public ApiResponse< TssV2GetEmvTags200Response > GetEmvTagsWithHttpInfo () } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetEmvTags,GetEmvTagsAsync,GetEmvTagsWithHttpInfo,GetEmvTagsAsyncWithHttpInfo")) { try @@ -330,12 +330,14 @@ public ApiResponse< TssV2GetEmvTags200Response > GetEmvTagsWithHttpInfo () } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetEmvTags,GetEmvTagsAsync,GetEmvTagsWithHttpInfo,GetEmvTagsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -351,7 +353,7 @@ public ApiResponse< TssV2GetEmvTags200Response > GetEmvTagsWithHttpInfo () return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response))); // Return statement + (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response),merchantConfig)); // Return statement } /// @@ -420,7 +422,7 @@ public async System.Threading.Tasks.Task } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetEmvTags,GetEmvTagsAsync,GetEmvTagsWithHttpInfo,GetEmvTagsAsyncWithHttpInfo")) { try @@ -434,12 +436,14 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetEmvTags,GetEmvTagsAsync,GetEmvTagsWithHttpInfo,GetEmvTagsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -455,7 +459,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response))); // Return statement + (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response),merchantConfig)); // Return statement } /// /// Parse an EMV String Pass an EMV Tag-Length-Value (TLV) string for parsing. @@ -526,7 +530,7 @@ public ApiResponse< TssV2PostEmvTags200Response > ParseEmvTagsWithHttpInfo (Body } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ParseEmvTags,ParseEmvTagsAsync,ParseEmvTagsWithHttpInfo,ParseEmvTagsAsyncWithHttpInfo")) { try @@ -540,13 +544,15 @@ public ApiResponse< TssV2PostEmvTags200Response > ParseEmvTagsWithHttpInfo (Body } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ParseEmvTags,ParseEmvTagsAsync,ParseEmvTagsWithHttpInfo,ParseEmvTagsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -562,7 +568,7 @@ public ApiResponse< TssV2PostEmvTags200Response > ParseEmvTagsWithHttpInfo (Body return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response))); // Return statement + (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response),merchantConfig)); // Return statement } /// @@ -635,7 +641,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response))); // Return statement + (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/FlexAPIApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/FlexAPIApi.cs index 7c250512..04bac5bc 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/FlexAPIApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/FlexAPIApi.cs @@ -282,7 +282,7 @@ public ApiResponse< string > GenerateFlexAPICaptureContextWithHttpInfo (Generate } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateFlexAPICaptureContext,GenerateFlexAPICaptureContextAsync,GenerateFlexAPICaptureContextWithHttpInfo,GenerateFlexAPICaptureContextAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< string > GenerateFlexAPICaptureContextWithHttpInfo (Generate } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateFlexAPICaptureContext,GenerateFlexAPICaptureContextAsync,GenerateFlexAPICaptureContextWithHttpInfo,GenerateFlexAPICaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< string > GenerateFlexAPICaptureContextWithHttpInfo (Generate return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> GenerateFlexAPICap } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateFlexAPICaptureContext,GenerateFlexAPICaptureContextAsync,GenerateFlexAPICaptureContextWithHttpInfo,GenerateFlexAPICaptureContextAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> GenerateFlexAPICap } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateFlexAPICaptureContext,GenerateFlexAPICaptureContextAsync,GenerateFlexAPICaptureContextWithHttpInfo,GenerateFlexAPICaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateFlexAPICap return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InstrumentIdentifierApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InstrumentIdentifierApi.cs index 50bca029..d73243ed 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InstrumentIdentifierApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InstrumentIdentifierApi.cs @@ -564,7 +564,7 @@ public ApiResponse DeleteInstrumentIdentifierWithHttpInfo (string instru } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteInstrumentIdentifier,DeleteInstrumentIdentifierAsync,DeleteInstrumentIdentifierWithHttpInfo,DeleteInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -578,12 +578,14 @@ public ApiResponse DeleteInstrumentIdentifierWithHttpInfo (string instru } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteInstrumentIdentifier,DeleteInstrumentIdentifierAsync,DeleteInstrumentIdentifierWithHttpInfo,DeleteInstrumentIdentifierAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -685,7 +687,7 @@ public async System.Threading.Tasks.Task> DeleteInstrumentId } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteInstrumentIdentifier,DeleteInstrumentIdentifierAsync,DeleteInstrumentIdentifierWithHttpInfo,DeleteInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -699,12 +701,14 @@ public async System.Threading.Tasks.Task> DeleteInstrumentId } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteInstrumentIdentifier,DeleteInstrumentIdentifierAsync,DeleteInstrumentIdentifierWithHttpInfo,DeleteInstrumentIdentifierAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -814,7 +818,7 @@ public ApiResponse< PostInstrumentIdentifierRequest > GetInstrumentIdentifierWit } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInstrumentIdentifier,GetInstrumentIdentifierAsync,GetInstrumentIdentifierWithHttpInfo,GetInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -828,12 +832,14 @@ public ApiResponse< PostInstrumentIdentifierRequest > GetInstrumentIdentifierWit } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInstrumentIdentifier,GetInstrumentIdentifierAsync,GetInstrumentIdentifierWithHttpInfo,GetInstrumentIdentifierAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -849,7 +855,7 @@ public ApiResponse< PostInstrumentIdentifierRequest > GetInstrumentIdentifierWit return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest))); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest),merchantConfig)); // Return statement } /// @@ -944,7 +950,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest))); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest),merchantConfig)); // Return statement } /// /// List Payment Instruments for an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing <br>and account numbers.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the <br>Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) <br>or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Payment Instruments associated with an Instrument Identifier**<br>Your system can use this API to retrieve all Payment Instruments linked to an Instrument Identifier. @@ -1086,7 +1094,7 @@ public ApiResponse< PaymentInstrumentList1 > GetInstrumentIdentifierPaymentInstr } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInstrumentIdentifierPaymentInstrumentsList,GetInstrumentIdentifierPaymentInstrumentsListAsync,GetInstrumentIdentifierPaymentInstrumentsListWithHttpInfo,GetInstrumentIdentifierPaymentInstrumentsListAsyncWithHttpInfo")) { try @@ -1100,12 +1108,14 @@ public ApiResponse< PaymentInstrumentList1 > GetInstrumentIdentifierPaymentInstr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInstrumentIdentifierPaymentInstrumentsList,GetInstrumentIdentifierPaymentInstrumentsListAsync,GetInstrumentIdentifierPaymentInstrumentsListWithHttpInfo,GetInstrumentIdentifierPaymentInstrumentsListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1121,7 +1131,7 @@ public ApiResponse< PaymentInstrumentList1 > GetInstrumentIdentifierPaymentInstr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1))); // Return statement + (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1),merchantConfig)); // Return statement } /// @@ -1230,7 +1240,7 @@ public async System.Threading.Tasks.Task> Ge } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInstrumentIdentifierPaymentInstrumentsList,GetInstrumentIdentifierPaymentInstrumentsListAsync,GetInstrumentIdentifierPaymentInstrumentsListWithHttpInfo,GetInstrumentIdentifierPaymentInstrumentsListAsyncWithHttpInfo")) { try @@ -1244,12 +1254,14 @@ public async System.Threading.Tasks.Task> Ge } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInstrumentIdentifierPaymentInstrumentsList,GetInstrumentIdentifierPaymentInstrumentsListAsync,GetInstrumentIdentifierPaymentInstrumentsListWithHttpInfo,GetInstrumentIdentifierPaymentInstrumentsListAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1265,7 +1277,7 @@ public async System.Threading.Tasks.Task> Ge return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1))); // Return statement + (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1),merchantConfig)); // Return statement } /// /// Update an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating an Instrument Identifier**<br>When an Instrument Identifier is used in a payment the **_previousTransactionId_** and **_originalAuthorizedAmount_** values are automatically recorded.<br>These values will be added for you to future Merchant Initiated Transaction payments.<br>Your system can use this API to update these values. @@ -1368,7 +1380,7 @@ public ApiResponse< PatchInstrumentIdentifierRequest > PatchInstrumentIdentifier } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchInstrumentIdentifier,PatchInstrumentIdentifierAsync,PatchInstrumentIdentifierWithHttpInfo,PatchInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -1382,13 +1394,15 @@ public ApiResponse< PatchInstrumentIdentifierRequest > PatchInstrumentIdentifier } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchInstrumentIdentifier,PatchInstrumentIdentifierAsync,PatchInstrumentIdentifierWithHttpInfo,PatchInstrumentIdentifierAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1404,7 +1418,7 @@ public ApiResponse< PatchInstrumentIdentifierRequest > PatchInstrumentIdentifier return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest))); // Return statement + (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest),merchantConfig)); // Return statement } /// @@ -1509,7 +1523,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest))); // Return statement + (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest),merchantConfig)); // Return statement } /// /// Create an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).<br><br>**Creating an Instrument Identifier**<br>It is recommended you [create an Instrument Identifier via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-instrument-identifier-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>An Instrument Identifier will also be created if you [create a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body)<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Instrument Identifiers**<br>To perform a payment with an Instrument Identifier simply specify the [Instrument Identifier Id in the payments request along with the expiration date, card type, & billing address](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-instrument-identifier-token-id_liveconsole-tab-request-body).<br>When an Instrument Identifier is used in a payment the **_previousTransactionId_** and **_originalAuthorizedAmount_** values are automatically recorded.<br>These values will be added for you to future Merchant Initiated Transaction payments. @@ -1629,7 +1645,7 @@ public ApiResponse< PostInstrumentIdentifierRequest > PostInstrumentIdentifierWi } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostInstrumentIdentifier,PostInstrumentIdentifierAsync,PostInstrumentIdentifierWithHttpInfo,PostInstrumentIdentifierAsyncWithHttpInfo")) { try @@ -1643,13 +1659,15 @@ public ApiResponse< PostInstrumentIdentifierRequest > PostInstrumentIdentifierWi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostInstrumentIdentifier,PostInstrumentIdentifierAsync,PostInstrumentIdentifierWithHttpInfo,PostInstrumentIdentifierAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1665,7 +1683,7 @@ public ApiResponse< PostInstrumentIdentifierRequest > PostInstrumentIdentifierWi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest))); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest),merchantConfig)); // Return statement } /// @@ -1751,7 +1769,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest))); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest),merchantConfig)); // Return statement } /// /// Enroll an Instrument Identifier for Payment Network Token | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Enroll an Instrument Identifier for a Payment Network Token**<br>Your system can use this API to provision a Network token for an existing Instrument Identifier.<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Network token can be [provisioned when creating an Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier_samplerequests-dropdown_create-instrument-identifier-card-enroll-for-network-token_liveconsole-tab-request-body).This will occur automatically when creating a [Customer](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), [Payment Instrument](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body) or [Instrument Identifier](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-instrument-identifier-token-creation_liveconsole-tab-request-body) via the Payments API.<br>For more information about Payment Network Tokens see the Developer Guide. @@ -1874,7 +1894,7 @@ public ApiResponse PostInstrumentIdentifierEnrollmentWithHttpInfo (strin } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostInstrumentIdentifierEnrollment,PostInstrumentIdentifierEnrollmentAsync,PostInstrumentIdentifierEnrollmentWithHttpInfo,PostInstrumentIdentifierEnrollmentAsyncWithHttpInfo")) { try @@ -1888,13 +1908,15 @@ public ApiResponse PostInstrumentIdentifierEnrollmentWithHttpInfo (strin } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostInstrumentIdentifierEnrollment,PostInstrumentIdentifierEnrollmentAsync,PostInstrumentIdentifierEnrollmentWithHttpInfo,PostInstrumentIdentifierEnrollmentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2000,7 +2022,7 @@ public async System.Threading.Tasks.Task> PostInstrumentIden } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostInstrumentIdentifierEnrollment,PostInstrumentIdentifierEnrollmentAsync,PostInstrumentIdentifierEnrollmentWithHttpInfo,PostInstrumentIdentifierEnrollmentAsyncWithHttpInfo")) { try @@ -2014,13 +2036,15 @@ public async System.Threading.Tasks.Task> PostInstrumentIden } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostInstrumentIdentifierEnrollment,PostInstrumentIdentifierEnrollmentAsync,PostInstrumentIdentifierEnrollmentWithHttpInfo,PostInstrumentIdentifierEnrollmentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InterchangeClearingLevelDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InterchangeClearingLevelDetailsApi.cs index 2d25adcc..c90945d9 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InterchangeClearingLevelDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InterchangeClearingLevelDetailsApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3InterchangeClearingLevelDetailsGet200Response > G } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInterchangeClearingLevelDetails,GetInterchangeClearingLevelDetailsAsync,GetInterchangeClearingLevelDetailsWithHttpInfo,GetInterchangeClearingLevelDetailsAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3InterchangeClearingLevelDetailsGet200Response > G } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInterchangeClearingLevelDetails,GetInterchangeClearingLevelDetailsAsync,GetInterchangeClearingLevelDetailsWithHttpInfo,GetInterchangeClearingLevelDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3InterchangeClearingLevelDetailsGet200Response > G return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response))); // Return statement + (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response),merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response))); // Return statement + (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoiceSettingsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoiceSettingsApi.cs index 68f013c4..2a5d4ea1 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoiceSettingsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoiceSettingsApi.cs @@ -319,7 +319,7 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > GetInvoiceSetting } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInvoiceSettings,GetInvoiceSettingsAsync,GetInvoiceSettingsWithHttpInfo,GetInvoiceSettingsAsyncWithHttpInfo")) { try @@ -333,12 +333,14 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > GetInvoiceSetting } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInvoiceSettings,GetInvoiceSettingsAsync,GetInvoiceSettingsWithHttpInfo,GetInvoiceSettingsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -354,7 +356,7 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > GetInvoiceSetting return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response))); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response),merchantConfig)); // Return statement } /// @@ -426,7 +428,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response))); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response),merchantConfig)); // Return statement } /// /// Update Invoice Settings Allows you to customize the payment page, the checkout experience, email communication and payer authentication. You can customize the invoice to match your brand with your business name, logo and brand colors, and a VAT Tax number. You can choose to capture the payers shipping details, phone number and email during the checkout process. You can add a custom message to all invoice emails and enable or disable payer authentication for invoice payments. @@ -535,7 +539,7 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > UpdateInvoiceSett } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateInvoiceSettings,UpdateInvoiceSettingsAsync,UpdateInvoiceSettingsWithHttpInfo,UpdateInvoiceSettingsAsyncWithHttpInfo")) { try @@ -549,13 +553,15 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > UpdateInvoiceSett } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateInvoiceSettings,UpdateInvoiceSettingsAsync,UpdateInvoiceSettingsWithHttpInfo,UpdateInvoiceSettingsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -571,7 +577,7 @@ public ApiResponse< InvoicingV2InvoiceSettingsGet200Response > UpdateInvoiceSett return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response))); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response),merchantConfig)); // Return statement } /// @@ -647,7 +653,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response))); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoicesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoicesApi.cs index 4ab497af..dc2855bf 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoicesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoicesApi.cs @@ -549,7 +549,7 @@ public ApiResponse< InvoicingV2InvoicesPost201Response > CreateInvoiceWithHttpIn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateInvoice,CreateInvoiceAsync,CreateInvoiceWithHttpInfo,CreateInvoiceAsyncWithHttpInfo")) { try @@ -563,13 +563,15 @@ public ApiResponse< InvoicingV2InvoicesPost201Response > CreateInvoiceWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateInvoice,CreateInvoiceAsync,CreateInvoiceWithHttpInfo,CreateInvoiceAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -585,7 +587,7 @@ public ApiResponse< InvoicingV2InvoicesPost201Response > CreateInvoiceWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response))); // Return statement + (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response),merchantConfig)); // Return statement } /// @@ -661,7 +663,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response))); // Return statement + (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response),merchantConfig)); // Return statement } /// /// Get a List of Invoices Provides a (filtered) list of invoices that have been created in your account. You can filter the list based on Invoice Status by setting the status query parameter to one of DRAFT, CREATED, SENT, PARTIAL, PAID or CANCELED. @@ -800,7 +804,7 @@ public ApiResponse< InvoicingV2InvoicesAllGet200Response > GetAllInvoicesWithHtt } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAllInvoices,GetAllInvoicesAsync,GetAllInvoicesWithHttpInfo,GetAllInvoicesAsyncWithHttpInfo")) { try @@ -814,12 +818,14 @@ public ApiResponse< InvoicingV2InvoicesAllGet200Response > GetAllInvoicesWithHtt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAllInvoices,GetAllInvoicesAsync,GetAllInvoicesWithHttpInfo,GetAllInvoicesAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -835,7 +841,7 @@ public ApiResponse< InvoicingV2InvoicesAllGet200Response > GetAllInvoicesWithHtt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response))); // Return statement + (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response),merchantConfig)); // Return statement } /// @@ -940,7 +946,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response))); // Return statement + (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response),merchantConfig)); // Return statement } /// /// Get Invoice Details You can retrieve details of a specific invoice. This can be used to check the Invoice status and get a list of invoice payments in the invoice history section of the response. For each payment transaction you can use the Transaction Details API to get more details on the payment transaction. @@ -1058,7 +1066,7 @@ public ApiResponse< InvoicingV2InvoicesGet200Response > GetInvoiceWithHttpInfo ( } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetInvoice,GetInvoiceAsync,GetInvoiceWithHttpInfo,GetInvoiceAsyncWithHttpInfo")) { try @@ -1072,12 +1080,14 @@ public ApiResponse< InvoicingV2InvoicesGet200Response > GetInvoiceWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetInvoice,GetInvoiceAsync,GetInvoiceWithHttpInfo,GetInvoiceAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1093,7 +1103,7 @@ public ApiResponse< InvoicingV2InvoicesGet200Response > GetInvoiceWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response))); // Return statement + (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response),merchantConfig)); // Return statement } /// @@ -1178,7 +1188,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response))); // Return statement + (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response),merchantConfig)); // Return statement } /// /// Cancel an Invoice You can cancel an invoice if no payment is made to it. You cannot cancel partially or fully paid invoices. @@ -1296,7 +1308,7 @@ public ApiResponse< InvoicingV2InvoicesCancel200Response > PerformCancelActionWi } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PerformCancelAction,PerformCancelActionAsync,PerformCancelActionWithHttpInfo,PerformCancelActionAsyncWithHttpInfo")) { try @@ -1310,12 +1322,14 @@ public ApiResponse< InvoicingV2InvoicesCancel200Response > PerformCancelActionWi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PerformCancelAction,PerformCancelActionAsync,PerformCancelActionWithHttpInfo,PerformCancelActionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1331,7 +1345,7 @@ public ApiResponse< InvoicingV2InvoicesCancel200Response > PerformCancelActionWi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response))); // Return statement + (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response),merchantConfig)); // Return statement } /// @@ -1416,7 +1430,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response))); // Return statement + (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response),merchantConfig)); // Return statement } /// /// Publish an Invoice You can publish an invoice in DRAFT status. After invoking this method, the invoice status is changed to CREATED. @@ -1534,7 +1550,7 @@ public ApiResponse< InvoicingV2InvoicesPublish200Response > PerformPublishAction } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PerformPublishAction,PerformPublishActionAsync,PerformPublishActionWithHttpInfo,PerformPublishActionAsyncWithHttpInfo")) { try @@ -1548,12 +1564,14 @@ public ApiResponse< InvoicingV2InvoicesPublish200Response > PerformPublishAction } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PerformPublishAction,PerformPublishActionAsync,PerformPublishActionWithHttpInfo,PerformPublishActionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1569,7 +1587,7 @@ public ApiResponse< InvoicingV2InvoicesPublish200Response > PerformPublishAction return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response))); // Return statement + (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response),merchantConfig)); // Return statement } /// @@ -1654,7 +1672,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response))); // Return statement + (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response),merchantConfig)); // Return statement } /// /// Send an Invoice You can send an invoice in draft or created state or resend a sent or partially paid invoice. Fully paid or canceled invoices cannot be resent. @@ -1772,7 +1792,7 @@ public ApiResponse< InvoicingV2InvoicesSend200Response > PerformSendActionWithHt } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PerformSendAction,PerformSendActionAsync,PerformSendActionWithHttpInfo,PerformSendActionAsyncWithHttpInfo")) { try @@ -1786,12 +1806,14 @@ public ApiResponse< InvoicingV2InvoicesSend200Response > PerformSendActionWithHt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PerformSendAction,PerformSendActionAsync,PerformSendActionWithHttpInfo,PerformSendActionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1807,7 +1829,7 @@ public ApiResponse< InvoicingV2InvoicesSend200Response > PerformSendActionWithHt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response))); // Return statement + (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response),merchantConfig)); // Return statement } /// @@ -1892,7 +1914,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response))); // Return statement + (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response),merchantConfig)); // Return statement } /// /// Update an Invoice You can update all information except the invoice number till any payment is received for an invoice. Invoices that are partially or fully paid or cancelled cannot be updated. @@ -2014,7 +2038,7 @@ public ApiResponse< InvoicingV2InvoicesPut200Response > UpdateInvoiceWithHttpInf } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateInvoice,UpdateInvoiceAsync,UpdateInvoiceWithHttpInfo,UpdateInvoiceAsyncWithHttpInfo")) { try @@ -2028,13 +2052,15 @@ public ApiResponse< InvoicingV2InvoicesPut200Response > UpdateInvoiceWithHttpInf } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateInvoice,UpdateInvoiceAsync,UpdateInvoiceWithHttpInfo,UpdateInvoiceAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2050,7 +2076,7 @@ public ApiResponse< InvoicingV2InvoicesPut200Response > UpdateInvoiceWithHttpInf return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response))); // Return statement + (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response),merchantConfig)); // Return statement } /// @@ -2139,7 +2165,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response))); // Return statement + (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs index 49efb3ad..3e8df2f1 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs @@ -568,7 +568,7 @@ public ApiResponse DeleteWebhookSubscriptionWithHttpInfo (string webhook } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteWebhookSubscription,DeleteWebhookSubscriptionAsync,DeleteWebhookSubscriptionWithHttpInfo,DeleteWebhookSubscriptionAsyncWithHttpInfo")) { try @@ -582,12 +582,14 @@ public ApiResponse DeleteWebhookSubscriptionWithHttpInfo (string webhook } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteWebhookSubscription,DeleteWebhookSubscriptionAsync,DeleteWebhookSubscriptionWithHttpInfo,DeleteWebhookSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -683,7 +685,7 @@ public async System.Threading.Tasks.Task> DeleteWebhookSubsc } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteWebhookSubscription,DeleteWebhookSubscriptionAsync,DeleteWebhookSubscriptionWithHttpInfo,DeleteWebhookSubscriptionAsyncWithHttpInfo")) { try @@ -697,12 +699,14 @@ public async System.Threading.Tasks.Task> DeleteWebhookSubsc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteWebhookSubscription,DeleteWebhookSubscriptionAsync,DeleteWebhookSubscriptionWithHttpInfo,DeleteWebhookSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -799,7 +803,7 @@ public ApiResponse< InlineResponse2015 > GetWebhookSubscriptionByIdWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetWebhookSubscriptionById,GetWebhookSubscriptionByIdAsync,GetWebhookSubscriptionByIdWithHttpInfo,GetWebhookSubscriptionByIdAsyncWithHttpInfo")) { try @@ -813,12 +817,14 @@ public ApiResponse< InlineResponse2015 > GetWebhookSubscriptionByIdWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetWebhookSubscriptionById,GetWebhookSubscriptionByIdAsync,GetWebhookSubscriptionByIdWithHttpInfo,GetWebhookSubscriptionByIdAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -834,7 +840,7 @@ public ApiResponse< InlineResponse2015 > GetWebhookSubscriptionByIdWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015))); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015),merchantConfig)); // Return statement } /// @@ -916,7 +922,7 @@ public async System.Threading.Tasks.Task> GetWeb } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetWebhookSubscriptionById,GetWebhookSubscriptionByIdAsync,GetWebhookSubscriptionByIdWithHttpInfo,GetWebhookSubscriptionByIdAsyncWithHttpInfo")) { try @@ -930,12 +936,14 @@ public async System.Threading.Tasks.Task> GetWeb } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetWebhookSubscriptionById,GetWebhookSubscriptionByIdAsync,GetWebhookSubscriptionByIdWithHttpInfo,GetWebhookSubscriptionByIdAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -951,7 +959,7 @@ public async System.Threading.Tasks.Task> GetWeb return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015))); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015),merchantConfig)); // Return statement } /// /// Get Details On All Created Webhooks Retrieve a list of all previously created webhooks. @@ -1045,7 +1053,7 @@ public ApiResponse< List > GetWebhookSubscriptionsByOrgWithH } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetWebhookSubscriptionsByOrg,GetWebhookSubscriptionsByOrgAsync,GetWebhookSubscriptionsByOrgWithHttpInfo,GetWebhookSubscriptionsByOrgAsyncWithHttpInfo")) { try @@ -1059,12 +1067,14 @@ public ApiResponse< List > GetWebhookSubscriptionsByOrgWithH } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetWebhookSubscriptionsByOrg,GetWebhookSubscriptionsByOrgAsync,GetWebhookSubscriptionsByOrgWithHttpInfo,GetWebhookSubscriptionsByOrgAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1080,7 +1090,7 @@ public ApiResponse< List > GetWebhookSubscriptionsByOrgWithH return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -1176,7 +1186,7 @@ public async System.Threading.Tasks.Task>> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetWebhookSubscriptionsByOrg,GetWebhookSubscriptionsByOrgAsync,GetWebhookSubscriptionsByOrgWithHttpInfo,GetWebhookSubscriptionsByOrgAsyncWithHttpInfo")) { try @@ -1190,12 +1200,14 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetWebhookSubscriptionsByOrg,GetWebhookSubscriptionsByOrgAsync,GetWebhookSubscriptionsByOrgWithHttpInfo,GetWebhookSubscriptionsByOrgAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1211,7 +1223,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// /// Test a Webhook Configuration Test the webhook configuration by sending a sample webhook. Calling this endpoint sends a sample webhook to the endpoint identified in the user's subscription. It will contain sample values for the product & eventType based on values present in your subscription along with a sample message in the payload. Based on the webhook response users can make any necessary modifications or rest assured knowing their setup is configured correctly. @@ -1291,7 +1303,7 @@ public ApiResponse< InlineResponse2016 > NotificationSubscriptionsV1WebhooksWebh } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV1WebhooksWebhookIdPost,NotificationSubscriptionsV1WebhooksWebhookIdPostAsync,NotificationSubscriptionsV1WebhooksWebhookIdPostWithHttpInfo,NotificationSubscriptionsV1WebhooksWebhookIdPostAsyncWithHttpInfo")) { try @@ -1305,12 +1317,14 @@ public ApiResponse< InlineResponse2016 > NotificationSubscriptionsV1WebhooksWebh } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV1WebhooksWebhookIdPost,NotificationSubscriptionsV1WebhooksWebhookIdPostAsync,NotificationSubscriptionsV1WebhooksWebhookIdPostWithHttpInfo,NotificationSubscriptionsV1WebhooksWebhookIdPostAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1326,7 +1340,7 @@ public ApiResponse< InlineResponse2016 > NotificationSubscriptionsV1WebhooksWebh return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016))); // Return statement + (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016),merchantConfig)); // Return statement } /// @@ -1408,7 +1422,7 @@ public async System.Threading.Tasks.Task> Notifi } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV1WebhooksWebhookIdPost,NotificationSubscriptionsV1WebhooksWebhookIdPostAsync,NotificationSubscriptionsV1WebhooksWebhookIdPostWithHttpInfo,NotificationSubscriptionsV1WebhooksWebhookIdPostAsyncWithHttpInfo")) { try @@ -1422,12 +1436,14 @@ public async System.Threading.Tasks.Task> Notifi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV1WebhooksWebhookIdPost,NotificationSubscriptionsV1WebhooksWebhookIdPostAsync,NotificationSubscriptionsV1WebhooksWebhookIdPostWithHttpInfo,NotificationSubscriptionsV1WebhooksWebhookIdPostAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1443,7 +1459,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016))); // Return statement + (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016),merchantConfig)); // Return statement } /// /// Update a Webhook Subscription Update a Webhook Subscription. @@ -1521,7 +1537,7 @@ public ApiResponse< InlineResponse2005 > NotificationSubscriptionsV2WebhooksWebh } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksWebhookIdPatch,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsync,NotificationSubscriptionsV2WebhooksWebhookIdPatchWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsyncWithHttpInfo")) { try @@ -1535,13 +1551,15 @@ public ApiResponse< InlineResponse2005 > NotificationSubscriptionsV2WebhooksWebh } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksWebhookIdPatch,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsync,NotificationSubscriptionsV2WebhooksWebhookIdPatchWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1557,7 +1575,7 @@ public ApiResponse< InlineResponse2005 > NotificationSubscriptionsV2WebhooksWebh return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2005) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2005))); // Return statement + (InlineResponse2005) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2005),merchantConfig)); // Return statement } /// @@ -1637,7 +1655,7 @@ public async System.Threading.Tasks.Task> Notifi } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksWebhookIdPatch,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsync,NotificationSubscriptionsV2WebhooksWebhookIdPatchWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsyncWithHttpInfo")) { try @@ -1651,13 +1669,15 @@ public async System.Threading.Tasks.Task> Notifi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksWebhookIdPatch,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsync,NotificationSubscriptionsV2WebhooksWebhookIdPatchWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdPatchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1673,7 +1693,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2005) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2005))); // Return statement + (InlineResponse2005) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2005),merchantConfig)); // Return statement } /// /// Update a Webhook Status Users can update the status of a webhook subscription by calling this endpoint. The webhookId parameter in the URL path identifies the specific webhook subscription to be updated. The request body accepts the values ACTIVE or INACTIVE. If the subscription is set to INACTIVE, webhooks will not be delivered until the subscription is activated again. @@ -1748,7 +1768,7 @@ public ApiResponse NotificationSubscriptionsV2WebhooksWebhookIdStatusPut } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksWebhookIdStatusPut,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsync,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsyncWithHttpInfo")) { try @@ -1762,13 +1782,15 @@ public ApiResponse NotificationSubscriptionsV2WebhooksWebhookIdStatusPut } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksWebhookIdStatusPut,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsync,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1862,7 +1884,7 @@ public async System.Threading.Tasks.Task> NotificationSubscr } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "NotificationSubscriptionsV2WebhooksWebhookIdStatusPut,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsync,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsyncWithHttpInfo")) { try @@ -1876,13 +1898,15 @@ public async System.Threading.Tasks.Task> NotificationSubscr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "NotificationSubscriptionsV2WebhooksWebhookIdStatusPut,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsync,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutWithHttpInfo,NotificationSubscriptionsV2WebhooksWebhookIdStatusPutAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2000,7 +2024,7 @@ public ApiResponse< InlineResponse2017 > SaveAsymEgressKeyWithHttpInfo (string v } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SaveAsymEgressKey,SaveAsymEgressKeyAsync,SaveAsymEgressKeyWithHttpInfo,SaveAsymEgressKeyAsyncWithHttpInfo")) { try @@ -2014,13 +2038,15 @@ public ApiResponse< InlineResponse2017 > SaveAsymEgressKeyWithHttpInfo (string v } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SaveAsymEgressKey,SaveAsymEgressKeyAsync,SaveAsymEgressKeyWithHttpInfo,SaveAsymEgressKeyAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2036,7 +2062,7 @@ public ApiResponse< InlineResponse2017 > SaveAsymEgressKeyWithHttpInfo (string v return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017))); // Return statement + (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017),merchantConfig)); // Return statement } /// @@ -2139,7 +2165,7 @@ public async System.Threading.Tasks.Task> SaveAs } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SaveAsymEgressKey,SaveAsymEgressKeyAsync,SaveAsymEgressKeyWithHttpInfo,SaveAsymEgressKeyAsyncWithHttpInfo")) { try @@ -2153,13 +2179,15 @@ public async System.Threading.Tasks.Task> SaveAs } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SaveAsymEgressKey,SaveAsymEgressKeyAsync,SaveAsymEgressKeyWithHttpInfo,SaveAsymEgressKeyAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2175,7 +2203,7 @@ public async System.Threading.Tasks.Task> SaveAs return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017))); // Return statement + (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs index 64ee0701..17dd9ef7 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs @@ -337,7 +337,7 @@ public ApiResponse< InlineResponse2002 > GetRegistrationWithHttpInfo (string reg } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetRegistration,GetRegistrationAsync,GetRegistrationWithHttpInfo,GetRegistrationAsyncWithHttpInfo")) { try @@ -351,12 +351,14 @@ public ApiResponse< InlineResponse2002 > GetRegistrationWithHttpInfo (string reg } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetRegistration,GetRegistrationAsync,GetRegistrationWithHttpInfo,GetRegistrationAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -372,7 +374,7 @@ public ApiResponse< InlineResponse2002 > GetRegistrationWithHttpInfo (string reg return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2002) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2002))); // Return statement + (InlineResponse2002) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2002),merchantConfig)); // Return statement } /// @@ -454,7 +456,7 @@ public async System.Threading.Tasks.Task> GetReg } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetRegistration,GetRegistrationAsync,GetRegistrationWithHttpInfo,GetRegistrationAsyncWithHttpInfo")) { try @@ -468,12 +470,14 @@ public async System.Threading.Tasks.Task> GetReg } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetRegistration,GetRegistrationAsync,GetRegistrationWithHttpInfo,GetRegistrationAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -489,7 +493,7 @@ public async System.Threading.Tasks.Task> GetReg return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2002) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2002))); // Return statement + (InlineResponse2002) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2002),merchantConfig)); // Return statement } /// /// Create a boarding registration Boarding Product is specifically for resellers who onboard merchants to resell their services to merchants and help integrate REST API into their systems. The Boarding API is designed to simplify and streamline the onboarding process of merchants by enabling administrators and developers to: 1. Enable and Configure Products: The API helps in adding new products to an existing organization and configuring them to suit specific needs. 2. Update Merchant Information: The API allows for updating an organization's information efficiently. 3. Manage Payment Integration: It provides templates for secure payment integration and management. @@ -566,7 +570,7 @@ public ApiResponse< InlineResponse2013 > PostRegistrationWithHttpInfo (PostRegis } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostRegistration,PostRegistrationAsync,PostRegistrationWithHttpInfo,PostRegistrationAsyncWithHttpInfo")) { try @@ -580,13 +584,15 @@ public ApiResponse< InlineResponse2013 > PostRegistrationWithHttpInfo (PostRegis } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostRegistration,PostRegistrationAsync,PostRegistrationWithHttpInfo,PostRegistrationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -602,7 +608,7 @@ public ApiResponse< InlineResponse2013 > PostRegistrationWithHttpInfo (PostRegis return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013))); // Return statement + (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013),merchantConfig)); // Return statement } /// @@ -681,7 +687,7 @@ public async System.Threading.Tasks.Task> PostRe } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostRegistration,PostRegistrationAsync,PostRegistrationWithHttpInfo,PostRegistrationAsyncWithHttpInfo")) { try @@ -695,13 +701,15 @@ public async System.Threading.Tasks.Task> PostRe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostRegistration,PostRegistrationAsync,PostRegistrationWithHttpInfo,PostRegistrationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -717,7 +725,7 @@ public async System.Threading.Tasks.Task> PostRe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013))); // Return statement + (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MicroformIntegrationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MicroformIntegrationApi.cs index 7677d87a..7e855d76 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MicroformIntegrationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MicroformIntegrationApi.cs @@ -282,7 +282,7 @@ public ApiResponse< string > GenerateCaptureContextWithHttpInfo (GenerateCapture } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateCaptureContext,GenerateCaptureContextAsync,GenerateCaptureContextWithHttpInfo,GenerateCaptureContextAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< string > GenerateCaptureContextWithHttpInfo (GenerateCapture } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateCaptureContext,GenerateCaptureContextAsync,GenerateCaptureContextWithHttpInfo,GenerateCaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< string > GenerateCaptureContextWithHttpInfo (GenerateCapture return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> GenerateCaptureCon } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateCaptureContext,GenerateCaptureContextAsync,GenerateCaptureContextWithHttpInfo,GenerateCaptureContextAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> GenerateCaptureCon } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateCaptureContext,GenerateCaptureContextAsync,GenerateCaptureContextWithHttpInfo,GenerateCaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateCaptureCon return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NetFundingsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NetFundingsApi.cs index 7a14b80e..32ad20c2 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NetFundingsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NetFundingsApi.cs @@ -331,7 +331,7 @@ public ApiResponse< ReportingV3NetFundingsGet200Response > GetNetFundingDetailsW } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetNetFundingDetails,GetNetFundingDetailsAsync,GetNetFundingDetailsWithHttpInfo,GetNetFundingDetailsAsyncWithHttpInfo")) { try @@ -345,12 +345,14 @@ public ApiResponse< ReportingV3NetFundingsGet200Response > GetNetFundingDetailsW } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetNetFundingDetails,GetNetFundingDetailsAsync,GetNetFundingDetailsWithHttpInfo,GetNetFundingDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -366,7 +368,7 @@ public ApiResponse< ReportingV3NetFundingsGet200Response > GetNetFundingDetailsW return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response))); // Return statement + (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response),merchantConfig)); // Return statement } /// @@ -476,7 +478,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response))); // Return statement + (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NotificationOfChangesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NotificationOfChangesApi.cs index 615cb59f..a3d1af1e 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NotificationOfChangesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NotificationOfChangesApi.cs @@ -310,7 +310,7 @@ public ApiResponse< ReportingV3NotificationofChangesGet200Response > GetNotifica } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetNotificationOfChangeReport,GetNotificationOfChangeReportAsync,GetNotificationOfChangeReportWithHttpInfo,GetNotificationOfChangeReportAsyncWithHttpInfo")) { try @@ -324,12 +324,14 @@ public ApiResponse< ReportingV3NotificationofChangesGet200Response > GetNotifica } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetNotificationOfChangeReport,GetNotificationOfChangeReportAsync,GetNotificationOfChangeReportWithHttpInfo,GetNotificationOfChangeReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -345,7 +347,7 @@ public ApiResponse< ReportingV3NotificationofChangesGet200Response > GetNotifica return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response))); // Return statement + (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response),merchantConfig)); // Return statement } /// @@ -442,7 +444,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response))); // Return statement + (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OrdersApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OrdersApi.cs index d33d7043..c252c5cc 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OrdersApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OrdersApi.cs @@ -328,7 +328,7 @@ public ApiResponse< PtsV2CreateOrderPost201Response > CreateOrderWithHttpInfo (C } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateOrder,CreateOrderAsync,CreateOrderWithHttpInfo,CreateOrderAsyncWithHttpInfo")) { try @@ -342,13 +342,15 @@ public ApiResponse< PtsV2CreateOrderPost201Response > CreateOrderWithHttpInfo (C } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateOrder,CreateOrderAsync,CreateOrderWithHttpInfo,CreateOrderAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -364,7 +366,7 @@ public ApiResponse< PtsV2CreateOrderPost201Response > CreateOrderWithHttpInfo (C return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response))); // Return statement + (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response),merchantConfig)); // Return statement } /// @@ -437,7 +439,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response))); // Return statement + (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response),merchantConfig)); // Return statement } /// /// Update an Order This API can be used in two flavours - for updating the order as well as saving the order. @@ -557,7 +561,7 @@ public ApiResponse< PtsV2UpdateOrderPatch201Response > UpdateOrderWithHttpInfo ( } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateOrder,UpdateOrderAsync,UpdateOrderWithHttpInfo,UpdateOrderAsyncWithHttpInfo")) { try @@ -571,13 +575,15 @@ public ApiResponse< PtsV2UpdateOrderPatch201Response > UpdateOrderWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateOrder,UpdateOrderAsync,UpdateOrderWithHttpInfo,UpdateOrderAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -593,7 +599,7 @@ public ApiResponse< PtsV2UpdateOrderPatch201Response > UpdateOrderWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response))); // Return statement + (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response),merchantConfig)); // Return statement } /// @@ -679,7 +685,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response))); // Return statement + (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayerAuthenticationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayerAuthenticationApi.cs index 881b5bf2..1a4016fb 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayerAuthenticationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayerAuthenticationApi.cs @@ -366,7 +366,7 @@ public ApiResponse< RiskV1AuthenticationsPost201Response > CheckPayerAuthEnrollm } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CheckPayerAuthEnrollment,CheckPayerAuthEnrollmentAsync,CheckPayerAuthEnrollmentWithHttpInfo,CheckPayerAuthEnrollmentAsyncWithHttpInfo")) { try @@ -380,13 +380,15 @@ public ApiResponse< RiskV1AuthenticationsPost201Response > CheckPayerAuthEnrollm } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CheckPayerAuthEnrollment,CheckPayerAuthEnrollmentAsync,CheckPayerAuthEnrollmentWithHttpInfo,CheckPayerAuthEnrollmentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -402,7 +404,7 @@ public ApiResponse< RiskV1AuthenticationsPost201Response > CheckPayerAuthEnrollm return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response))); // Return statement + (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response),merchantConfig)); // Return statement } /// @@ -475,7 +477,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response))); // Return statement + (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response),merchantConfig)); // Return statement } /// /// Setup Payer Auth A new service for Merchants to get reference_id for Digital Wallets to use in place of BIN number in Cardinal. Set up file while authenticating with Cardinal. This service should be called by Merchant when payment instrument chosen or changes. This service has to be called before enrollment check. The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -582,7 +586,7 @@ public ApiResponse< RiskV1AuthenticationSetupsPost201Response > PayerAuthSetupWi } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PayerAuthSetup,PayerAuthSetupAsync,PayerAuthSetupWithHttpInfo,PayerAuthSetupAsyncWithHttpInfo")) { try @@ -596,13 +600,15 @@ public ApiResponse< RiskV1AuthenticationSetupsPost201Response > PayerAuthSetupWi } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PayerAuthSetup,PayerAuthSetupAsync,PayerAuthSetupWithHttpInfo,PayerAuthSetupAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -618,7 +624,7 @@ public ApiResponse< RiskV1AuthenticationSetupsPost201Response > PayerAuthSetupWi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response))); // Return statement + (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response),merchantConfig)); // Return statement } /// @@ -691,7 +697,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response))); // Return statement + (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response),merchantConfig)); // Return statement } /// /// Validate Authentication Results This call retrieves and validates the authentication results from issuer and allows the merchant to proceed with processing the payment. @@ -798,7 +806,7 @@ public ApiResponse< RiskV1AuthenticationResultsPost201Response > ValidateAuthent } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ValidateAuthenticationResults,ValidateAuthenticationResultsAsync,ValidateAuthenticationResultsWithHttpInfo,ValidateAuthenticationResultsAsyncWithHttpInfo")) { try @@ -812,13 +820,15 @@ public ApiResponse< RiskV1AuthenticationResultsPost201Response > ValidateAuthent } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ValidateAuthenticationResults,ValidateAuthenticationResultsAsync,ValidateAuthenticationResultsWithHttpInfo,ValidateAuthenticationResultsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -834,7 +844,7 @@ public ApiResponse< RiskV1AuthenticationResultsPost201Response > ValidateAuthent return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response))); // Return statement + (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response),merchantConfig)); // Return statement } /// @@ -907,7 +917,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response))); // Return statement + (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentBatchSummariesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentBatchSummariesApi.cs index 237e8a89..7e184b78 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentBatchSummariesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentBatchSummariesApi.cs @@ -354,7 +354,7 @@ public ApiResponse< ReportingV3PaymentBatchSummariesGet200Response > GetPaymentB } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentBatchSummary,GetPaymentBatchSummaryAsync,GetPaymentBatchSummaryWithHttpInfo,GetPaymentBatchSummaryAsyncWithHttpInfo")) { try @@ -368,12 +368,14 @@ public ApiResponse< ReportingV3PaymentBatchSummariesGet200Response > GetPaymentB } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentBatchSummary,GetPaymentBatchSummaryAsync,GetPaymentBatchSummaryWithHttpInfo,GetPaymentBatchSummaryAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -389,7 +391,7 @@ public ApiResponse< ReportingV3PaymentBatchSummariesGet200Response > GetPaymentB return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response))); // Return statement + (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response),merchantConfig)); // Return statement } /// @@ -514,7 +516,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response))); // Return statement + (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentInstrumentApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentInstrumentApi.cs index 8050944b..18585ff1 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentInstrumentApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentInstrumentApi.cs @@ -456,7 +456,7 @@ public ApiResponse DeletePaymentInstrumentWithHttpInfo (string paymentIn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeletePaymentInstrument,DeletePaymentInstrumentAsync,DeletePaymentInstrumentWithHttpInfo,DeletePaymentInstrumentAsyncWithHttpInfo")) { try @@ -470,12 +470,14 @@ public ApiResponse DeletePaymentInstrumentWithHttpInfo (string paymentIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeletePaymentInstrument,DeletePaymentInstrumentAsync,DeletePaymentInstrumentWithHttpInfo,DeletePaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -577,7 +579,7 @@ public async System.Threading.Tasks.Task> DeletePaymentInstr } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeletePaymentInstrument,DeletePaymentInstrumentAsync,DeletePaymentInstrumentWithHttpInfo,DeletePaymentInstrumentAsyncWithHttpInfo")) { try @@ -591,12 +593,14 @@ public async System.Threading.Tasks.Task> DeletePaymentInstr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeletePaymentInstrument,DeletePaymentInstrumentAsync,DeletePaymentInstrumentWithHttpInfo,DeletePaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -706,7 +710,7 @@ public ApiResponse< PostPaymentInstrumentRequest > GetPaymentInstrumentWithHttpI } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentInstrument,GetPaymentInstrumentAsync,GetPaymentInstrumentWithHttpInfo,GetPaymentInstrumentAsyncWithHttpInfo")) { try @@ -720,12 +724,14 @@ public ApiResponse< PostPaymentInstrumentRequest > GetPaymentInstrumentWithHttpI } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentInstrument,GetPaymentInstrumentAsync,GetPaymentInstrumentWithHttpInfo,GetPaymentInstrumentAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -741,7 +747,7 @@ public ApiResponse< PostPaymentInstrumentRequest > GetPaymentInstrumentWithHttpI return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest))); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest),merchantConfig)); // Return statement } /// @@ -836,7 +842,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest))); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest),merchantConfig)); // Return statement } /// /// Update a Payment Instrument | | | | | - -- | - -- | - -- | |**Standalone Payment Instruments**<br>A Payment Instrument represents tokenized payment information such as expiration date, billing address & card type.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>**Standalone Payment Instruments do not belong to a [Customer](#token-management_customer_create-a-customer).**|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Payment Instrument**<br>Your system can use this API to update an existing Payment Instrument. @@ -974,7 +982,7 @@ public ApiResponse< PatchPaymentInstrumentRequest > PatchPaymentInstrumentWithHt } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PatchPaymentInstrument,PatchPaymentInstrumentAsync,PatchPaymentInstrumentWithHttpInfo,PatchPaymentInstrumentAsyncWithHttpInfo")) { try @@ -988,13 +996,15 @@ public ApiResponse< PatchPaymentInstrumentRequest > PatchPaymentInstrumentWithHt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PatchPaymentInstrument,PatchPaymentInstrumentAsync,PatchPaymentInstrumentWithHttpInfo,PatchPaymentInstrumentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1010,7 +1020,7 @@ public ApiResponse< PatchPaymentInstrumentRequest > PatchPaymentInstrumentWithHt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest))); // Return statement + (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest),merchantConfig)); // Return statement } /// @@ -1115,7 +1125,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest))); // Return statement + (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest),merchantConfig)); // Return statement } /// /// Create a Payment Instrument | | | | | - -- | - -- | - -- | |**Standalone Payment Instruments**<br>A Payment Instrument represents tokenized payment information such as expiration date, billing address & card type.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>**Standalone Payment Instruments do not belong to a [Customer](#token-management_customer_create-a-customer).**<br><br>**Creating a Payment Instrument**<br>It is recommended you [create a Payment Instrument via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Payment Instruments**<br>To perform a payment with a particular Payment Instrument specify the [Payment Instrument in the payment request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). @@ -1235,7 +1247,7 @@ public ApiResponse< PostPaymentInstrumentRequest > PostPaymentInstrumentWithHttp } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostPaymentInstrument,PostPaymentInstrumentAsync,PostPaymentInstrumentWithHttpInfo,PostPaymentInstrumentAsyncWithHttpInfo")) { try @@ -1249,13 +1261,15 @@ public ApiResponse< PostPaymentInstrumentRequest > PostPaymentInstrumentWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostPaymentInstrument,PostPaymentInstrumentAsync,PostPaymentInstrumentWithHttpInfo,PostPaymentInstrumentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1271,7 +1285,7 @@ public ApiResponse< PostPaymentInstrumentRequest > PostPaymentInstrumentWithHttp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest))); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest),merchantConfig)); // Return statement } /// @@ -1357,7 +1371,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest))); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentLinksApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentLinksApi.cs index f02e16d4..77c7135f 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentLinksApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentLinksApi.cs @@ -423,7 +423,7 @@ public ApiResponse< PblPaymentLinksPost201Response > CreatePaymentLinkWithHttpIn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePaymentLink,CreatePaymentLinkAsync,CreatePaymentLinkWithHttpInfo,CreatePaymentLinkAsyncWithHttpInfo")) { try @@ -437,13 +437,15 @@ public ApiResponse< PblPaymentLinksPost201Response > CreatePaymentLinkWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePaymentLink,CreatePaymentLinkAsync,CreatePaymentLinkWithHttpInfo,CreatePaymentLinkAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -459,7 +461,7 @@ public ApiResponse< PblPaymentLinksPost201Response > CreatePaymentLinkWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response))); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response),merchantConfig)); // Return statement } /// @@ -535,7 +537,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response))); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response),merchantConfig)); // Return statement } /// /// Get a List of Payment Links Provides a (filtered) list of payment links that have been created in your account. You can filter the list based on the following status types: - ACTIVE - INACTIVE @@ -674,7 +678,7 @@ public ApiResponse< PblPaymentLinksAllGet200Response > GetAllPaymentLinksWithHtt } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAllPaymentLinks,GetAllPaymentLinksAsync,GetAllPaymentLinksWithHttpInfo,GetAllPaymentLinksAsyncWithHttpInfo")) { try @@ -688,12 +692,14 @@ public ApiResponse< PblPaymentLinksAllGet200Response > GetAllPaymentLinksWithHtt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAllPaymentLinks,GetAllPaymentLinksAsync,GetAllPaymentLinksWithHttpInfo,GetAllPaymentLinksAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -709,7 +715,7 @@ public ApiResponse< PblPaymentLinksAllGet200Response > GetAllPaymentLinksWithHtt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response))); // Return statement + (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response),merchantConfig)); // Return statement } /// @@ -814,7 +820,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response))); // Return statement + (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response),merchantConfig)); // Return statement } /// /// Get Payment Link Details You can retrieve details of a specific payment link. For each payment transaction you can use the Transaction Details API to get more details on the payment transaction. @@ -932,7 +940,7 @@ public ApiResponse< PblPaymentLinksGet200Response > GetPaymentLinkWithHttpInfo ( } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentLink,GetPaymentLinkAsync,GetPaymentLinkWithHttpInfo,GetPaymentLinkAsyncWithHttpInfo")) { try @@ -946,12 +954,14 @@ public ApiResponse< PblPaymentLinksGet200Response > GetPaymentLinkWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentLink,GetPaymentLinkAsync,GetPaymentLinkWithHttpInfo,GetPaymentLinkAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -967,7 +977,7 @@ public ApiResponse< PblPaymentLinksGet200Response > GetPaymentLinkWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response))); // Return statement + (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response),merchantConfig)); // Return statement } /// @@ -1052,7 +1062,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response))); // Return statement + (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response),merchantConfig)); // Return statement } /// /// Update a Payment Link You can update all information except the payment link number for a payment link. Changes made to amount/price will apply to new payments made using the payment link. @@ -1174,7 +1186,7 @@ public ApiResponse< PblPaymentLinksPost201Response > UpdatePaymentLinkWithHttpIn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdatePaymentLink,UpdatePaymentLinkAsync,UpdatePaymentLinkWithHttpInfo,UpdatePaymentLinkAsyncWithHttpInfo")) { try @@ -1188,13 +1200,15 @@ public ApiResponse< PblPaymentLinksPost201Response > UpdatePaymentLinkWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdatePaymentLink,UpdatePaymentLinkAsync,UpdatePaymentLinkWithHttpInfo,UpdatePaymentLinkAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1210,7 +1224,7 @@ public ApiResponse< PblPaymentLinksPost201Response > UpdatePaymentLinkWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response))); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response),merchantConfig)); // Return statement } /// @@ -1299,7 +1313,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response))); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentTokensApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentTokensApi.cs index c16e73de..963ce4d0 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentTokensApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentTokensApi.cs @@ -282,7 +282,7 @@ public ApiResponse< InlineResponse201 > RetrieveOrDeletePaymentTokenWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RetrieveOrDeletePaymentToken,RetrieveOrDeletePaymentTokenAsync,RetrieveOrDeletePaymentTokenWithHttpInfo,RetrieveOrDeletePaymentTokenAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< InlineResponse201 > RetrieveOrDeletePaymentTokenWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RetrieveOrDeletePaymentToken,RetrieveOrDeletePaymentTokenAsync,RetrieveOrDeletePaymentTokenWithHttpInfo,RetrieveOrDeletePaymentTokenAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< InlineResponse201 > RetrieveOrDeletePaymentTokenWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201))); // Return statement + (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201),merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> Retriev } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RetrieveOrDeletePaymentToken,RetrieveOrDeletePaymentTokenAsync,RetrieveOrDeletePaymentTokenWithHttpInfo,RetrieveOrDeletePaymentTokenAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> Retriev } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RetrieveOrDeletePaymentToken,RetrieveOrDeletePaymentTokenAsync,RetrieveOrDeletePaymentTokenWithHttpInfo,RetrieveOrDeletePaymentTokenAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> Retriev return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201))); // Return statement + (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentsApi.cs index 6e8e396d..0df93911 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentsApi.cs @@ -521,7 +521,7 @@ public ApiResponse< PtsV2PaymentsOrderPost201Response > CreateOrderRequestWithHt } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateOrderRequest,CreateOrderRequestAsync,CreateOrderRequestWithHttpInfo,CreateOrderRequestAsyncWithHttpInfo")) { try @@ -535,13 +535,15 @@ public ApiResponse< PtsV2PaymentsOrderPost201Response > CreateOrderRequestWithHt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateOrderRequest,CreateOrderRequestAsync,CreateOrderRequestWithHttpInfo,CreateOrderRequestAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -557,7 +559,7 @@ public ApiResponse< PtsV2PaymentsOrderPost201Response > CreateOrderRequestWithHt return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response))); // Return statement + (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response),merchantConfig)); // Return statement } /// @@ -643,7 +645,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response))); // Return statement + (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response),merchantConfig)); // Return statement } /// /// Process a Payment A payment authorizes the amount for the transaction. There are a number of supported payment features, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation. @@ -750,7 +754,7 @@ public ApiResponse< PtsV2PaymentsPost201Response > CreatePaymentWithHttpInfo (Cr } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePayment,CreatePaymentAsync,CreatePaymentWithHttpInfo,CreatePaymentAsyncWithHttpInfo")) { try @@ -764,13 +768,15 @@ public ApiResponse< PtsV2PaymentsPost201Response > CreatePaymentWithHttpInfo (Cr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePayment,CreatePaymentAsync,CreatePaymentWithHttpInfo,CreatePaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -786,7 +792,7 @@ public ApiResponse< PtsV2PaymentsPost201Response > CreatePaymentWithHttpInfo (Cr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response))); // Return statement + (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response),merchantConfig)); // Return statement } /// @@ -859,7 +865,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response))); // Return statement + (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response),merchantConfig)); // Return statement } /// /// Create Alternative Payments Sessions Request Create Alternative Payments Sessions Request @@ -966,7 +974,7 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > CreateSessionRequestWithHttp } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSessionRequest,CreateSessionRequestAsync,CreateSessionRequestWithHttpInfo,CreateSessionRequestAsyncWithHttpInfo")) { try @@ -980,13 +988,15 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > CreateSessionRequestWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSessionRequest,CreateSessionRequestAsync,CreateSessionRequestWithHttpInfo,CreateSessionRequestAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1002,7 +1012,7 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > CreateSessionRequestWithHttp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2))); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2),merchantConfig)); // Return statement } /// @@ -1075,7 +1085,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2))); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2),merchantConfig)); // Return statement } /// /// Increment an Authorization Use this service to authorize additional charges in a lodging or autorental transaction. Include the ID returned from the original authorization in the PATCH request to add additional charges to that authorization. @@ -1195,7 +1207,7 @@ public ApiResponse< PtsV2IncrementalAuthorizationPatch201Response > IncrementAut } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "IncrementAuth,IncrementAuthAsync,IncrementAuthWithHttpInfo,IncrementAuthAsyncWithHttpInfo")) { try @@ -1209,13 +1221,15 @@ public ApiResponse< PtsV2IncrementalAuthorizationPatch201Response > IncrementAut } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "IncrementAuth,IncrementAuthAsync,IncrementAuthWithHttpInfo,IncrementAuthAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1231,7 +1245,7 @@ public ApiResponse< PtsV2IncrementalAuthorizationPatch201Response > IncrementAut return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response))); // Return statement + (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response),merchantConfig)); // Return statement } /// @@ -1317,7 +1331,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response))); // Return statement + (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response),merchantConfig)); // Return statement } /// /// Check a Payment Status Checks and updates the payment status @@ -1437,7 +1453,7 @@ public ApiResponse< PtsV2PaymentsPost201Response1 > RefreshPaymentStatusWithHttp } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RefreshPaymentStatus,RefreshPaymentStatusAsync,RefreshPaymentStatusWithHttpInfo,RefreshPaymentStatusAsyncWithHttpInfo")) { try @@ -1451,13 +1467,15 @@ public ApiResponse< PtsV2PaymentsPost201Response1 > RefreshPaymentStatusWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RefreshPaymentStatus,RefreshPaymentStatusAsync,RefreshPaymentStatusWithHttpInfo,RefreshPaymentStatusAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1473,7 +1491,7 @@ public ApiResponse< PtsV2PaymentsPost201Response1 > RefreshPaymentStatusWithHttp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1))); // Return statement + (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1),merchantConfig)); // Return statement } /// @@ -1559,7 +1577,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1))); // Return statement + (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1),merchantConfig)); // Return statement } /// /// Update Alternative Payments Sessions Request Update Alternative Payments Sessions Request @@ -1679,7 +1699,7 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > UpdateSessionReqWithHttpInfo } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateSessionReq,UpdateSessionReqAsync,UpdateSessionReqWithHttpInfo,UpdateSessionReqAsyncWithHttpInfo")) { try @@ -1693,13 +1713,15 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > UpdateSessionReqWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateSessionReq,UpdateSessionReqAsync,UpdateSessionReqWithHttpInfo,UpdateSessionReqAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1715,7 +1737,7 @@ public ApiResponse< PtsV2PaymentsPost201Response2 > UpdateSessionReqWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2))); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2),merchantConfig)); // Return statement } /// @@ -1801,7 +1823,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2))); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayoutsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayoutsApi.cs index df258eb4..9a90c6bb 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayoutsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayoutsApi.cs @@ -282,7 +282,7 @@ public ApiResponse< PtsV2PayoutsPost201Response > OctCreatePaymentWithHttpInfo ( } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "OctCreatePayment,OctCreatePaymentAsync,OctCreatePaymentWithHttpInfo,OctCreatePaymentAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< PtsV2PayoutsPost201Response > OctCreatePaymentWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "OctCreatePayment,OctCreatePaymentAsync,OctCreatePaymentWithHttpInfo,OctCreatePaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< PtsV2PayoutsPost201Response > OctCreatePaymentWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response))); // Return statement + (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response),merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response))); // Return statement + (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PlansApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PlansApi.cs index 29de5456..d9e213f8 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PlansApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PlansApi.cs @@ -604,7 +604,7 @@ public ApiResponse< ActivateDeactivatePlanResponse > ActivatePlanWithHttpInfo (s } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ActivatePlan,ActivatePlanAsync,ActivatePlanWithHttpInfo,ActivatePlanAsyncWithHttpInfo")) { try @@ -618,12 +618,14 @@ public ApiResponse< ActivateDeactivatePlanResponse > ActivatePlanWithHttpInfo (s } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ActivatePlan,ActivatePlanAsync,ActivatePlanWithHttpInfo,ActivatePlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -639,7 +641,7 @@ public ApiResponse< ActivateDeactivatePlanResponse > ActivatePlanWithHttpInfo (s return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse))); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse),merchantConfig)); // Return statement } /// @@ -724,7 +726,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse))); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse),merchantConfig)); // Return statement } /// /// Create a Plan The recurring billing service enables you to manage payment plans and subscriptions for recurring payment schedules. It securely stores your customer's payment information and personal data within secure Visa data centers, reducing storage risks and PCI DSS scope through the use of *Token Management* (*TMS*). The three key elements of *Cybersource* Recurring Billing are: -  **Token**: stores customer billing, shipping, and payment details. -  **Plan**: stores the billing schedule. -  **Subscription**: combines the token and plan, and defines the subscription start date, name, and description. The APIs in this section demonstrate the management of the Plans and Subscriptions. For Tokens please refer to [Token Management](#token-management) The availability of API features for a merchant can depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -833,7 +837,7 @@ public ApiResponse< CreatePlanResponse > CreatePlanWithHttpInfo (CreatePlanReque } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePlan,CreatePlanAsync,CreatePlanWithHttpInfo,CreatePlanAsyncWithHttpInfo")) { try @@ -847,13 +851,15 @@ public ApiResponse< CreatePlanResponse > CreatePlanWithHttpInfo (CreatePlanReque } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePlan,CreatePlanAsync,CreatePlanWithHttpInfo,CreatePlanAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -869,7 +875,7 @@ public ApiResponse< CreatePlanResponse > CreatePlanWithHttpInfo (CreatePlanReque return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse))); // Return statement + (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse),merchantConfig)); // Return statement } /// @@ -945,7 +951,7 @@ public async System.Threading.Tasks.Task> Create } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePlan,CreatePlanAsync,CreatePlanWithHttpInfo,CreatePlanAsyncWithHttpInfo")) { try @@ -959,13 +965,15 @@ public async System.Threading.Tasks.Task> Create } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePlan,CreatePlanAsync,CreatePlanWithHttpInfo,CreatePlanAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -981,7 +989,7 @@ public async System.Threading.Tasks.Task> Create return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse))); // Return statement + (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse),merchantConfig)); // Return statement } /// /// Deactivate a Plan Deactivate a Plan @@ -1064,7 +1072,7 @@ public ApiResponse< ActivateDeactivatePlanResponse > DeactivatePlanWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeactivatePlan,DeactivatePlanAsync,DeactivatePlanWithHttpInfo,DeactivatePlanAsyncWithHttpInfo")) { try @@ -1078,12 +1086,14 @@ public ApiResponse< ActivateDeactivatePlanResponse > DeactivatePlanWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeactivatePlan,DeactivatePlanAsync,DeactivatePlanWithHttpInfo,DeactivatePlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1099,7 +1109,7 @@ public ApiResponse< ActivateDeactivatePlanResponse > DeactivatePlanWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse))); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse),merchantConfig)); // Return statement } /// @@ -1184,7 +1194,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse))); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse),merchantConfig)); // Return statement } /// /// Delete a Plan Delete a Plan is only allowed: - plan status is in `DRAFT` - plan status is in `ACTIVE`, and `INACTIVE` only allowed when no subscriptions attached to a plan in the lifetime of a plan @@ -1302,7 +1314,7 @@ public ApiResponse< DeletePlanResponse > DeletePlanWithHttpInfo (string id) } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeletePlan,DeletePlanAsync,DeletePlanWithHttpInfo,DeletePlanAsyncWithHttpInfo")) { try @@ -1316,12 +1328,14 @@ public ApiResponse< DeletePlanResponse > DeletePlanWithHttpInfo (string id) } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeletePlan,DeletePlanAsync,DeletePlanWithHttpInfo,DeletePlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1337,7 +1351,7 @@ public ApiResponse< DeletePlanResponse > DeletePlanWithHttpInfo (string id) return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse))); // Return statement + (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse),merchantConfig)); // Return statement } /// @@ -1422,7 +1436,7 @@ public async System.Threading.Tasks.Task> Delete } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeletePlan,DeletePlanAsync,DeletePlanWithHttpInfo,DeletePlanAsyncWithHttpInfo")) { try @@ -1436,12 +1450,14 @@ public async System.Threading.Tasks.Task> Delete } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeletePlan,DeletePlanAsync,DeletePlanWithHttpInfo,DeletePlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1457,7 +1473,7 @@ public async System.Threading.Tasks.Task> Delete return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse))); // Return statement + (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse),merchantConfig)); // Return statement } /// /// Get a Plan Retrieve a Plan details by Plan Id. @@ -1540,7 +1556,7 @@ public ApiResponse< GetPlanResponse > GetPlanWithHttpInfo (string id) } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlan,GetPlanAsync,GetPlanWithHttpInfo,GetPlanAsyncWithHttpInfo")) { try @@ -1554,12 +1570,14 @@ public ApiResponse< GetPlanResponse > GetPlanWithHttpInfo (string id) } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlan,GetPlanAsync,GetPlanWithHttpInfo,GetPlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1575,7 +1593,7 @@ public ApiResponse< GetPlanResponse > GetPlanWithHttpInfo (string id) return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse))); // Return statement + (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse),merchantConfig)); // Return statement } /// @@ -1660,7 +1678,7 @@ public async System.Threading.Tasks.Task> GetPlanAs } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlan,GetPlanAsync,GetPlanWithHttpInfo,GetPlanAsyncWithHttpInfo")) { try @@ -1674,12 +1692,14 @@ public async System.Threading.Tasks.Task> GetPlanAs } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlan,GetPlanAsync,GetPlanWithHttpInfo,GetPlanAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1695,7 +1715,7 @@ public async System.Threading.Tasks.Task> GetPlanAs return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse))); // Return statement + (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse),merchantConfig)); // Return statement } /// /// Get a Plan Code Get a Unique Plan Code @@ -1765,7 +1785,7 @@ public ApiResponse< GetPlanCodeResponse > GetPlanCodeWithHttpInfo () } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlanCode,GetPlanCodeAsync,GetPlanCodeWithHttpInfo,GetPlanCodeAsyncWithHttpInfo")) { try @@ -1779,12 +1799,14 @@ public ApiResponse< GetPlanCodeResponse > GetPlanCodeWithHttpInfo () } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlanCode,GetPlanCodeAsync,GetPlanCodeWithHttpInfo,GetPlanCodeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1800,7 +1822,7 @@ public ApiResponse< GetPlanCodeResponse > GetPlanCodeWithHttpInfo () return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse))); // Return statement + (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse),merchantConfig)); // Return statement } /// @@ -1872,7 +1894,7 @@ public async System.Threading.Tasks.Task> GetPl } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlanCode,GetPlanCodeAsync,GetPlanCodeWithHttpInfo,GetPlanCodeAsyncWithHttpInfo")) { try @@ -1886,12 +1908,14 @@ public async System.Threading.Tasks.Task> GetPl } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlanCode,GetPlanCodeAsync,GetPlanCodeWithHttpInfo,GetPlanCodeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1907,7 +1931,7 @@ public async System.Threading.Tasks.Task> GetPl return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse))); // Return statement + (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse),merchantConfig)); // Return statement } /// /// Get a List of Plans Retrieve Plans by Plan Code & Plan Status. @@ -2012,7 +2036,7 @@ public ApiResponse< GetAllPlansResponse > GetPlansWithHttpInfo (int? offset = nu } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlans,GetPlansAsync,GetPlansWithHttpInfo,GetPlansAsyncWithHttpInfo")) { try @@ -2026,12 +2050,14 @@ public ApiResponse< GetAllPlansResponse > GetPlansWithHttpInfo (int? offset = nu } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlans,GetPlansAsync,GetPlansWithHttpInfo,GetPlansAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2047,7 +2073,7 @@ public ApiResponse< GetAllPlansResponse > GetPlansWithHttpInfo (int? offset = nu return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse))); // Return statement + (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse),merchantConfig)); // Return statement } /// @@ -2154,7 +2180,7 @@ public async System.Threading.Tasks.Task> GetPl } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPlans,GetPlansAsync,GetPlansWithHttpInfo,GetPlansAsyncWithHttpInfo")) { try @@ -2168,12 +2194,14 @@ public async System.Threading.Tasks.Task> GetPl } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPlans,GetPlansAsync,GetPlansWithHttpInfo,GetPlansAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2189,7 +2217,7 @@ public async System.Threading.Tasks.Task> GetPl return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse))); // Return statement + (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse),merchantConfig)); // Return statement } /// /// Update a Plan Update a Plan Plan in `DRAFT` status - All updates are allowed on Plan with `DRAFT` status Plan in `ACTIVE` status [Following fields are **Not Updatable**] - `planInformation.billingPeriod` - `planInformation.billingCycles` [Update is only allowed to **increase** billingCycles] - `orderInformation.amountDetails.currency` @@ -2276,7 +2304,7 @@ public ApiResponse< UpdatePlanResponse > UpdatePlanWithHttpInfo (string id, Upda } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdatePlan,UpdatePlanAsync,UpdatePlanWithHttpInfo,UpdatePlanAsyncWithHttpInfo")) { try @@ -2290,13 +2318,15 @@ public ApiResponse< UpdatePlanResponse > UpdatePlanWithHttpInfo (string id, Upda } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdatePlan,UpdatePlanAsync,UpdatePlanWithHttpInfo,UpdatePlanAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2312,7 +2342,7 @@ public ApiResponse< UpdatePlanResponse > UpdatePlanWithHttpInfo (string id, Upda return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse))); // Return statement + (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse),merchantConfig)); // Return statement } /// @@ -2401,7 +2431,7 @@ public async System.Threading.Tasks.Task> Update } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdatePlan,UpdatePlanAsync,UpdatePlanWithHttpInfo,UpdatePlanAsyncWithHttpInfo")) { try @@ -2415,13 +2445,15 @@ public async System.Threading.Tasks.Task> Update } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdatePlan,UpdatePlanAsync,UpdatePlanWithHttpInfo,UpdatePlanAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2437,7 +2469,7 @@ public async System.Threading.Tasks.Task> Update return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse))); // Return statement + (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PurchaseAndRefundDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PurchaseAndRefundDetailsApi.cs index dc38eeec..34f41f20 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PurchaseAndRefundDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PurchaseAndRefundDetailsApi.cs @@ -376,7 +376,7 @@ public ApiResponse< ReportingV3PurchaseRefundDetailsGet200Response > GetPurchase } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPurchaseAndRefundDetails,GetPurchaseAndRefundDetailsAsync,GetPurchaseAndRefundDetailsWithHttpInfo,GetPurchaseAndRefundDetailsAsyncWithHttpInfo")) { try @@ -390,12 +390,14 @@ public ApiResponse< ReportingV3PurchaseRefundDetailsGet200Response > GetPurchase } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPurchaseAndRefundDetails,GetPurchaseAndRefundDetailsAsync,GetPurchaseAndRefundDetailsWithHttpInfo,GetPurchaseAndRefundDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -411,7 +413,7 @@ public ApiResponse< ReportingV3PurchaseRefundDetailsGet200Response > GetPurchase return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response))); // Return statement + (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response),merchantConfig)); // Return statement } /// @@ -550,7 +552,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response))); // Return statement + (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PushFundsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PushFundsApi.cs index 439820de..32262d2f 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PushFundsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PushFundsApi.cs @@ -378,7 +378,7 @@ public ApiResponse< PushFunds201Response > CreatePushFundsTransferWithHttpInfo ( } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePushFundsTransfer,CreatePushFundsTransferAsync,CreatePushFundsTransferWithHttpInfo,CreatePushFundsTransferAsyncWithHttpInfo")) { try @@ -392,13 +392,15 @@ public ApiResponse< PushFunds201Response > CreatePushFundsTransferWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePushFundsTransfer,CreatePushFundsTransferAsync,CreatePushFundsTransferWithHttpInfo,CreatePushFundsTransferAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -414,7 +416,7 @@ public ApiResponse< PushFunds201Response > CreatePushFundsTransferWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response))); // Return statement + (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response),merchantConfig)); // Return statement } /// @@ -559,7 +561,7 @@ public async System.Threading.Tasks.Task> Crea } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreatePushFundsTransfer,CreatePushFundsTransferAsync,CreatePushFundsTransferWithHttpInfo,CreatePushFundsTransferAsyncWithHttpInfo")) { try @@ -573,13 +575,15 @@ public async System.Threading.Tasks.Task> Crea } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreatePushFundsTransfer,CreatePushFundsTransferAsync,CreatePushFundsTransferWithHttpInfo,CreatePushFundsTransferAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -595,7 +599,7 @@ public async System.Threading.Tasks.Task> Crea return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response))); // Return statement + (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RefundApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RefundApi.cs index f8753b4b..eb4dfd3a 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RefundApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RefundApi.cs @@ -345,7 +345,7 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundCaptureWithHttpIn } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RefundCapture,RefundCaptureAsync,RefundCaptureWithHttpInfo,RefundCaptureAsyncWithHttpInfo")) { try @@ -359,13 +359,15 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundCaptureWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RefundCapture,RefundCaptureAsync,RefundCaptureWithHttpInfo,RefundCaptureAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -381,7 +383,7 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundCaptureWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response))); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response),merchantConfig)); // Return statement } /// @@ -467,7 +469,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response))); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response),merchantConfig)); // Return statement } /// /// Refund a Payment Refund a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to refund the payment amount. @@ -587,7 +591,7 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundPaymentWithHttpIn } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "RefundPayment,RefundPaymentAsync,RefundPaymentWithHttpInfo,RefundPaymentAsyncWithHttpInfo")) { try @@ -601,13 +605,15 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundPaymentWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "RefundPayment,RefundPaymentAsync,RefundPaymentWithHttpInfo,RefundPaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -623,7 +629,7 @@ public ApiResponse< PtsV2PaymentsRefundPost201Response > RefundPaymentWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response))); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response),merchantConfig)); // Return statement } /// @@ -709,7 +715,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response))); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDefinitionsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDefinitionsApi.cs index fb4584ce..88bcbdfc 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDefinitionsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDefinitionsApi.cs @@ -370,7 +370,7 @@ public ApiResponse< ReportingV3ReportDefinitionsNameGet200Response > GetResource } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetResourceInfoByReportDefinition,GetResourceInfoByReportDefinitionAsync,GetResourceInfoByReportDefinitionWithHttpInfo,GetResourceInfoByReportDefinitionAsyncWithHttpInfo")) { try @@ -384,12 +384,14 @@ public ApiResponse< ReportingV3ReportDefinitionsNameGet200Response > GetResource } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetResourceInfoByReportDefinition,GetResourceInfoByReportDefinitionAsync,GetResourceInfoByReportDefinitionWithHttpInfo,GetResourceInfoByReportDefinitionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -405,7 +407,7 @@ public ApiResponse< ReportingV3ReportDefinitionsNameGet200Response > GetResource return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response))); // Return statement + (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response),merchantConfig)); // Return statement } /// @@ -508,7 +510,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response))); // Return statement + (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response),merchantConfig)); // Return statement } /// /// Get Reporting Resource Information View a list of supported reports and their attributes before subscribing to them. @@ -624,7 +628,7 @@ public ApiResponse< ReportingV3ReportDefinitionsGet200Response > GetResourceV2In } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetResourceV2Info,GetResourceV2InfoAsync,GetResourceV2InfoWithHttpInfo,GetResourceV2InfoAsyncWithHttpInfo")) { try @@ -638,12 +642,14 @@ public ApiResponse< ReportingV3ReportDefinitionsGet200Response > GetResourceV2In } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetResourceV2Info,GetResourceV2InfoAsync,GetResourceV2InfoWithHttpInfo,GetResourceV2InfoAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -659,7 +665,7 @@ public ApiResponse< ReportingV3ReportDefinitionsGet200Response > GetResourceV2In return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response))); // Return statement + (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response),merchantConfig)); // Return statement } /// @@ -742,7 +748,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response))); // Return statement + (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDownloadsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDownloadsApi.cs index 1ca79013..2be3152b 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDownloadsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDownloadsApi.cs @@ -317,7 +317,7 @@ public ApiResponse DownloadReportWithHttpInfo (DateTime? reportDate, str } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DownloadReport,DownloadReportAsync,DownloadReportWithHttpInfo,DownloadReportAsyncWithHttpInfo")) { try @@ -331,12 +331,14 @@ public ApiResponse DownloadReportWithHttpInfo (DateTime? reportDate, str } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DownloadReport,DownloadReportAsync,DownloadReportWithHttpInfo,DownloadReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -453,7 +455,7 @@ public async System.Threading.Tasks.Task> DownloadReportAsyn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DownloadReport,DownloadReportAsync,DownloadReportWithHttpInfo,DownloadReportAsyncWithHttpInfo")) { try @@ -467,12 +469,14 @@ public async System.Threading.Tasks.Task> DownloadReportAsyn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DownloadReport,DownloadReportAsync,DownloadReportWithHttpInfo,DownloadReportAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportSubscriptionsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportSubscriptionsApi.cs index e4fd3dda..960fb9f0 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportSubscriptionsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportSubscriptionsApi.cs @@ -470,7 +470,7 @@ public ApiResponse CreateStandardOrClassicSubscriptionWithHttpInfo (Pred } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateStandardOrClassicSubscription,CreateStandardOrClassicSubscriptionAsync,CreateStandardOrClassicSubscriptionWithHttpInfo,CreateStandardOrClassicSubscriptionAsyncWithHttpInfo")) { try @@ -484,13 +484,15 @@ public ApiResponse CreateStandardOrClassicSubscriptionWithHttpInfo (Pred } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateStandardOrClassicSubscription,CreateStandardOrClassicSubscriptionAsync,CreateStandardOrClassicSubscriptionWithHttpInfo,CreateStandardOrClassicSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -584,7 +586,7 @@ public async System.Threading.Tasks.Task> CreateStandardOrCl } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateStandardOrClassicSubscription,CreateStandardOrClassicSubscriptionAsync,CreateStandardOrClassicSubscriptionWithHttpInfo,CreateStandardOrClassicSubscriptionAsyncWithHttpInfo")) { try @@ -598,13 +600,15 @@ public async System.Threading.Tasks.Task> CreateStandardOrCl } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateStandardOrClassicSubscription,CreateStandardOrClassicSubscriptionAsync,CreateStandardOrClassicSubscriptionWithHttpInfo,CreateStandardOrClassicSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -696,7 +700,7 @@ public ApiResponse CreateSubscriptionWithHttpInfo (CreateReportSubscript } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo")) { try @@ -710,13 +714,15 @@ public ApiResponse CreateSubscriptionWithHttpInfo (CreateReportSubscript } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -810,7 +816,7 @@ public async System.Threading.Tasks.Task> CreateSubscription } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo")) { try @@ -824,13 +830,15 @@ public async System.Threading.Tasks.Task> CreateSubscription } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -931,7 +939,7 @@ public ApiResponse DeleteSubscriptionWithHttpInfo (string reportName, st } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteSubscription,DeleteSubscriptionAsync,DeleteSubscriptionWithHttpInfo,DeleteSubscriptionAsyncWithHttpInfo")) { try @@ -945,12 +953,14 @@ public ApiResponse DeleteSubscriptionWithHttpInfo (string reportName, st } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteSubscription,DeleteSubscriptionAsync,DeleteSubscriptionWithHttpInfo,DeleteSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1053,7 +1063,7 @@ public async System.Threading.Tasks.Task> DeleteSubscription } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteSubscription,DeleteSubscriptionAsync,DeleteSubscriptionWithHttpInfo,DeleteSubscriptionAsyncWithHttpInfo")) { try @@ -1067,12 +1077,14 @@ public async System.Threading.Tasks.Task> DeleteSubscription } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteSubscription,DeleteSubscriptionAsync,DeleteSubscriptionWithHttpInfo,DeleteSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1163,7 +1175,7 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200Response > GetAllSubscri } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAllSubscriptions,GetAllSubscriptionsAsync,GetAllSubscriptionsWithHttpInfo,GetAllSubscriptionsAsyncWithHttpInfo")) { try @@ -1177,12 +1189,14 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200Response > GetAllSubscri } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAllSubscriptions,GetAllSubscriptionsAsync,GetAllSubscriptionsWithHttpInfo,GetAllSubscriptionsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1198,7 +1212,7 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200Response > GetAllSubscri return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response))); // Return statement + (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response),merchantConfig)); // Return statement } /// @@ -1274,7 +1288,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response))); // Return statement + (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response),merchantConfig)); // Return statement } /// /// Get Subscription for Report Name View the details of a report subscription, such as the report format or report frequency, using the report's unique name. @@ -1396,7 +1412,7 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200ResponseSubscriptions > } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo")) { try @@ -1410,12 +1426,14 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200ResponseSubscriptions > } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1431,7 +1449,7 @@ public ApiResponse< ReportingV3ReportSubscriptionsGet200ResponseSubscriptions > return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions))); // Return statement + (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions),merchantConfig)); // Return statement } /// @@ -1520,7 +1538,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions))); // Return statement + (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportsApi.cs index 22af447c..54f4b815 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportsApi.cs @@ -410,7 +410,7 @@ public ApiResponse CreateReportWithHttpInfo (CreateAdhocReportRequest cr } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateReport,CreateReportAsync,CreateReportWithHttpInfo,CreateReportAsyncWithHttpInfo")) { try @@ -424,13 +424,15 @@ public ApiResponse CreateReportWithHttpInfo (CreateAdhocReportRequest cr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateReport,CreateReportAsync,CreateReportWithHttpInfo,CreateReportAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -524,7 +526,7 @@ public async System.Threading.Tasks.Task> CreateReportAsyncW } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateReport,CreateReportAsync,CreateReportWithHttpInfo,CreateReportAsyncWithHttpInfo")) { try @@ -538,13 +540,15 @@ public async System.Threading.Tasks.Task> CreateReportAsyncW } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateReport,CreateReportAsync,CreateReportWithHttpInfo,CreateReportAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -649,7 +653,7 @@ public ApiResponse< ReportingV3ReportsIdGet200Response > GetReportByReportIdWith } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetReportByReportId,GetReportByReportIdAsync,GetReportByReportIdWithHttpInfo,GetReportByReportIdAsyncWithHttpInfo")) { try @@ -663,12 +667,14 @@ public ApiResponse< ReportingV3ReportsIdGet200Response > GetReportByReportIdWith } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetReportByReportId,GetReportByReportIdAsync,GetReportByReportIdWithHttpInfo,GetReportByReportIdAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -684,7 +690,7 @@ public ApiResponse< ReportingV3ReportsIdGet200Response > GetReportByReportIdWith return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response))); // Return statement + (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response),merchantConfig)); // Return statement } /// @@ -774,7 +780,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response))); // Return statement + (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response),merchantConfig)); // Return statement } /// /// Retrieve Available Reports Retrieve a list of the available reports to which you are subscribed. This will also give you the reportId value, which you can also use to download a report. @@ -957,7 +965,7 @@ public ApiResponse< ReportingV3ReportsGet200Response > SearchReportsWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SearchReports,SearchReportsAsync,SearchReportsWithHttpInfo,SearchReportsAsyncWithHttpInfo")) { try @@ -971,12 +979,14 @@ public ApiResponse< ReportingV3ReportsGet200Response > SearchReportsWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SearchReports,SearchReportsAsync,SearchReportsWithHttpInfo,SearchReportsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -992,7 +1002,7 @@ public ApiResponse< ReportingV3ReportsGet200Response > SearchReportsWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response))); // Return statement + (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response),merchantConfig)); // Return statement } /// @@ -1142,7 +1152,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response))); // Return statement + (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalDetailsApi.cs index 4f2726d6..55be606c 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalDetailsApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3RetrievalDetailsGet200Response > GetRetrievalDeta } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetRetrievalDetails,GetRetrievalDetailsAsync,GetRetrievalDetailsWithHttpInfo,GetRetrievalDetailsAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3RetrievalDetailsGet200Response > GetRetrievalDeta } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetRetrievalDetails,GetRetrievalDetailsAsync,GetRetrievalDetailsWithHttpInfo,GetRetrievalDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3RetrievalDetailsGet200Response > GetRetrievalDeta return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response))); // Return statement + (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response),merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response))); // Return statement + (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalSummariesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalSummariesApi.cs index 26d1c6ca..899e58aa 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalSummariesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalSummariesApi.cs @@ -320,7 +320,7 @@ public ApiResponse< ReportingV3RetrievalSummariesGet200Response > GetRetrievalSu } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetRetrievalSummary,GetRetrievalSummaryAsync,GetRetrievalSummaryWithHttpInfo,GetRetrievalSummaryAsyncWithHttpInfo")) { try @@ -334,12 +334,14 @@ public ApiResponse< ReportingV3RetrievalSummariesGet200Response > GetRetrievalSu } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetRetrievalSummary,GetRetrievalSummaryAsync,GetRetrievalSummaryWithHttpInfo,GetRetrievalSummaryAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -355,7 +357,7 @@ public ApiResponse< ReportingV3RetrievalSummariesGet200Response > GetRetrievalSu return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response))); // Return statement + (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response),merchantConfig)); // Return statement } /// @@ -458,7 +460,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response))); // Return statement + (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReversalApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReversalApi.cs index a48ec013..260481bc 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReversalApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReversalApi.cs @@ -341,7 +341,7 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > AuthReversalWithHttp } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "AuthReversal,AuthReversalAsync,AuthReversalWithHttpInfo,AuthReversalAsyncWithHttpInfo")) { try @@ -355,13 +355,15 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > AuthReversalWithHttp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "AuthReversal,AuthReversalAsync,AuthReversalWithHttpInfo,AuthReversalAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -377,7 +379,7 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > AuthReversalWithHttp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response))); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response),merchantConfig)); // Return statement } /// @@ -463,7 +465,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response))); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response),merchantConfig)); // Return statement } /// /// Timeout Reversal This is to reverse a previous payment that merchant does not receive a reply(Mostly due to Timeout). To use this feature/API, make sure to pass unique value to field - clientReferenceInformation -> transactionId in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call and use same transactionId in this API request payload to reverse the payment. @@ -570,7 +574,7 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > MitReversalWithHttpI } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "MitReversal,MitReversalAsync,MitReversalWithHttpInfo,MitReversalAsyncWithHttpInfo")) { try @@ -584,13 +588,15 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > MitReversalWithHttpI } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "MitReversal,MitReversalAsync,MitReversalWithHttpInfo,MitReversalAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -606,7 +612,7 @@ public ApiResponse< PtsV2PaymentsReversalsPost201Response > MitReversalWithHttpI return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response))); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response),merchantConfig)); // Return statement } /// @@ -679,7 +685,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response))); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SearchTransactionsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SearchTransactionsApi.cs index 876b11cf..527f112d 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SearchTransactionsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SearchTransactionsApi.cs @@ -324,7 +324,7 @@ public ApiResponse< TssV2TransactionsPost201Response > CreateSearchWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSearch,CreateSearchAsync,CreateSearchWithHttpInfo,CreateSearchAsyncWithHttpInfo")) { try @@ -338,13 +338,15 @@ public ApiResponse< TssV2TransactionsPost201Response > CreateSearchWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSearch,CreateSearchAsync,CreateSearchWithHttpInfo,CreateSearchAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -360,7 +362,7 @@ public ApiResponse< TssV2TransactionsPost201Response > CreateSearchWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response))); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response),merchantConfig)); // Return statement } /// @@ -433,7 +435,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response))); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response),merchantConfig)); // Return statement } /// /// Get Search Results Include the Search ID in the GET request to retrieve the search results. @@ -549,7 +553,7 @@ public ApiResponse< TssV2TransactionsPost201Response > GetSearchWithHttpInfo (st } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSearch,GetSearchAsync,GetSearchWithHttpInfo,GetSearchAsyncWithHttpInfo")) { try @@ -563,12 +567,14 @@ public ApiResponse< TssV2TransactionsPost201Response > GetSearchWithHttpInfo (st } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSearch,GetSearchAsync,GetSearchWithHttpInfo,GetSearchAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -584,7 +590,7 @@ public ApiResponse< TssV2TransactionsPost201Response > GetSearchWithHttpInfo (st return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response))); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response),merchantConfig)); // Return statement } /// @@ -666,7 +672,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response))); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SecureFileShareApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SecureFileShareApi.cs index 91f1c2e3..68288331 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SecureFileShareApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SecureFileShareApi.cs @@ -355,7 +355,7 @@ public ApiResponse GetFileWithHttpInfo (string fileId, string organizati } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFile,GetFileAsync,GetFileWithHttpInfo,GetFileAsyncWithHttpInfo")) { try @@ -369,12 +369,14 @@ public ApiResponse GetFileWithHttpInfo (string fileId, string organizati } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFile,GetFileAsync,GetFileWithHttpInfo,GetFileAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -479,7 +481,7 @@ public async System.Threading.Tasks.Task> GetFileAsyncWithHt } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFile,GetFileAsync,GetFileWithHttpInfo,GetFileAsyncWithHttpInfo")) { try @@ -493,12 +495,14 @@ public async System.Threading.Tasks.Task> GetFileAsyncWithHt } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFile,GetFileAsync,GetFileWithHttpInfo,GetFileAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -622,7 +626,7 @@ public ApiResponse< V1FileDetailsGet200Response > GetFileDetailWithHttpInfo (Dat } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFileDetail,GetFileDetailAsync,GetFileDetailWithHttpInfo,GetFileDetailAsyncWithHttpInfo")) { try @@ -636,12 +640,14 @@ public ApiResponse< V1FileDetailsGet200Response > GetFileDetailWithHttpInfo (Dat } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFileDetail,GetFileDetailAsync,GetFileDetailWithHttpInfo,GetFileDetailAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -657,7 +663,7 @@ public ApiResponse< V1FileDetailsGet200Response > GetFileDetailWithHttpInfo (Dat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response))); // Return statement + (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response),merchantConfig)); // Return statement } /// @@ -766,7 +772,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response))); // Return statement + (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsApi.cs index da8c65c9..3fca6db5 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsApi.cs @@ -611,7 +611,7 @@ public ApiResponse< ActivateSubscriptionResponse > ActivateSubscriptionWithHttpI } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ActivateSubscription,ActivateSubscriptionAsync,ActivateSubscriptionWithHttpInfo,ActivateSubscriptionAsyncWithHttpInfo")) { try @@ -625,12 +625,14 @@ public ApiResponse< ActivateSubscriptionResponse > ActivateSubscriptionWithHttpI } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ActivateSubscription,ActivateSubscriptionAsync,ActivateSubscriptionWithHttpInfo,ActivateSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -646,7 +648,7 @@ public ApiResponse< ActivateSubscriptionResponse > ActivateSubscriptionWithHttpI return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse))); // Return statement + (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse),merchantConfig)); // Return statement } /// @@ -738,7 +740,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse))); // Return statement + (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse),merchantConfig)); // Return statement } /// /// Cancel a Subscription Cancel a Subscription @@ -856,7 +860,7 @@ public ApiResponse< CancelSubscriptionResponse > CancelSubscriptionWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CancelSubscription,CancelSubscriptionAsync,CancelSubscriptionWithHttpInfo,CancelSubscriptionAsyncWithHttpInfo")) { try @@ -870,12 +874,14 @@ public ApiResponse< CancelSubscriptionResponse > CancelSubscriptionWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CancelSubscription,CancelSubscriptionAsync,CancelSubscriptionWithHttpInfo,CancelSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -891,7 +897,7 @@ public ApiResponse< CancelSubscriptionResponse > CancelSubscriptionWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse))); // Return statement + (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse),merchantConfig)); // Return statement } /// @@ -976,7 +982,7 @@ public async System.Threading.Tasks.Task } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CancelSubscription,CancelSubscriptionAsync,CancelSubscriptionWithHttpInfo,CancelSubscriptionAsyncWithHttpInfo")) { try @@ -990,12 +996,14 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CancelSubscription,CancelSubscriptionAsync,CancelSubscriptionWithHttpInfo,CancelSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1011,7 +1019,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse))); // Return statement + (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse),merchantConfig)); // Return statement } /// /// Create a Subscription Create a Recurring Billing Subscription @@ -1085,7 +1093,7 @@ public ApiResponse< CreateSubscriptionResponse > CreateSubscriptionWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo")) { try @@ -1099,13 +1107,15 @@ public ApiResponse< CreateSubscriptionResponse > CreateSubscriptionWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1121,7 +1131,7 @@ public ApiResponse< CreateSubscriptionResponse > CreateSubscriptionWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse))); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse),merchantConfig)); // Return statement } /// @@ -1197,7 +1207,7 @@ public async System.Threading.Tasks.Task } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo")) { try @@ -1211,13 +1221,15 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateSubscription,CreateSubscriptionAsync,CreateSubscriptionWithHttpInfo,CreateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1233,7 +1245,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse))); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse),merchantConfig)); // Return statement } /// /// Get a List of Subscriptions Retrieve Subscriptions by Subscription Code & Subscription Status. @@ -1331,7 +1343,7 @@ public ApiResponse< GetAllSubscriptionsResponse > GetAllSubscriptionsWithHttpInf } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetAllSubscriptions,GetAllSubscriptionsAsync,GetAllSubscriptionsWithHttpInfo,GetAllSubscriptionsAsyncWithHttpInfo")) { try @@ -1345,12 +1357,14 @@ public ApiResponse< GetAllSubscriptionsResponse > GetAllSubscriptionsWithHttpInf } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetAllSubscriptions,GetAllSubscriptionsAsync,GetAllSubscriptionsWithHttpInfo,GetAllSubscriptionsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1366,7 +1380,7 @@ public ApiResponse< GetAllSubscriptionsResponse > GetAllSubscriptionsWithHttpInf return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse))); // Return statement + (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse),merchantConfig)); // Return statement } /// @@ -1466,7 +1480,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse))); // Return statement + (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse),merchantConfig)); // Return statement } /// /// Get a Subscription Get a Subscription by Subscription Id @@ -1584,7 +1600,7 @@ public ApiResponse< GetSubscriptionResponse > GetSubscriptionWithHttpInfo (strin } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo")) { try @@ -1598,12 +1614,14 @@ public ApiResponse< GetSubscriptionResponse > GetSubscriptionWithHttpInfo (strin } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1619,7 +1637,7 @@ public ApiResponse< GetSubscriptionResponse > GetSubscriptionWithHttpInfo (strin return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse))); // Return statement + (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse),merchantConfig)); // Return statement } /// @@ -1704,7 +1722,7 @@ public async System.Threading.Tasks.Task> G } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo")) { try @@ -1718,12 +1736,14 @@ public async System.Threading.Tasks.Task> G } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSubscription,GetSubscriptionAsync,GetSubscriptionWithHttpInfo,GetSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1739,7 +1759,7 @@ public async System.Threading.Tasks.Task> G return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse))); // Return statement + (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse),merchantConfig)); // Return statement } /// /// Get a Subscription Code Get a Unique Subscription Code @@ -1809,7 +1829,7 @@ public ApiResponse< GetSubscriptionCodeResponse > GetSubscriptionCodeWithHttpInf } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetSubscriptionCode,GetSubscriptionCodeAsync,GetSubscriptionCodeWithHttpInfo,GetSubscriptionCodeAsyncWithHttpInfo")) { try @@ -1823,12 +1843,14 @@ public ApiResponse< GetSubscriptionCodeResponse > GetSubscriptionCodeWithHttpInf } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetSubscriptionCode,GetSubscriptionCodeAsync,GetSubscriptionCodeWithHttpInfo,GetSubscriptionCodeAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1844,7 +1866,7 @@ public ApiResponse< GetSubscriptionCodeResponse > GetSubscriptionCodeWithHttpInf return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse))); // Return statement + (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse),merchantConfig)); // Return statement } /// @@ -1916,7 +1938,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse))); // Return statement + (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse),merchantConfig)); // Return statement } /// /// Suspend a Subscription Suspend a Subscription @@ -2034,7 +2058,7 @@ public ApiResponse< SuspendSubscriptionResponse > SuspendSubscriptionWithHttpInf } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SuspendSubscription,SuspendSubscriptionAsync,SuspendSubscriptionWithHttpInfo,SuspendSubscriptionAsyncWithHttpInfo")) { try @@ -2048,12 +2072,14 @@ public ApiResponse< SuspendSubscriptionResponse > SuspendSubscriptionWithHttpInf } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SuspendSubscription,SuspendSubscriptionAsync,SuspendSubscriptionWithHttpInfo,SuspendSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2069,7 +2095,7 @@ public ApiResponse< SuspendSubscriptionResponse > SuspendSubscriptionWithHttpInf return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse))); // Return statement + (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse),merchantConfig)); // Return statement } /// @@ -2154,7 +2180,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse))); // Return statement + (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse),merchantConfig)); // Return statement } /// /// Update a Subscription Update a Subscription by Subscription Id @@ -2276,7 +2304,7 @@ public ApiResponse< UpdateSubscriptionResponse > UpdateSubscriptionWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateSubscription,UpdateSubscriptionAsync,UpdateSubscriptionWithHttpInfo,UpdateSubscriptionAsyncWithHttpInfo")) { try @@ -2290,13 +2318,15 @@ public ApiResponse< UpdateSubscriptionResponse > UpdateSubscriptionWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateSubscription,UpdateSubscriptionAsync,UpdateSubscriptionWithHttpInfo,UpdateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -2312,7 +2342,7 @@ public ApiResponse< UpdateSubscriptionResponse > UpdateSubscriptionWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse))); // Return statement + (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse),merchantConfig)); // Return statement } /// @@ -2401,7 +2431,7 @@ public async System.Threading.Tasks.Task } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UpdateSubscription,UpdateSubscriptionAsync,UpdateSubscriptionWithHttpInfo,UpdateSubscriptionAsyncWithHttpInfo")) { try @@ -2415,13 +2445,15 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UpdateSubscription,UpdateSubscriptionAsync,UpdateSubscriptionWithHttpInfo,UpdateSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -2437,7 +2469,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse))); // Return statement + (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsFollowOnsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsFollowOnsApi.cs index 89c52a97..5e837410 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsFollowOnsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsFollowOnsApi.cs @@ -344,7 +344,7 @@ public ApiResponse< CreateSubscriptionResponse > CreateFollowOnSubscriptionWithH } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateFollowOnSubscription,CreateFollowOnSubscriptionAsync,CreateFollowOnSubscriptionWithHttpInfo,CreateFollowOnSubscriptionAsyncWithHttpInfo")) { try @@ -358,13 +358,15 @@ public ApiResponse< CreateSubscriptionResponse > CreateFollowOnSubscriptionWithH } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateFollowOnSubscription,CreateFollowOnSubscriptionAsync,CreateFollowOnSubscriptionWithHttpInfo,CreateFollowOnSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -380,7 +382,7 @@ public ApiResponse< CreateSubscriptionResponse > CreateFollowOnSubscriptionWithH return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse))); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse),merchantConfig)); // Return statement } /// @@ -469,7 +471,7 @@ public async System.Threading.Tasks.Task } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateFollowOnSubscription,CreateFollowOnSubscriptionAsync,CreateFollowOnSubscriptionWithHttpInfo,CreateFollowOnSubscriptionAsyncWithHttpInfo")) { try @@ -483,13 +485,15 @@ public async System.Threading.Tasks.Task } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateFollowOnSubscription,CreateFollowOnSubscriptionAsync,CreateFollowOnSubscriptionWithHttpInfo,CreateFollowOnSubscriptionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -505,7 +509,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse))); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse),merchantConfig)); // Return statement } /// /// Get a Follow-On Subscription Get details of the Subscription being created based on the Request Id of an existing successful Transaction. @@ -588,7 +592,7 @@ public ApiResponse< GetSubscriptionResponse1 > GetFollowOnSubscriptionWithHttpIn } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFollowOnSubscription,GetFollowOnSubscriptionAsync,GetFollowOnSubscriptionWithHttpInfo,GetFollowOnSubscriptionAsyncWithHttpInfo")) { try @@ -602,12 +606,14 @@ public ApiResponse< GetSubscriptionResponse1 > GetFollowOnSubscriptionWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFollowOnSubscription,GetFollowOnSubscriptionAsync,GetFollowOnSubscriptionWithHttpInfo,GetFollowOnSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -623,7 +629,7 @@ public ApiResponse< GetSubscriptionResponse1 > GetFollowOnSubscriptionWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1))); // Return statement + (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1),merchantConfig)); // Return statement } /// @@ -708,7 +714,7 @@ public async System.Threading.Tasks.Task> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetFollowOnSubscription,GetFollowOnSubscriptionAsync,GetFollowOnSubscriptionWithHttpInfo,GetFollowOnSubscriptionAsyncWithHttpInfo")) { try @@ -722,12 +728,14 @@ public async System.Threading.Tasks.Task> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetFollowOnSubscription,GetFollowOnSubscriptionAsync,GetFollowOnSubscriptionWithHttpInfo,GetFollowOnSubscriptionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -743,7 +751,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1))); // Return statement + (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TaxesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TaxesApi.cs index 08af8631..32eeb290 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TaxesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TaxesApi.cs @@ -328,7 +328,7 @@ public ApiResponse< VasV2PaymentsPost201Response > CalculateTaxWithHttpInfo (Tax } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CalculateTax,CalculateTaxAsync,CalculateTaxWithHttpInfo,CalculateTaxAsyncWithHttpInfo")) { try @@ -342,13 +342,15 @@ public ApiResponse< VasV2PaymentsPost201Response > CalculateTaxWithHttpInfo (Tax } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CalculateTax,CalculateTaxAsync,CalculateTaxWithHttpInfo,CalculateTaxAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -364,7 +366,7 @@ public ApiResponse< VasV2PaymentsPost201Response > CalculateTaxWithHttpInfo (Tax return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response))); // Return statement + (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response),merchantConfig)); // Return statement } /// @@ -437,7 +439,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response))); // Return statement + (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response),merchantConfig)); // Return statement } /// /// Void Taxes Pass the Tax Request ID in the PATCH request to void the committed tax calculation. @@ -557,7 +561,7 @@ public ApiResponse< VasV2TaxVoid200Response > VoidTaxWithHttpInfo (VoidTaxReques } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidTax,VoidTaxAsync,VoidTaxWithHttpInfo,VoidTaxAsyncWithHttpInfo")) { try @@ -571,13 +575,15 @@ public ApiResponse< VasV2TaxVoid200Response > VoidTaxWithHttpInfo (VoidTaxReques } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidTax,VoidTaxAsync,VoidTaxWithHttpInfo,VoidTaxAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -593,7 +599,7 @@ public ApiResponse< VasV2TaxVoid200Response > VoidTaxWithHttpInfo (VoidTaxReques return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response))); // Return statement + (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response),merchantConfig)); // Return statement } /// @@ -679,7 +685,7 @@ public async System.Threading.Tasks.Task> V } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidTax,VoidTaxAsync,VoidTaxWithHttpInfo,VoidTaxAsyncWithHttpInfo")) { try @@ -693,13 +699,15 @@ public async System.Threading.Tasks.Task> V } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidTax,VoidTaxAsync,VoidTaxWithHttpInfo,VoidTaxAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Patch, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -715,7 +723,7 @@ public async System.Threading.Tasks.Task> V return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response))); // Return statement + (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenApi.cs index eb7199a2..78dc2d49 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenApi.cs @@ -375,7 +375,7 @@ public ApiResponse< InlineResponse200 > GetCardArtAssetWithHttpInfo (string inst } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCardArtAsset,GetCardArtAssetAsync,GetCardArtAssetWithHttpInfo,GetCardArtAssetAsyncWithHttpInfo")) { try @@ -389,12 +389,14 @@ public ApiResponse< InlineResponse200 > GetCardArtAssetWithHttpInfo (string inst } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCardArtAsset,GetCardArtAssetAsync,GetCardArtAssetWithHttpInfo,GetCardArtAssetAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -410,7 +412,7 @@ public ApiResponse< InlineResponse200 > GetCardArtAssetWithHttpInfo (string inst return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200))); // Return statement + (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200),merchantConfig)); // Return statement } /// @@ -518,7 +520,7 @@ public async System.Threading.Tasks.Task> GetCard } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetCardArtAsset,GetCardArtAssetAsync,GetCardArtAssetWithHttpInfo,GetCardArtAssetAsyncWithHttpInfo")) { try @@ -532,12 +534,14 @@ public async System.Threading.Tasks.Task> GetCard } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetCardArtAsset,GetCardArtAssetAsync,GetCardArtAssetWithHttpInfo,GetCardArtAssetAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -553,7 +557,7 @@ public async System.Threading.Tasks.Task> GetCard return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200))); // Return statement + (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200),merchantConfig)); // Return statement } /// /// Generate Payment Credentials for a TMS Token | | | | | - -- | - -- | - -- | |**Token**<br>A Token can represent your tokenized Customer, Payment Instrument or Instrument Identifier information.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Credentials**<br>Contains payment information such as the network token, generated cryptogram for Visa & MasterCard or dynamic CVV for Amex in a JSON Web Encryption (JWE) response.<br>Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument or Instrument Identifier. @@ -643,7 +647,7 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostTokenPaymentCredentials,PostTokenPaymentCredentialsAsync,PostTokenPaymentCredentialsWithHttpInfo,PostTokenPaymentCredentialsAsyncWithHttpInfo")) { try @@ -657,13 +661,15 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostTokenPaymentCredentials,PostTokenPaymentCredentialsAsync,PostTokenPaymentCredentialsWithHttpInfo,PostTokenPaymentCredentialsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -679,7 +685,7 @@ public ApiResponse< string > PostTokenPaymentCredentialsWithHttpInfo (string tok return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } /// @@ -771,7 +777,7 @@ public async System.Threading.Tasks.Task> PostTokenPaymentCr } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostTokenPaymentCredentials,PostTokenPaymentCredentialsAsync,PostTokenPaymentCredentialsWithHttpInfo,PostTokenPaymentCredentialsAsyncWithHttpInfo")) { try @@ -785,13 +791,15 @@ public async System.Threading.Tasks.Task> PostTokenPaymentCr } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostTokenPaymentCredentials,PostTokenPaymentCredentialsAsync,PostTokenPaymentCredentialsWithHttpInfo,PostTokenPaymentCredentialsAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -807,7 +815,7 @@ public async System.Threading.Tasks.Task> PostTokenPaymentCr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs index 5a3fe51f..f10c97d8 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs @@ -390,7 +390,7 @@ public ApiResponse DeleteTokenizedCardWithHttpInfo (string tokenizedCard } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteTokenizedCard,DeleteTokenizedCardAsync,DeleteTokenizedCardWithHttpInfo,DeleteTokenizedCardAsyncWithHttpInfo")) { try @@ -404,12 +404,14 @@ public ApiResponse DeleteTokenizedCardWithHttpInfo (string tokenizedCard } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteTokenizedCard,DeleteTokenizedCardAsync,DeleteTokenizedCardWithHttpInfo,DeleteTokenizedCardAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -511,7 +513,7 @@ public async System.Threading.Tasks.Task> DeleteTokenizedCar } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "DeleteTokenizedCard,DeleteTokenizedCardAsync,DeleteTokenizedCardWithHttpInfo,DeleteTokenizedCardAsyncWithHttpInfo")) { try @@ -525,12 +527,14 @@ public async System.Threading.Tasks.Task> DeleteTokenizedCar } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "DeleteTokenizedCard,DeleteTokenizedCardAsync,DeleteTokenizedCardWithHttpInfo,DeleteTokenizedCardAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -633,7 +637,7 @@ public ApiResponse< TokenizedcardRequest > GetTokenizedCardWithHttpInfo (string } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTokenizedCard,GetTokenizedCardAsync,GetTokenizedCardWithHttpInfo,GetTokenizedCardAsyncWithHttpInfo")) { try @@ -647,12 +651,14 @@ public ApiResponse< TokenizedcardRequest > GetTokenizedCardWithHttpInfo (string } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTokenizedCard,GetTokenizedCardAsync,GetTokenizedCardWithHttpInfo,GetTokenizedCardAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -668,7 +674,7 @@ public ApiResponse< TokenizedcardRequest > GetTokenizedCardWithHttpInfo (string return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest))); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest),merchantConfig)); // Return statement } /// @@ -756,7 +762,7 @@ public async System.Threading.Tasks.Task> GetT } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTokenizedCard,GetTokenizedCardAsync,GetTokenizedCardWithHttpInfo,GetTokenizedCardAsyncWithHttpInfo")) { try @@ -770,12 +776,14 @@ public async System.Threading.Tasks.Task> GetT } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTokenizedCard,GetTokenizedCardAsync,GetTokenizedCardWithHttpInfo,GetTokenizedCardAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -791,7 +799,7 @@ public async System.Threading.Tasks.Task> GetT return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest))); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest),merchantConfig)); // Return statement } /// /// Create a Tokenized Card | | | | | - -- | - -- | - -- | |**Tokenized cards**<br>A Tokenized card represents a network token. Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires. @@ -868,7 +876,7 @@ public ApiResponse< TokenizedcardRequest > PostTokenizedCardWithHttpInfo (Tokeni } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostTokenizedCard,PostTokenizedCardAsync,PostTokenizedCardWithHttpInfo,PostTokenizedCardAsyncWithHttpInfo")) { try @@ -882,13 +890,15 @@ public ApiResponse< TokenizedcardRequest > PostTokenizedCardWithHttpInfo (Tokeni } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostTokenizedCard,PostTokenizedCardAsync,PostTokenizedCardWithHttpInfo,PostTokenizedCardAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -904,7 +914,7 @@ public ApiResponse< TokenizedcardRequest > PostTokenizedCardWithHttpInfo (Tokeni return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest))); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest),merchantConfig)); // Return statement } /// @@ -983,7 +993,7 @@ public async System.Threading.Tasks.Task> Post } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostTokenizedCard,PostTokenizedCardAsync,PostTokenizedCardWithHttpInfo,PostTokenizedCardAsyncWithHttpInfo")) { try @@ -997,13 +1007,15 @@ public async System.Threading.Tasks.Task> Post } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostTokenizedCard,PostTokenizedCardAsync,PostTokenizedCardWithHttpInfo,PostTokenizedCardAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1019,7 +1031,7 @@ public async System.Threading.Tasks.Task> Post return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest))); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionBatchesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionBatchesApi.cs index 1b0fe2e1..a9971796 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionBatchesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionBatchesApi.cs @@ -442,7 +442,7 @@ public ApiResponse GetTransactionBatchDetailsWithHttpInfo (string id, Da } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionBatchDetails,GetTransactionBatchDetailsAsync,GetTransactionBatchDetailsWithHttpInfo,GetTransactionBatchDetailsAsyncWithHttpInfo")) { try @@ -456,12 +456,14 @@ public ApiResponse GetTransactionBatchDetailsWithHttpInfo (string id, Da } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionBatchDetails,GetTransactionBatchDetailsAsync,GetTransactionBatchDetailsWithHttpInfo,GetTransactionBatchDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -573,7 +575,7 @@ public async System.Threading.Tasks.Task> GetTransactionBatc } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionBatchDetails,GetTransactionBatchDetailsAsync,GetTransactionBatchDetailsWithHttpInfo,GetTransactionBatchDetailsAsyncWithHttpInfo")) { try @@ -587,12 +589,14 @@ public async System.Threading.Tasks.Task> GetTransactionBatc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionBatchDetails,GetTransactionBatchDetailsAsync,GetTransactionBatchDetailsWithHttpInfo,GetTransactionBatchDetailsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -689,7 +693,7 @@ public ApiResponse< PtsV1TransactionBatchesIdGet200Response > GetTransactionBatc } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionBatchId,GetTransactionBatchIdAsync,GetTransactionBatchIdWithHttpInfo,GetTransactionBatchIdAsyncWithHttpInfo")) { try @@ -703,12 +707,14 @@ public ApiResponse< PtsV1TransactionBatchesIdGet200Response > GetTransactionBatc } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionBatchId,GetTransactionBatchIdAsync,GetTransactionBatchIdWithHttpInfo,GetTransactionBatchIdAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -724,7 +730,7 @@ public ApiResponse< PtsV1TransactionBatchesIdGet200Response > GetTransactionBatc return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response))); // Return statement + (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response),merchantConfig)); // Return statement } /// @@ -806,7 +812,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response))); // Return statement + (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response),merchantConfig)); // Return statement } /// /// Get a List of Batch Files Provide the date and time search range to get a list of Batch Files ready for settlement @@ -934,7 +942,7 @@ public ApiResponse< PtsV1TransactionBatchesGet200Response > GetTransactionBatche } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionBatches,GetTransactionBatchesAsync,GetTransactionBatchesWithHttpInfo,GetTransactionBatchesAsyncWithHttpInfo")) { try @@ -948,12 +956,14 @@ public ApiResponse< PtsV1TransactionBatchesGet200Response > GetTransactionBatche } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionBatches,GetTransactionBatchesAsync,GetTransactionBatchesWithHttpInfo,GetTransactionBatchesAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -969,7 +979,7 @@ public ApiResponse< PtsV1TransactionBatchesGet200Response > GetTransactionBatche return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response))); // Return statement + (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response),merchantConfig)); // Return statement } /// @@ -1064,7 +1074,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response))); // Return statement + (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response),merchantConfig)); // Return statement } /// /// Upload a Batch File This endpoint enables the upload of a batch file containing transactions for processing. @@ -1175,7 +1187,7 @@ public ApiResponse UploadTransactionBatchWithHttpInfo (System.IO.Stream } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UploadTransactionBatch,UploadTransactionBatchAsync,UploadTransactionBatchWithHttpInfo,UploadTransactionBatchAsyncWithHttpInfo")) { try @@ -1189,12 +1201,14 @@ public ApiResponse UploadTransactionBatchWithHttpInfo (System.IO.Stream } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UploadTransactionBatch,UploadTransactionBatchAsync,UploadTransactionBatchWithHttpInfo,UploadTransactionBatchAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1289,7 +1303,7 @@ public async System.Threading.Tasks.Task> UploadTransactionB } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "UploadTransactionBatch,UploadTransactionBatchAsync,UploadTransactionBatchWithHttpInfo,UploadTransactionBatchAsyncWithHttpInfo")) { try @@ -1303,12 +1317,14 @@ public async System.Threading.Tasks.Task> UploadTransactionB } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "UploadTransactionBatch,UploadTransactionBatchAsync,UploadTransactionBatchWithHttpInfo,UploadTransactionBatchAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionDetailsApi.cs index 164b95fb..332fad6f 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionDetailsApi.cs @@ -291,7 +291,7 @@ public ApiResponse< TssV2TransactionsGet200Response > GetTransactionWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransaction,GetTransactionAsync,GetTransactionWithHttpInfo,GetTransactionAsyncWithHttpInfo")) { try @@ -305,12 +305,14 @@ public ApiResponse< TssV2TransactionsGet200Response > GetTransactionWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransaction,GetTransactionAsync,GetTransactionWithHttpInfo,GetTransactionAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -326,7 +328,7 @@ public ApiResponse< TssV2TransactionsGet200Response > GetTransactionWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response))); // Return statement + (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response),merchantConfig)); // Return statement } /// @@ -408,7 +410,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response))); // Return statement + (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransientTokenDataApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransientTokenDataApi.cs index 511a8aaf..148c9848 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransientTokenDataApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransientTokenDataApi.cs @@ -332,7 +332,7 @@ public ApiResponse< string > GetPaymentCredentialsForTransientTokenWithHttpInfo } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentCredentialsForTransientToken,GetPaymentCredentialsForTransientTokenAsync,GetPaymentCredentialsForTransientTokenWithHttpInfo,GetPaymentCredentialsForTransientTokenAsyncWithHttpInfo")) { try @@ -346,12 +346,14 @@ public ApiResponse< string > GetPaymentCredentialsForTransientTokenWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentCredentialsForTransientToken,GetPaymentCredentialsForTransientTokenAsync,GetPaymentCredentialsForTransientTokenWithHttpInfo,GetPaymentCredentialsForTransientTokenAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -367,7 +369,7 @@ public ApiResponse< string > GetPaymentCredentialsForTransientTokenWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } /// @@ -449,7 +451,7 @@ public async System.Threading.Tasks.Task> GetPaymentCredenti } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetPaymentCredentialsForTransientToken,GetPaymentCredentialsForTransientTokenAsync,GetPaymentCredentialsForTransientTokenWithHttpInfo,GetPaymentCredentialsForTransientTokenAsyncWithHttpInfo")) { try @@ -463,12 +465,14 @@ public async System.Threading.Tasks.Task> GetPaymentCredenti } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetPaymentCredentialsForTransientToken,GetPaymentCredentialsForTransientTokenAsync,GetPaymentCredentialsForTransientTokenWithHttpInfo,GetPaymentCredentialsForTransientTokenAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -484,7 +488,7 @@ public async System.Threading.Tasks.Task> GetPaymentCredenti return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } /// /// Get Transient Token Data Retrieve the data captured by Unified Checkout. This API is used to retrieve the detailed data represented by the Transient Token. This API will not return PCI payment data (PAN). Include the Request ID in the GET request to retrieve the transaction details. @@ -561,7 +565,7 @@ public ApiResponse GetTransactionForTransientTokenWithHttpInfo (string t } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionForTransientToken,GetTransactionForTransientTokenAsync,GetTransactionForTransientTokenWithHttpInfo,GetTransactionForTransientTokenAsyncWithHttpInfo")) { try @@ -575,12 +579,14 @@ public ApiResponse GetTransactionForTransientTokenWithHttpInfo (string t } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionForTransientToken,GetTransactionForTransientTokenAsync,GetTransactionForTransientTokenWithHttpInfo,GetTransactionForTransientTokenAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -676,7 +682,7 @@ public async System.Threading.Tasks.Task> GetTransactionForT } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetTransactionForTransientToken,GetTransactionForTransientTokenAsync,GetTransactionForTransientTokenWithHttpInfo,GetTransactionForTransientTokenAsyncWithHttpInfo")) { try @@ -690,12 +696,14 @@ public async System.Threading.Tasks.Task> GetTransactionForT } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetTransactionForTransientToken,GetTransactionForTransientTokenAsync,GetTransactionForTransientTokenWithHttpInfo,GetTransactionForTransientTokenAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UnifiedCheckoutCaptureContextApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UnifiedCheckoutCaptureContextApi.cs index 3d03f272..28fee0d2 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UnifiedCheckoutCaptureContextApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UnifiedCheckoutCaptureContextApi.cs @@ -282,7 +282,7 @@ public ApiResponse< string > GenerateUnifiedCheckoutCaptureContextWithHttpInfo ( } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateUnifiedCheckoutCaptureContext,GenerateUnifiedCheckoutCaptureContextAsync,GenerateUnifiedCheckoutCaptureContextWithHttpInfo,GenerateUnifiedCheckoutCaptureContextAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< string > GenerateUnifiedCheckoutCaptureContextWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateUnifiedCheckoutCaptureContext,GenerateUnifiedCheckoutCaptureContextAsync,GenerateUnifiedCheckoutCaptureContextWithHttpInfo,GenerateUnifiedCheckoutCaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< string > GenerateUnifiedCheckoutCaptureContextWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> GenerateUnifiedChe } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GenerateUnifiedCheckoutCaptureContext,GenerateUnifiedCheckoutCaptureContextAsync,GenerateUnifiedCheckoutCaptureContextWithHttpInfo,GenerateUnifiedCheckoutCaptureContextAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> GenerateUnifiedChe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GenerateUnifiedCheckoutCaptureContext,GenerateUnifiedCheckoutCaptureContextAsync,GenerateUnifiedCheckoutCaptureContextWithHttpInfo,GenerateUnifiedCheckoutCaptureContextAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateUnifiedChe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementApi.cs index 5899546f..a44c12c3 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementApi.cs @@ -318,7 +318,7 @@ public ApiResponse< UmsV1UsersGet200Response > GetUsersWithHttpInfo (string orga } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetUsers,GetUsersAsync,GetUsersWithHttpInfo,GetUsersAsyncWithHttpInfo")) { try @@ -332,12 +332,14 @@ public ApiResponse< UmsV1UsersGet200Response > GetUsersWithHttpInfo (string orga } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetUsers,GetUsersAsync,GetUsersWithHttpInfo,GetUsersAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -353,7 +355,7 @@ public ApiResponse< UmsV1UsersGet200Response > GetUsersWithHttpInfo (string orga return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response))); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response),merchantConfig)); // Return statement } /// @@ -450,7 +452,7 @@ public async System.Threading.Tasks.Task> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetUsers,GetUsersAsync,GetUsersWithHttpInfo,GetUsersAsyncWithHttpInfo")) { try @@ -464,12 +466,14 @@ public async System.Threading.Tasks.Task> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetUsers,GetUsersAsync,GetUsersWithHttpInfo,GetUsersAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -485,7 +489,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response))); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementSearchApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementSearchApi.cs index 1c332559..25d97166 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementSearchApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementSearchApi.cs @@ -282,7 +282,7 @@ public ApiResponse< UmsV1UsersGet200Response > SearchUsersWithHttpInfo (SearchRe } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SearchUsers,SearchUsersAsync,SearchUsersWithHttpInfo,SearchUsersAsyncWithHttpInfo")) { try @@ -296,13 +296,15 @@ public ApiResponse< UmsV1UsersGet200Response > SearchUsersWithHttpInfo (SearchRe } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SearchUsers,SearchUsersAsync,SearchUsersWithHttpInfo,SearchUsersAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -318,7 +320,7 @@ public ApiResponse< UmsV1UsersGet200Response > SearchUsersWithHttpInfo (SearchRe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response))); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response),merchantConfig)); // Return statement } /// @@ -391,7 +393,7 @@ public async System.Threading.Tasks.Task> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "SearchUsers,SearchUsersAsync,SearchUsersWithHttpInfo,SearchUsersAsyncWithHttpInfo")) { try @@ -405,13 +407,15 @@ public async System.Threading.Tasks.Task> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "SearchUsers,SearchUsersAsync,SearchUsersWithHttpInfo,SearchUsersAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -427,7 +431,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response))); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VerificationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VerificationApi.cs index 2826bc7a..08115381 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VerificationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VerificationApi.cs @@ -324,7 +324,7 @@ public ApiResponse< RiskV1ExportComplianceInquiriesPost201Response > ValidateExp } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "ValidateExportCompliance,ValidateExportComplianceAsync,ValidateExportComplianceWithHttpInfo,ValidateExportComplianceAsyncWithHttpInfo")) { try @@ -338,13 +338,15 @@ public ApiResponse< RiskV1ExportComplianceInquiriesPost201Response > ValidateExp } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "ValidateExportCompliance,ValidateExportComplianceAsync,ValidateExportComplianceWithHttpInfo,ValidateExportComplianceAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -360,7 +362,7 @@ public ApiResponse< RiskV1ExportComplianceInquiriesPost201Response > ValidateExp return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response))); // Return statement + (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response),merchantConfig)); // Return statement } /// @@ -433,7 +435,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response))); // Return statement + (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response),merchantConfig)); // Return statement } /// /// Verify customer address This call verifies that the customer address submitted is valid. @@ -540,7 +544,7 @@ public ApiResponse< RiskV1AddressVerificationsPost201Response > VerifyCustomerAd } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VerifyCustomerAddress,VerifyCustomerAddressAsync,VerifyCustomerAddressWithHttpInfo,VerifyCustomerAddressAsyncWithHttpInfo")) { try @@ -554,13 +558,15 @@ public ApiResponse< RiskV1AddressVerificationsPost201Response > VerifyCustomerAd } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VerifyCustomerAddress,VerifyCustomerAddressAsync,VerifyCustomerAddressWithHttpInfo,VerifyCustomerAddressAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -576,7 +582,7 @@ public ApiResponse< RiskV1AddressVerificationsPost201Response > VerifyCustomerAd return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response))); // Return statement + (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response),merchantConfig)); // Return statement } /// @@ -649,7 +655,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response))); // Return statement + (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VoidApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VoidApi.cs index a3a993ae..b0ac2b76 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VoidApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VoidApi.cs @@ -466,7 +466,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > MitVoidWithHttpInfo (Mit } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "MitVoid,MitVoidAsync,MitVoidWithHttpInfo,MitVoidAsyncWithHttpInfo")) { try @@ -480,13 +480,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > MitVoidWithHttpInfo (Mit } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "MitVoid,MitVoidAsync,MitVoidWithHttpInfo,MitVoidAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -502,7 +504,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > MitVoidWithHttpInfo (Mit return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// @@ -575,7 +577,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// /// Void a Capture Refund a capture API is only used, if you have requested Capture independenlty using [/pts/v2/payments/{id}/captures](https://developer.cybersource.com/api-reference-assets/index.html#payments_capture) API call. Include the capture ID in the POST request to cancel the capture. @@ -695,7 +699,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCaptureWithHttpInfo } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidCapture,VoidCaptureAsync,VoidCaptureWithHttpInfo,VoidCaptureAsyncWithHttpInfo")) { try @@ -709,13 +713,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCaptureWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidCapture,VoidCaptureAsync,VoidCaptureWithHttpInfo,VoidCaptureAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -731,7 +737,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCaptureWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// @@ -817,7 +823,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// /// Void a Credit Include the credit ID in the POST request to cancel the credit. @@ -937,7 +945,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCreditWithHttpInfo ( } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidCredit,VoidCreditAsync,VoidCreditWithHttpInfo,VoidCreditAsyncWithHttpInfo")) { try @@ -951,13 +959,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCreditWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidCredit,VoidCreditAsync,VoidCreditWithHttpInfo,VoidCreditAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -973,7 +983,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidCreditWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// @@ -1059,7 +1069,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// /// Void a Payment Void a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to cancel the payment. @@ -1179,7 +1191,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidPaymentWithHttpInfo } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidPayment,VoidPaymentAsync,VoidPaymentWithHttpInfo,VoidPaymentAsyncWithHttpInfo")) { try @@ -1193,13 +1205,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidPaymentWithHttpInfo } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidPayment,VoidPaymentAsync,VoidPaymentWithHttpInfo,VoidPaymentAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1215,7 +1229,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidPaymentWithHttpInfo return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// @@ -1301,7 +1315,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// /// Void a Refund Include the refund ID in the POST request to cancel the refund. @@ -1421,7 +1437,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidRefundWithHttpInfo ( } string inboundMLEStatus = "optional"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "VoidRefund,VoidRefundAsync,VoidRefundWithHttpInfo,VoidRefundAsyncWithHttpInfo")) { try @@ -1435,13 +1451,15 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidRefundWithHttpInfo ( } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "VoidRefund,VoidRefundAsync,VoidRefundWithHttpInfo,VoidRefundAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1457,7 +1475,7 @@ public ApiResponse< PtsV2PaymentsVoidsPost201Response > VoidRefundWithHttpInfo ( return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } /// @@ -1543,7 +1561,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response))); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/api.mustache b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/api.mustache index 6825ac83..5beba1a3 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/api.mustache +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/api.mustache @@ -344,7 +344,7 @@ namespace {{packageName}}.{{apiPackage}} {{/bodyParam}} string inboundMLEStatus = {{#vendorExtensions.x-devcenter-metaData.mleForRequest}}"{{vendorExtensions.x-devcenter-metaData.mleForRequest}}"{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}{{^vendorExtensions.x-devcenter-metaData.mleForRequest}}"false"{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}AsyncWithHttpInfo")) { try @@ -358,6 +358,8 @@ namespace {{packageName}}.{{apiPackage}} } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}AsyncWithHttpInfo"); + {{#bodyParam}} logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); {{/bodyParam}} @@ -396,7 +398,7 @@ namespace {{packageName}}.{{apiPackage}} // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -413,7 +415,7 @@ namespace {{packageName}}.{{apiPackage}} {{#returnType}} return new ApiResponse<{{{returnType}}}>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); // Return statement + ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}),merchantConfig)); // Return statement {{/returnType}} {{^returnType}} this.SetStatusCode(localVarStatusCode); @@ -550,7 +552,7 @@ namespace {{packageName}}.{{apiPackage}} {{/bodyParam}} string inboundMLEStatus = {{#vendorExtensions.x-devcenter-metaData.mleForRequest}}"{{vendorExtensions.x-devcenter-metaData.mleForRequest}}"{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}{{^vendorExtensions.x-devcenter-metaData.mleForRequest}}"false"{{/vendorExtensions.x-devcenter-metaData.mleForRequest}}; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}AsyncWithHttpInfo")) { try @@ -564,6 +566,8 @@ namespace {{packageName}}.{{apiPackage}} } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "{{operationId}},{{operationId}}Async,{{operationId}}WithHttpInfo,{{operationId}}AsyncWithHttpInfo"); + {{#bodyParam}} logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); {{/bodyParam}} @@ -602,7 +606,7 @@ namespace {{packageName}}.{{apiPackage}} // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -619,7 +623,7 @@ namespace {{packageName}}.{{apiPackage}} {{#returnType}} return new ApiResponse<{{{returnType}}}>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); // Return statement + ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}),merchantConfig)); // Return statement {{/returnType}} {{^returnType}} this.SetStatusCode(localVarStatusCode); From cc85fecbe716fba282e60bb94d898fad907640d8 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Tue, 23 Sep 2025 10:53:06 +0530 Subject: [PATCH 22/41] changed ApiClient functions to make use of isResponseMLEForAPi flag. Added decryption of Response MLE --- .../Client/ApiClient.cs | 54 ++++++++++++------- .../ApiClient.mustache | 54 ++++++++++++------- 2 files changed, 72 insertions(+), 36 deletions(-) diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs index 688afefc..73c3b5a5 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs @@ -135,7 +135,7 @@ private RestRequest PrepareRequest( string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { //1.set in the defaultHeaders of configuration @@ -179,11 +179,11 @@ private RestRequest PrepareRequest( if (postBody == null) { - CallAuthenticationHeaders(method.ToString(), path); + CallAuthenticationHeaders(method.ToString(), path,isResponseMLEForApi: isResponseMLEForApi); } else { - CallAuthenticationHeaders(method.ToString(), path, postBody.ToString()); + CallAuthenticationHeaders(method.ToString(), path, postBody.ToString(),isResponseMLEForApi: isResponseMLEForApi); } foreach (var param in Configuration.DefaultHeader) @@ -232,7 +232,7 @@ private RestRequest PrepareRequest( else if (contentType.Contains("multipart/form-data")) { request.AddBody(postBody, "multipart/form-data"); - request.AddHeader("Content-Type", contentType); //required to set in case of file params + request.AddHeader("Content-Type", contentType); //required to set in case of file params } else { @@ -253,7 +253,7 @@ private RestRequest PrepareRestRequest( string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { // Change to path(Request Target) to be sent to Authentication SDK // Include Query Params in the Request target @@ -297,11 +297,11 @@ private RestRequest PrepareRestRequest( //initiate the default authentication headers if (postBody == null) { - CallAuthenticationHeaders(method.ToString(), path); + CallAuthenticationHeaders(method.ToString(), path,isResponseMLEForApi: isResponseMLEForApi); } else { - CallAuthenticationHeaders(method.ToString(), path, postBody.ToString()); + CallAuthenticationHeaders(method.ToString(), path, postBody.ToString(),isResponseMLEForApi: isResponseMLEForApi); } foreach (var param in Configuration.DefaultHeader) @@ -337,7 +337,7 @@ private HttpWebRequest PrepareHttpWebRequest( string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { // Change to path(Request Target) to be sent to Authentication SDK // Include Query Params in the Request target @@ -383,11 +383,11 @@ private HttpWebRequest PrepareHttpWebRequest( //initiate the default authentication headers if (postBody == null) { - CallAuthenticationHeaders(method.ToString(), path); + CallAuthenticationHeaders(method.ToString(), path,isResponseMLEForApi: isResponseMLEForApi); } else { - CallAuthenticationHeaders(method.ToString(), path, postBody.ToString()); + CallAuthenticationHeaders(method.ToString(), path, postBody.ToString(),isResponseMLEForApi: isResponseMLEForApi); } foreach (var param in Configuration.DefaultHeader) @@ -426,7 +426,7 @@ public object CallApi( string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { //declared separately to handle both regular call and download file calls int httpResponseStatusCode; @@ -448,7 +448,7 @@ public object CallApi( //check if the Response is to be downloaded as a file, this value to be set by the calling API class var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); + pathParams, contentType,isResponseMLEForApi); // set timeout RestClientOptions clientOptions = new RestClientOptions(RestClient.Options.BaseUrl) @@ -541,13 +541,13 @@ public async System.Threading.Tasks.Task CallApiAsync( string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { LogUtility logUtility = new LogUtility(); var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); + pathParams, contentType,isResponseMLEForApi); // Logging Request Headers var headerPrintOutput = new StringBuilder(); @@ -667,7 +667,7 @@ public string ParameterToString(object obj) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - public object Deserialize(RestResponse response, Type type) // CHANGED + public object Deserialize(RestResponse response, Type type,MerchantConfig merchantConfig = null) // CHANGED { IList headers = response.Headers.ToList(); if (type == typeof(byte[])) // return byte array @@ -703,6 +703,24 @@ public object Deserialize(RestResponse response, Type type) // CHANGED return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); } + // check if Response MLE is enabled, then decrypt the response content and then deserialize + if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) + { + // Inside the if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) block + try + { + // Decrypt the MLE encrypted response payload using the merchant configuration + var decryptedContent = MLEUtility.DecryptMleResponsePayload(merchantConfig, response.Content); + response.Content = decryptedContent; + } + catch (Exception e) + { + logger.Error($"MLE Encrypted Response Decryption Error Occurred. Error: {e.Message}"); + throw new ApiException(500, e.Message); + + } + } + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type { return ConvertType(response.Content, type); @@ -889,12 +907,12 @@ public static string SanitizeFilename(string filename) /// GET/POST/PUT/PATCH/DELETE /// Resource Path /// Request Payload - public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null) + public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null,bool isResponseMLEForApi = false) { requestTarget = Uri.EscapeUriString(requestTarget); var merchantConfig = Configuration.MerchantConfigDictionaryObj != null - ? new MerchantConfig(Configuration.MerchantConfigDictionaryObj) + ? new MerchantConfig(Configuration.MerchantConfigDictionaryObj,Configuration.MapToControlMLEonAPI,Configuration.ResponseMlePrivateKey) : new MerchantConfig(); merchantConfig.RequestType = requestType; @@ -909,7 +927,7 @@ public void CallAuthenticationHeaders(string requestType, string requestTarget, if (merchantConfig.IsJwtTokenAuthType) { //generate token and set JWT token headers - var jwtToken = authorize.GetToken(); + var jwtToken = authorize.GetToken(isResponseMLEForApi); authenticationHeaders.Add("Authorization", jwtToken.BearerToken); } else if (merchantConfig.IsHttpSignAuthType) diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache index f267d137..9105bdbd 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache @@ -145,7 +145,7 @@ namespace {{packageName}}.Client string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { //1.set in the defaultHeaders of configuration @@ -193,11 +193,11 @@ namespace {{packageName}}.Client if (postBody == null) { - CallAuthenticationHeaders(method.ToString(), path); + CallAuthenticationHeaders(method.ToString(), path,isResponseMLEForApi: isResponseMLEForApi); } else { - CallAuthenticationHeaders(method.ToString(), path, postBody.ToString()); + CallAuthenticationHeaders(method.ToString(), path, postBody.ToString(),isResponseMLEForApi: isResponseMLEForApi); } foreach (var param in Configuration.DefaultHeader) @@ -263,7 +263,7 @@ namespace {{packageName}}.Client else if (contentType.Contains("multipart/form-data")) { request.AddBody(postBody, "multipart/form-data"); - request.AddHeader("Content-Type", contentType); //required to set in case of file params + request.AddHeader("Content-Type", contentType); //required to set in case of file params } else { @@ -295,7 +295,7 @@ namespace {{packageName}}.Client string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { // Change to path(Request Target) to be sent to Authentication SDK // Include Query Params in the Request target @@ -339,11 +339,11 @@ namespace {{packageName}}.Client //initiate the default authentication headers if (postBody == null) { - CallAuthenticationHeaders(method.ToString(), path); + CallAuthenticationHeaders(method.ToString(), path,isResponseMLEForApi: isResponseMLEForApi); } else { - CallAuthenticationHeaders(method.ToString(), path, postBody.ToString()); + CallAuthenticationHeaders(method.ToString(), path, postBody.ToString(),isResponseMLEForApi: isResponseMLEForApi); } foreach (var param in Configuration.DefaultHeader) @@ -379,7 +379,7 @@ namespace {{packageName}}.Client string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { // Change to path(Request Target) to be sent to Authentication SDK // Include Query Params in the Request target @@ -425,11 +425,11 @@ namespace {{packageName}}.Client //initiate the default authentication headers if (postBody == null) { - CallAuthenticationHeaders(method.ToString(), path); + CallAuthenticationHeaders(method.ToString(), path,isResponseMLEForApi: isResponseMLEForApi); } else { - CallAuthenticationHeaders(method.ToString(), path, postBody.ToString()); + CallAuthenticationHeaders(method.ToString(), path, postBody.ToString(),isResponseMLEForApi: isResponseMLEForApi); } foreach (var param in Configuration.DefaultHeader) @@ -468,7 +468,7 @@ namespace {{packageName}}.Client string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { //declared separately to handle both regular call and download file calls int httpResponseStatusCode; @@ -490,7 +490,7 @@ namespace {{packageName}}.Client //check if the Response is to be downloaded as a file, this value to be set by the calling API class var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); + pathParams, contentType,isResponseMLEForApi); // set timeout RestClientOptions clientOptions = new RestClientOptions(RestClient.Options.BaseUrl) @@ -595,13 +595,13 @@ namespace {{packageName}}.Client string path, Method method, Dictionary queryParams, object postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, Dictionary pathParams, - string contentType) + string contentType, bool isResponseMLEForApi = false) { LogUtility logUtility = new LogUtility(); var request = PrepareRequest( path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); + pathParams, contentType,isResponseMLEForApi); // Logging Request Headers var headerPrintOutput = new StringBuilder(); @@ -721,7 +721,7 @@ namespace {{packageName}}.Client /// The HTTP response. /// Object type. /// Object representation of the JSON string. - public object Deserialize(RestResponse response, Type type) // CHANGED + public object Deserialize(RestResponse response, Type type,MerchantConfig merchantConfig = null) // CHANGED { {{^netStandard}}IList{{/netStandard}}{{#netStandard}}IHttpHeaders{{/netStandard}} headers = response.Headers.ToList(); if (type == typeof(byte[])) // return byte array @@ -757,6 +757,24 @@ namespace {{packageName}}.Client return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); } + // check if Response MLE is enabled, then decrypt the response content and then deserialize + if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) + { + // Inside the if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) block + try + { + // Decrypt the MLE encrypted response payload using the merchant configuration + var decryptedContent = MLEUtility.DecryptMleResponsePayload(merchantConfig, response.Content); + response.Content = decryptedContent; + } + catch (Exception e) + { + logger.Error($"MLE Encrypted Response Decryption Error Occurred. Error: {e.Message}"); + throw new ApiException(500, e.Message); + + } + } + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type { return ConvertType(response.Content, type); @@ -960,12 +978,12 @@ namespace {{packageName}}.Client /// GET/POST/PUT/PATCH/DELETE /// Resource Path /// Request Payload - public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null) + public void CallAuthenticationHeaders(string requestType, string requestTarget, string requestJsonData = null,bool isResponseMLEForApi = false) { requestTarget = Uri.EscapeUriString(requestTarget); var merchantConfig = Configuration.MerchantConfigDictionaryObj != null - ? new MerchantConfig(Configuration.MerchantConfigDictionaryObj) + ? new MerchantConfig(Configuration.MerchantConfigDictionaryObj,Configuration.MapToControlMLEonAPI,Configuration.ResponseMlePrivateKey) : new MerchantConfig(); merchantConfig.RequestType = requestType; @@ -980,7 +998,7 @@ namespace {{packageName}}.Client if (merchantConfig.IsJwtTokenAuthType) { //generate token and set JWT token headers - var jwtToken = authorize.GetToken(); + var jwtToken = authorize.GetToken(isResponseMLEForApi); authenticationHeaders.Add("Authorization", jwtToken.BearerToken); } else if (merchantConfig.IsHttpSignAuthType) From 030cb008300963473ac2c6eaf446ef74bfa4654a Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Tue, 23 Sep 2025 10:55:00 +0530 Subject: [PATCH 23/41] added new param ResponseMlePrivateKey, changed mapToControlMLEonAPI dictionary type --- .../Client/Configuration.cs | 9 +++++++-- .../cybersource-csharp-template/Configuration.mustache | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/Configuration.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/Configuration.cs index bb973fcf..a874d9ef 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/Configuration.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/Configuration.cs @@ -15,6 +15,7 @@ using System.Linq; using System.Text; using System.Net; +using System.Security.Cryptography; namespace CyberSource.Client { @@ -51,7 +52,8 @@ public Configuration(ApiClient apiClient = null, int timeout = 100000, string userAgent = "Swagger-Codegen/1.0.0/csharp", IReadOnlyDictionary merchConfigDictObj = null, - Dictionary mapToControlMLEonAPI = null + Dictionary mapToControlMLEonAPI = null, + AsymmetricAlgorithm responseMlePrivateKey = null ) { SetApiClientUsingDefault(apiClient); @@ -102,6 +104,7 @@ public Configuration(ApiClient apiClient = null, Timeout = timeout; MerchantConfigDictionaryObj = merchConfigDictObj; MapToControlMLEonAPI = mapToControlMLEonAPI; + ResponseMlePrivateKey = responseMlePrivateKey; } private string GetClientId() @@ -200,7 +203,9 @@ public void SetApiClientUsingDefault (ApiClient apiClient = null) /// /// Gets or sets the MapToControlMLEonAPI /// - public Dictionary MapToControlMLEonAPI { get; set; } = new Dictionary(); + public Dictionary MapToControlMLEonAPI { get; set; } = new Dictionary(); + + public AsymmetricAlgorithm ResponseMlePrivateKey { get; set; } = null; /// /// Add default header. diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/Configuration.mustache b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/Configuration.mustache index 9642e8f5..8185f849 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/Configuration.mustache +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/Configuration.mustache @@ -6,6 +6,7 @@ using System.IO; using System.Linq; using System.Text; using System.Net; +using System.Security.Cryptography; namespace {{packageName}}.Client { @@ -42,7 +43,8 @@ namespace {{packageName}}.Client int timeout = 100000, string userAgent = "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{packageVersion}}/csharp{{/httpUserAgent}}", IReadOnlyDictionary merchConfigDictObj = null, - Dictionary mapToControlMLEonAPI = null + Dictionary mapToControlMLEonAPI = null, + AsymmetricAlgorithm responseMlePrivateKey = null ) { SetApiClientUsingDefault(apiClient); @@ -93,6 +95,7 @@ namespace {{packageName}}.Client Timeout = {{#netStandard}}TimeSpan.FromMilliseconds({{/netStandard}}timeout{{#netStandard}}){{/netStandard}}; MerchantConfigDictionaryObj = merchConfigDictObj; MapToControlMLEonAPI = mapToControlMLEonAPI; + ResponseMlePrivateKey = responseMlePrivateKey; } private string GetClientId() @@ -193,7 +196,9 @@ namespace {{packageName}}.Client /// /// Gets or sets the MapToControlMLEonAPI /// - public Dictionary MapToControlMLEonAPI { get; set; } = new Dictionary(); + public Dictionary MapToControlMLEonAPI { get; set; } = new Dictionary(); + + public AsymmetricAlgorithm ResponseMlePrivateKey { get; set; } = null; /// /// Add default header. From 503da2606336285ef9168fa2276f2e33a0b2abc7 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Tue, 23 Sep 2025 10:56:12 +0530 Subject: [PATCH 24/41] minor fix --- .../AuthenticationSdk/core/MerchantConfig.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index 5b3e50be..0fcd594c 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -6,6 +6,7 @@ using System.Configuration; using System.IO; using System.Linq; +using System.Security.Cryptography; namespace AuthenticationSdk.core { @@ -18,7 +19,7 @@ namespace AuthenticationSdk.core *============================================================================================*/ public class MerchantConfig { - public MerchantConfig(IReadOnlyDictionary merchantConfigDictionary = null, Dictionary mapToControlMLEonAPI = null, System.Security.Cryptography.AsymmetricAlgorithm responseMlePrivateKey = null) + public MerchantConfig(IReadOnlyDictionary merchantConfigDictionary = null, Dictionary mapToControlMLEonAPI = null, AsymmetricAlgorithm responseMlePrivateKey = null) { var _propertiesSetUsing = string.Empty; @@ -274,7 +275,7 @@ public Dictionary MapToControlMLEonAPI /// AsymmetricAlgorithm instance used for Response MLE decryption by the SDK. /// Optional — either provide this object directly or specify the private key file path via configuration. /// - public System.Security.Cryptography.AsymmetricAlgorithm ResponseMlePrivateKey { get; set; } + public AsymmetricAlgorithm ResponseMlePrivateKey { get; set; } #endregion From 040a2f0ecb1551aaedc0ee58e951548c2333f1d4 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Tue, 23 Sep 2025 13:46:53 +0530 Subject: [PATCH 25/41] PKCS1 encrypted keys are supported, removed exception --- .../AuthenticationSdk/AuthenticationSdk/util/Utility.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs index 0b3648d1..f9a292b4 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs @@ -200,11 +200,6 @@ private static RSA HandlePkcs1Key(byte[] keyBytes, string password) { try { - if (!string.IsNullOrEmpty(password)) - { - throw new NotSupportedException("Encrypted PKCS#1 keys are not directly supported. Use PKCS#8 format for encrypted keys."); - } - // Parse PKCS#1 RSA private key var rsaPrivateKey = RsaPrivateKeyStructure.GetInstance(keyBytes); var rsaParams = new RsaPrivateCrtKeyParameters( From 41774037332f00cb4cf377571327f87081b35598 Mon Sep 17 00:00:00 2001 From: Aastvik Goel Date: Tue, 23 Sep 2025 14:43:41 +0530 Subject: [PATCH 26/41] updated error handling for wrong PrivateKey use --- .../AuthenticationSdk/util/MLEUtility.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index c8942f00..38323f01 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -244,11 +244,23 @@ public static string DecryptMleResponsePayload(MerchantConfig merchantConfig, st } catch (Jose.JoseException e) { - throw new Exception("MLE Response decryption JoseException: " + e.Message); + string errorMessage = $"MLE Response decryption failed (JoseException): {e.Message}. " + + $"Possible reason: The provided RSA private key does not match the public key used to encrypt the message."; + logger.Error(errorMessage, e); + throw new Exception(errorMessage, e); + } + catch (CryptographicException e) + { + string errorMessage = $"MLE Response decryption failed (CryptographicException): {e.Message}. " + + "This may happen if the private key is incorrect or corrupted."; + logger.Error(errorMessage, e); + throw new Exception(errorMessage, e); } catch (Exception e) { - throw new Exception("MLE Response token Exception: " + e.Message); + string errorMessage = $"MLE Response decryption failed: {e.Message}"; + logger.Error(errorMessage, e); + throw new Exception(errorMessage, e); } } } From 9f2e255f599fe8dbf584d2e89311592fc0ee3e11 Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Wed, 24 Sep 2025 14:08:55 +0530 Subject: [PATCH 27/41] Added responseMlePrivateKey parameter to MerchantConfig initialization --- .../cybersource-rest-client-netstandard/Client/ApiClient.cs | 4 ++-- .../generator/cybersource-csharp-template/ApiClient.mustache | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs index 0f42b6cb..0432852a 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs @@ -355,7 +355,7 @@ public object CallApi( path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams, contentType,isResponseMLEForApi); - MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI, responseMlePrivateKey: Configuration.ResponseMlePrivateKey); var newRestClientOptions = GetRestClientOptions(merchantConfig, Configuration.UserAgent, TimeSpan.FromMilliseconds(Configuration.Timeout)); @@ -517,7 +517,7 @@ public async System.Threading.Tasks.Task CallApiAsync( logger.Debug($"HTTP Request Headers :\n{logUtility.MaskSensitiveData(headerPrintOutput.ToString())}"); - MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI, responseMlePrivateKey: Configuration.ResponseMlePrivateKey); var newRestClientOptions = GetRestClientOptions(merchantConfig, Configuration.UserAgent, TimeSpan.FromMilliseconds(Configuration.Timeout)); diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache index d549681c..5f5b2e12 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache @@ -397,7 +397,7 @@ namespace {{packageName}}.Client path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams, contentType,isResponseMLEForApi); - MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI, responseMlePrivateKey: Configuration.ResponseMlePrivateKey); var newRestClientOptions = GetRestClientOptions(merchantConfig, Configuration.UserAgent, TimeSpan.FromMilliseconds(Configuration.Timeout)); @@ -571,7 +571,7 @@ namespace {{packageName}}.Client logger.Debug($"HTTP Request Headers :\n{logUtility.MaskSensitiveData(headerPrintOutput.ToString())}"); - MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(merchantConfigDictionary: Configuration.MerchantConfigDictionaryObj, mapToControlMLEonAPI: Configuration.MapToControlMLEonAPI, responseMlePrivateKey: Configuration.ResponseMlePrivateKey); var newRestClientOptions = GetRestClientOptions(merchantConfig, Configuration.UserAgent, TimeSpan.FromMilliseconds(Configuration.Timeout)); From 0ce540925d53be1298b363f94a52b8c5aa680fe3 Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Thu, 25 Sep 2025 11:42:37 +0530 Subject: [PATCH 28/41] removed isResponseMLEForApi from JwtToken file, handled it in JwtTokenGenerator instead --- .../AuthenticationSdk/authentication/jwt/JwtToken.cs | 5 +---- .../authentication/jwt/JwtTokenGenerator.cs | 8 +++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtToken.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtToken.cs index 0bdb30a3..b9ea5ff9 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtToken.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtToken.cs @@ -8,7 +8,7 @@ namespace AuthenticationSdk.authentication.jwt { public class JwtToken : Token { - public JwtToken(MerchantConfig merchantConfig, bool isResponseMLEForApi) + public JwtToken(MerchantConfig merchantConfig) { RequestJsonData = merchantConfig.RequestJsonData; HostName = merchantConfig.HostName; @@ -23,7 +23,6 @@ public JwtToken(MerchantConfig merchantConfig, bool isResponseMLEForApi) KeyPass = merchantConfig.KeyPass; X509Certificate2Collection certs = Cache.FetchCachedCertificate(P12FilePath, KeyPass); Certificate = Cache.GetCertBasedOnKeyAlias(certs, merchantConfig.KeyAlias); - IsResponseMLEForApi = isResponseMLEForApi; } public string BearerToken { get; set; } @@ -38,8 +37,6 @@ public JwtToken(MerchantConfig merchantConfig, bool isResponseMLEForApi) public string KeyPass { get; } - public bool IsResponseMLEForApi { get; set; } - public X509Certificate2 Certificate { get; } } } \ No newline at end of file diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs index 310b93c2..f63bc26e 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs @@ -11,11 +11,13 @@ public class JwtTokenGenerator : ITokenGenerator { private readonly MerchantConfig _merchantConfig; private readonly JwtToken _jwtToken; + private readonly bool _isResponseMLEForApi; public JwtTokenGenerator(MerchantConfig merchantConfig,bool isResponseMLEForApi) { + _isResponseMLEForApi = isResponseMLEForApi; _merchantConfig = merchantConfig; - _jwtToken = new JwtToken(_merchantConfig,isResponseMLEForApi); + _jwtToken = new JwtToken(_merchantConfig); } public Token GetToken() @@ -55,7 +57,7 @@ private string SetToken() private string TokenForCategory1() { var jwtBody = ""; - if (_jwtToken.IsResponseMLEForApi) + if (_isResponseMLEForApi) { jwtBody = $"{{ \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\", \"v-c-response-mle-kid\":\"{_merchantConfig.ResponseMleKID}\" }}"; } @@ -90,7 +92,7 @@ private string TokenForCategory2() { var digest = GenerateDigest(_jwtToken.RequestJsonData); var jwtBody = ""; - if (_jwtToken.IsResponseMLEForApi) + if (_isResponseMLEForApi) { jwtBody = $"{{\n \"digest\":\"{digest}\", \"digestAlgorithm\":\"SHA-256\", \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\", \"v-c-response-mle-kid\":\"{_merchantConfig.ResponseMleKID}\"}}"; } From 1d39df507d828170795e2f12b05d078692806af8 Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Thu, 25 Sep 2025 15:00:04 +0530 Subject: [PATCH 29/41] replaced string with SecureString for password field --- .../AuthenticationSdk/core/MerchantConfig.cs | 19 +++- .../AuthenticationSdk/util/Cache.cs | 25 ++++-- .../AuthenticationSdk/util/Utility.cs | 90 +++++++++++++++---- 3 files changed, 107 insertions(+), 27 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index 0fcd594c..eadba437 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -6,6 +6,7 @@ using System.Configuration; using System.IO; using System.Linq; +using System.Security; using System.Security.Cryptography; namespace AuthenticationSdk.core @@ -269,7 +270,7 @@ public Dictionary MapToControlMLEonAPI /// Password for the private key file used in Response MLE decryption by the SDK. /// Required for .p12 files or encrypted private keys. /// - public string ResponseMlePrivateKeyFilePassword { get; set; } + public SecureString ResponseMlePrivateKeyFilePassword { get; set; } /// /// AsymmetricAlgorithm instance used for Response MLE decryption by the SDK. @@ -417,7 +418,7 @@ private void SetValuesFromAppConfig(NameValueCollection merchantConfigSection, D if (merchantConfigSection["responseMlePrivateKeyFilePassword"] != null && !string.IsNullOrEmpty(merchantConfigSection["responseMlePrivateKeyFilePassword"])) { - ResponseMlePrivateKeyFilePassword = merchantConfigSection["responseMlePrivateKeyFilePassword"]; + ResponseMlePrivateKeyFilePassword = ConvertToSecureString(merchantConfigSection["responseMlePrivateKeyFilePassword"]); } } @@ -714,7 +715,7 @@ private void SetValuesUsingDictObj(IReadOnlyDictionary merchantC if (merchantConfigDictionary.ContainsKey("responseMlePrivateKeyFilePassword") && !string.IsNullOrEmpty(merchantConfigDictionary["responseMlePrivateKeyFilePassword"])) { - ResponseMlePrivateKeyFilePassword = merchantConfigDictionary["responseMlePrivateKeyFilePassword"]; + ResponseMlePrivateKeyFilePassword = ConvertToSecureString(merchantConfigDictionary["responseMlePrivateKeyFilePassword"]); } } } @@ -1059,5 +1060,17 @@ public bool CheckKeyFile() return false; } } + private SecureString ConvertToSecureString(string password) + { + if (string.IsNullOrEmpty(password)) + return null; + var securePassword = new SecureString(); + foreach (char c in password) + { + securePassword.AppendChar(c); + } + securePassword.MakeReadOnly(); + return securePassword; + } } } \ No newline at end of file diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs index 422d538d..5f8d522b 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs @@ -7,9 +7,9 @@ using Org.BouncyCastle.Security; using System; using System.Collections.Generic; -using System.Configuration; using System.IO; using System.Runtime.Caching; +using System.Security; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Text.RegularExpressions; @@ -194,15 +194,15 @@ private static void SetupCache(MerchantConfig merchantConfig, string cacheKey, s { string fileExtension = Path.GetExtension(certificateFilePath)?.TrimStart('.').ToLowerInvariant(); AsymmetricAlgorithm mlePrivateKey = null; - string password = merchantConfig.ResponseMlePrivateKeyFilePassword; + SecureString password = merchantConfig.ResponseMlePrivateKeyFilePassword; // Case 1 - PKCS#12 formats (.p12, .pfx) - if (fileExtension == "p12" || fileExtension == "pfx") + if (fileExtension.Equals("p12") || fileExtension.Equals("pfx")) { mlePrivateKey = Utility.ReadPrivateKeyFromP12(certificateFilePath, password); } // Case 2 - PEM-based formats (.pem, .key, .p8) - else if (fileExtension == "pem" || fileExtension == "key" || fileExtension == "p8") + else if (fileExtension.Equals("pem") || fileExtension.Equals("key") || fileExtension.Equals("p8")) { mlePrivateKey = (AsymmetricAlgorithm) Utility.ExtractPrivateKeyFromFile(certificateFilePath, password); } @@ -311,10 +311,21 @@ public static AsymmetricAlgorithm GetMleResponsePrivateKeyFromFilePath(MerchantC } var cachedResponseMlePrivateKeyInfo = (PrivateKeyInfo)cache.Get(cacheKey); - RSA privateKey = (RSA)cachedResponseMlePrivateKeyInfo?.PrivateKey; - // Assuming CertInfo is extended to include MLEPrivateKey for response - return cachedResponseMlePrivateKeyInfo?.PrivateKey; + try + { + if (cachedResponseMlePrivateKeyInfo == null || cachedResponseMlePrivateKeyInfo.PrivateKey == null) + { + throw new Exception($"{Constants.ErrorPrefix} MLE response private key could not be retrieved from cache."); + } + RSA privateKey = (RSA)cachedResponseMlePrivateKeyInfo.PrivateKey; + return cachedResponseMlePrivateKeyInfo.PrivateKey; + } + catch (Exception ex) + { + logger.Error($"Error retrieving MLE response private key: {ex.Message}"); + throw new Exception($"{Constants.ErrorPrefix} Failed to retrieve MLE response private key from cache.", ex); + } } } } diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs index f9a292b4..78edb43e 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Security; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Text; @@ -30,12 +31,12 @@ public static bool IsValidBooleanString(string value) /// Reads a private key from a PKCS#12 (.p12 or .pfx) file. /// /// Path to the PKCS#12 file. - /// Password to unlock the file. + /// Password to unlock the file as SecureString. /// The RSA or ECDsa private key. /// If the file doesn't exist. /// If no private key is found. /// If the file is invalid or the password is wrong. - public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, string password = "") + public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, SecureString password = null) { if (string.IsNullOrWhiteSpace(p12FilePath)) throw new ArgumentException("File path cannot be null or empty", nameof(p12FilePath)); @@ -45,10 +46,12 @@ public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, stri try { + // Convert SecureString to string for X509Certificate2 + string pwd = password == null ? string.Empty : new System.Net.NetworkCredential(string.Empty, password).Password; // Load the certificate (including private key) from the P12 file var cert = new X509Certificate2( p12FilePath, - password, + pwd, X509KeyStorageFlags.Exportable | X509KeyStorageFlags.MachineKeySet ); @@ -78,9 +81,9 @@ public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, stri /// Extracts private key supporting PKCS#1 and PKCS#8, encrypted and unencrypted /// /// PEM content as string - /// Password for encrypted keys (optional) + /// Password for encrypted keys (optional, SecureString) /// RSA private key object - public static RSA ExtractPrivateKey(string pemContent, string password = null) + public static RSA ExtractPrivateKey(string pemContent, SecureString password = null) { try { @@ -101,7 +104,10 @@ public static RSA ExtractPrivateKey(string pemContent, string password = null) /// /// Extracts private key from file /// - public static RSA ExtractPrivateKeyFromFile(string filePath, string password = null) + /// Path to PEM file + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + public static RSA ExtractPrivateKeyFromFile(string filePath, SecureString password = null) { if (!File.Exists(filePath)) throw new FileNotFoundException($"Private key file not found: {filePath}"); @@ -113,7 +119,10 @@ public static RSA ExtractPrivateKeyFromFile(string filePath, string password = n /// /// Extract using PemReader (handles standard PEM formats) /// - private static AsymmetricKeyParameter ExtractWithPemReader(string pemContent, string password) + /// PEM content as string + /// Password for encrypted keys (optional, SecureString) + /// BouncyCastle AsymmetricKeyParameter + private static AsymmetricKeyParameter ExtractWithPemReader(string pemContent, SecureString password) { try { @@ -142,7 +151,10 @@ private static AsymmetricKeyParameter ExtractWithPemReader(string pemContent, st /// /// Manual parsing for different key formats /// - private static RSA ExtractWithManualParsing(string pemContent, string password) + /// PEM content as string + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + private static RSA ExtractWithManualParsing(string pemContent, SecureString password) { // Remove PEM headers and decode base64 var base64Content = ExtractBase64FromPem(pemContent); @@ -166,11 +178,14 @@ private static RSA ExtractWithManualParsing(string pemContent, string password) /// /// Handle PKCS#8 format keys (encrypted and unencrypted) /// - private static RSA HandlePkcs8Key(byte[] keyBytes, string password) + /// Key bytes + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + private static RSA HandlePkcs8Key(byte[] keyBytes, SecureString password) { try { - if (string.IsNullOrEmpty(password)) + if (password == null || password.Length == 0) { // Unencrypted PKCS#8 var privateKeyInfo = PrivateKeyInfo.GetInstance(keyBytes); @@ -180,9 +195,11 @@ private static RSA HandlePkcs8Key(byte[] keyBytes, string password) else { // Encrypted PKCS#8 + char[] pwdChars = new System.Net.NetworkCredential(string.Empty, password).Password.ToCharArray(); var encryptedPrivateKeyInfo = EncryptedPrivateKeyInfo.GetInstance(keyBytes); var privateKeyInfo = PrivateKeyInfoFactory.CreatePrivateKeyInfo( - password.ToCharArray(), encryptedPrivateKeyInfo); + pwdChars, encryptedPrivateKeyInfo); + Array.Clear(pwdChars, 0, pwdChars.Length); // Clear password from memory var privateKey = PrivateKeyFactory.CreateKey(privateKeyInfo); return ConvertToRSA(privateKey); } @@ -196,7 +213,10 @@ private static RSA HandlePkcs8Key(byte[] keyBytes, string password) /// /// Handle PKCS#1 format keys /// - private static RSA HandlePkcs1Key(byte[] keyBytes, string password) + /// Key bytes + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + private static RSA HandlePkcs1Key(byte[] keyBytes, SecureString password) { try { @@ -223,6 +243,8 @@ private static RSA HandlePkcs1Key(byte[] keyBytes, string password) /// /// Convert Bouncy Castle RSA parameters to .NET RSA object /// + /// BouncyCastle AsymmetricKeyParameter + /// .NET RSA object private static RSA ConvertToRSA(AsymmetricKeyParameter privateKey) { if (!(privateKey is RsaPrivateCrtKeyParameters rsaParams)) @@ -250,6 +272,8 @@ private static RSA ConvertToRSA(AsymmetricKeyParameter privateKey) /// /// Extract base64 content from PEM format /// + /// PEM content as string + /// Base64 string private static string ExtractBase64FromPem(string pemContent) { var lines = pemContent.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); @@ -267,6 +291,7 @@ private static string ExtractBase64FromPem(string pemContent) { break; } + // Skip encryption headers if (inKey && !line.StartsWith("Proc-Type:") && !line.StartsWith("DEK-Info:")) { base64Lines.Add(line.Trim()); @@ -279,6 +304,8 @@ private static string ExtractBase64FromPem(string pemContent) /// /// Check if PEM content is PKCS#8 format /// + /// PEM content as string + /// True if PKCS#8 format private static bool IsPkcs8Format(string pemContent) { return pemContent.Contains("-----BEGIN PRIVATE KEY-----") || @@ -288,6 +315,8 @@ private static bool IsPkcs8Format(string pemContent) /// /// Check if PEM content is PKCS#1 format /// + /// PEM content as string + /// True if PKCS#1 format private static bool IsPkcs1Format(string pemContent) { return pemContent.Contains("-----BEGIN RSA PRIVATE KEY-----"); @@ -298,23 +327,37 @@ private static bool IsPkcs1Format(string pemContent) /// private class PasswordFinder : IPasswordFinder { - private readonly string _password; + private readonly SecureString _password; - public PasswordFinder(string password) + /// + /// Initializes a new instance of the PasswordFinder class. + /// + /// Password as SecureString + public PasswordFinder(SecureString password) { _password = password; } + /// + /// Returns the password as a char array for BouncyCastle + /// + /// Char array of password public char[] GetPassword() { - return _password?.ToCharArray(); + if (_password == null || _password.Length == 0) + return null; + var pwd = new System.Net.NetworkCredential(string.Empty, _password).Password.ToCharArray(); + return pwd; } } /// /// Get detailed information about the extracted key /// - public static KeyInfo GetKeyInfo(string pemContent, string password = null) + /// PEM content as string + /// Password for encrypted keys (optional, SecureString) + /// KeyInfo object with details + public static KeyInfo GetKeyInfo(string pemContent, SecureString password = null) { using var rsa = ExtractPrivateKey(pemContent, password); var parameters = rsa.ExportParameters(false); // Export public parameters only for info @@ -328,6 +371,11 @@ public static KeyInfo GetKeyInfo(string pemContent, string password = null) }; } + /// + /// Determines the key format from PEM content + /// + /// PEM content as string + /// Key format string private static string DetermineKeyFormat(string pemContent) { if (IsPkcs8Format(pemContent)) @@ -338,13 +386,21 @@ private static string DetermineKeyFormat(string pemContent) return "Unknown"; } + /// + /// Determines if the key is encrypted from PEM content + /// + /// PEM content as string + /// True if encrypted private static bool DetermineIfEncrypted(string pemContent) { return pemContent.Contains("-----BEGIN ENCRYPTED PRIVATE KEY-----") || pemContent.Contains("Proc-Type: 4,ENCRYPTED"); } - } + + /// + /// Information about a cryptographic key + /// public class KeyInfo { public int KeySize { get; set; } From 0c10f623250756b6d6eba74d801eed0b58b39769 Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Fri, 26 Sep 2025 14:38:19 +0530 Subject: [PATCH 30/41] changed OAuthApi deserialize function call --- .../cybersource-rest-client-netstandard/Api/OAuthApi.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OAuthApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OAuthApi.cs index 0714dd3d..48e47fc9 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OAuthApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OAuthApi.cs @@ -7,6 +7,7 @@ using CyberSource.Model; using NLog; using AuthenticationSdk.util; +using AuthenticationSdk.core; namespace CyberSource.Api { @@ -280,9 +281,11 @@ public ApiResponse PostAccessTokenRequestWithHttpInfo(Creat } } + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (AccessTokenResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessTokenResponse))); // Return statement + (AccessTokenResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessTokenResponse), merchantConfig)); // Return statement } /// @@ -377,9 +380,11 @@ public async System.Threading.Tasks.Task> PostA } } + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (AccessTokenResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessTokenResponse))); // Return statement + (AccessTokenResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(AccessTokenResponse), merchantConfig)); // Return statement } } From 6aa53b2cd928cad919360ecda712df89b10d6f1c Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Fri, 26 Sep 2025 14:43:41 +0530 Subject: [PATCH 31/41] minor fix --- .../Api/BatchesApi.cs | 8 ++++---- .../Api/BillingAgreementsApi.cs | 6 +++--- .../Api/BinLookupApi.cs | 2 +- .../Api/CaptureApi.cs | 2 +- .../Api/ChargebackDetailsApi.cs | 2 +- .../Api/ChargebackSummariesApi.cs | 2 +- .../Api/ConversionDetailsApi.cs | 2 +- .../Api/CreateNewWebhooksApi.cs | 6 +++--- .../Api/CreditApi.cs | 2 +- .../Api/CustomerApi.cs | 6 +++--- .../Api/CustomerPaymentInstrumentApi.cs | 8 ++++---- .../Api/CustomerShippingAddressApi.cs | 8 ++++---- .../Api/DecisionManagerApi.cs | 10 +++++----- .../Api/DeviceDeAssociationApi.cs | 2 +- .../Api/DeviceSearchApi.cs | 4 ++-- .../Api/EMVTagDetailsApi.cs | 4 ++-- .../Api/FlexAPIApi.cs | 2 +- .../Api/InstrumentIdentifierApi.cs | 8 ++++---- .../Api/InterchangeClearingLevelDetailsApi.cs | 2 +- .../Api/InvoiceSettingsApi.cs | 4 ++-- .../Api/InvoicesApi.cs | 14 +++++++------- .../Api/ManageWebhooksApi.cs | 10 +++++----- .../Api/MerchantBoardingApi.cs | 4 ++-- .../Api/MicroformIntegrationApi.cs | 2 +- .../Api/NetFundingsApi.cs | 2 +- .../Api/NotificationOfChangesApi.cs | 2 +- .../Api/OrdersApi.cs | 4 ++-- .../Api/PayerAuthenticationApi.cs | 6 +++--- .../Api/PaymentBatchSummariesApi.cs | 2 +- .../Api/PaymentInstrumentApi.cs | 6 +++--- .../Api/PaymentLinksApi.cs | 8 ++++---- .../Api/PaymentTokensApi.cs | 2 +- .../Api/PaymentsApi.cs | 12 ++++++------ .../Api/PayoutsApi.cs | 2 +- .../Api/PlansApi.cs | 16 ++++++++-------- .../Api/PurchaseAndRefundDetailsApi.cs | 2 +- .../Api/PushFundsApi.cs | 2 +- .../Api/RefundApi.cs | 4 ++-- .../Api/ReportDefinitionsApi.cs | 4 ++-- .../Api/ReportSubscriptionsApi.cs | 4 ++-- .../Api/ReportsApi.cs | 4 ++-- .../Api/RetrievalDetailsApi.cs | 2 +- .../Api/RetrievalSummariesApi.cs | 2 +- .../Api/ReversalApi.cs | 4 ++-- .../Api/SearchTransactionsApi.cs | 4 ++-- .../Api/SecureFileShareApi.cs | 2 +- .../Api/SubscriptionsApi.cs | 16 ++++++++-------- .../Api/SubscriptionsFollowOnsApi.cs | 4 ++-- .../Api/TaxesApi.cs | 4 ++-- .../Api/TokenApi.cs | 4 ++-- .../Api/TokenizedCardApi.cs | 4 ++-- .../Api/TransactionBatchesApi.cs | 4 ++-- .../Api/TransactionDetailsApi.cs | 2 +- .../Api/TransientTokenDataApi.cs | 2 +- .../Api/UnifiedCheckoutCaptureContextApi.cs | 2 +- .../Api/UserManagementApi.cs | 2 +- .../Api/UserManagementSearchApi.cs | 2 +- .../Api/VerificationApi.cs | 4 ++-- .../Api/VoidApi.cs | 10 +++++----- 59 files changed, 138 insertions(+), 138 deletions(-) diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs index 080f84ca..448037dd 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs @@ -585,7 +585,7 @@ public async System.Threading.Tasks.Task> GetBa return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011),merchantConfig)); // Return statement + (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011), merchantConfig)); // Return statement } /// /// Retrieve a Batch Status **Get Batch Status**<br>This resource accepts a batch id and returns: - The batch status. - The total number of accepted, rejected, updated records. - The total number of card association responses. - The billable quantities of: - New Account Numbers (NAN) - New Expiry Dates (NED) - Account Closures (ACL) - Contact Card Holders (CCH) @@ -821,7 +821,7 @@ public async System.Threading.Tasks.Task> GetBa return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010),merchantConfig)); // Return statement + (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010), merchantConfig)); // Return statement } /// /// List Batches **List Batches**<br>This resource accepts a optional date range, record offset and limit, returning a paginated response of batches containing: - The batch id. - The batch status. - The batch created / modified dates. - The total number of accepted, rejected, updated records. - The total number of card association responses. @@ -1087,7 +1087,7 @@ public async System.Threading.Tasks.Task> GetBat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009),merchantConfig)); // Return statement + (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009), merchantConfig)); // Return statement } /// /// Create a Batch **Create a Batch**<br>This resource accepts TMS tokens ids of a Customer, Payment Instrument or Instrument Identifier. <br> The card numbers for the supplied tokens ids are then sent to the relevant card associations to check for updates.<br>The following type of batches can be submitted: - **oneOff** batch containing tokens id for Visa or MasterCard card numbers. - **amexRegistration** batch containing tokens id for Amex card numbers. A batch id will be returned on a successful response which can be used to get the batch status and the batch report. The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -1307,7 +1307,7 @@ public async System.Threading.Tasks.Task> PostBat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202),merchantConfig)); // Return statement + (InlineResponse202) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse202), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BillingAgreementsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BillingAgreementsApi.cs index d71e1a31..51d0b7b2 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BillingAgreementsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BillingAgreementsApi.cs @@ -549,7 +549,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response),merchantConfig)); // Return statement + (PtsV2ModifyBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2ModifyBillingAgreementPost201Response), merchantConfig)); // Return statement } /// /// Standing Instruction intimation Standing Instruction with or without Token. @@ -795,7 +795,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1),merchantConfig)); // Return statement + (PtsV2CreditsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response1), merchantConfig)); // Return statement } /// /// Create a Billing Agreement #### Standing Instruction: Standing Instruction with or without Token. Transaction amount in case First payment is coming along with registration. Only 2 decimal places allowed #### Create Mandate: You can create a mandate through the direct debit mandate flow. Possible create mandate status values: - Pending—the create mandate request was successfully processed. - Failed—the create mandate request was not accepted. #### Import Mandate: In the Bacs scheme, a mandate is created with a status of active. Direct debit collections can be made against it immediately. You can import a mandate to the CyberSource database when: - You have existing customers with signed, active mandates - You manage mandates outside of CyberSource. When you import an existing mandate to the CyberSource database, provide a unique value for the mandate ID or the request results in an error. If an import mandate request is not accepted, the import mandate status value is failed. @@ -1015,7 +1015,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response),merchantConfig)); // Return statement + (PtsV2CreateBillingAgreementPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateBillingAgreementPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BinLookupApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BinLookupApi.cs index 33201f02..69cdf317 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BinLookupApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BinLookupApi.cs @@ -432,7 +432,7 @@ public async System.Threading.Tasks.Task> GetAcc return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012),merchantConfig)); // Return statement + (InlineResponse2012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2012), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CaptureApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CaptureApi.cs index e5a12b61..41e2a65c 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CaptureApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CaptureApi.cs @@ -461,7 +461,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsCapturesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsCapturesPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackDetailsApi.cs index 7751d1bc..d703917f 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackDetailsApi.cs @@ -497,7 +497,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response),merchantConfig)); // Return statement + (ReportingV3ChargebackDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackSummariesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackSummariesApi.cs index 4551a6b6..94abaa51 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackSummariesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ChargebackSummariesApi.cs @@ -497,7 +497,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response),merchantConfig)); // Return statement + (ReportingV3ChargebackSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ChargebackSummariesGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ConversionDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ConversionDetailsApi.cs index 8e48544c..94ce2cdf 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ConversionDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ConversionDetailsApi.cs @@ -497,7 +497,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response),merchantConfig)); // Return statement + (ReportingV3ConversionDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ConversionDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs index 0f710f61..fd540e06 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs @@ -543,7 +543,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } /// /// Create a New Webhook Subscription Create a new webhook subscription. Before creating a webhook, ensure that a signature key has been created. For the example \"Create Webhook using oAuth with Client Credentials\" - for clients who have more than one oAuth Provider and have different client secrets that they would like to config for a given webhook, they may do so by overriding the keyId inside security config of webhook subscription. See the Developer Center examples section titled \"Webhook Security - Create or Store Egress Symmetric Key - Store oAuth Credentials For Symmetric Key\" to store these oAuth credentials that CYBS will need for oAuth. For JWT authentication, attach your oAuth details to the webhook subscription. See the example \"Create Webhook using oAuth with JWT\" @@ -751,7 +751,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015),merchantConfig)); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015), merchantConfig)); // Return statement } /// /// Create Webhook Security Keys Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later. @@ -1019,7 +1019,7 @@ public async System.Threading.Tasks.Task> SaveSy return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014),merchantConfig)); // Return statement + (InlineResponse2014) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2014), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreditApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreditApi.cs index 6e3ba268..1264b380 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreditApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreditApi.cs @@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response),merchantConfig)); // Return statement + (PtsV2CreditsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreditsPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerApi.cs index 26ab65ee..cae3d73e 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerApi.cs @@ -853,7 +853,7 @@ public async System.Threading.Tasks.Task> GetCu return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest),merchantConfig)); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest), merchantConfig)); // Return statement } /// /// Update a Customer | | | | | - -- | - -- | - -- | |**Customers**<br>A Customer represents your tokenized customer information.<br>You should associate the Customer Id with the customer account on your systems.<br>A Customer can have one or more [Payment Instruments](#token-management_customer-payment-instrument_create-a-customer-payment-instrumentl) or [Shipping Addresses](#token-management_customer-shipping-address_create-a-customer-shipping-address) with one allocated as the Customers default.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customer**<br>Your system can use this API to update a Customers details including selecting a [default Payment Instrument](#token-management_customer_update-a-customer_samplerequests-dropdown_update-customers-default-payment-instrument_liveconsole-tab-request-body) or [default Shipping Address](#token-management_customer_update-a-customer_samplerequests-dropdown_update-customers-default-shipping-address_liveconsole-tab-request-body) for use in payments.<br>Note: Updating a Customers [Payment Instrument](#token-management_customer-payment-instrument_update-a-customer-payment-instrument) or [Shipping Address](#token-management_customer-shipping-address_update-a-customer-shipping-address) details is performed using their own dedicated API resources. @@ -1123,7 +1123,7 @@ public async System.Threading.Tasks.Task> Patc return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest),merchantConfig)); // Return statement + (PatchCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerRequest), merchantConfig)); // Return statement } /// /// Create a Customer | | | | | - -- | - -- | - -- | |**Customers**<br>A Customer represents your tokenized customer information.<br>You should associate the Customer Id with the customer account on your systems.<br>A Customer can have one or more [Payment Instruments](#token-management_customer-payment-instrument_create-a-customer-payment-instrumentl) or [Shipping Addresses](#token-management_customer-shipping-address_create-a-customer-shipping-address) with one allocated as the Customers default.<br><br>**Creating a Customer**<br>It is recommended you [create a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>The Customer will be created with a Payment Instrument and Shipping Address.<br>You can also [add additional Payment Instruments to a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body).<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Customers**<br>To perform a payment with the Customers default details specify the [Customer Id in the payments request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-token-id_liveconsole-tab-request-body).<br>To perform a payment with a particular Payment Instrument or Shipping Address <br>specify the [Payment Instrument or Shipping Address Ids in the payments request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -1355,7 +1355,7 @@ public async System.Threading.Tasks.Task> PostC return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest),merchantConfig)); // Return statement + (PostCustomerRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerRequest), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerPaymentInstrumentApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerPaymentInstrumentApi.cs index 7b669a4b..b5ef6244 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerPaymentInstrumentApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerPaymentInstrumentApi.cs @@ -975,7 +975,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } /// /// List Payment Instruments for a Customer | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Customer Payment Instruments**<br>Your system can use this API to retrieve all existing Payment Instruments for a Customer. @@ -1251,7 +1251,7 @@ public async System.Threading.Tasks.Task> Get return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList),merchantConfig)); // Return statement + (PaymentInstrumentList) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList), merchantConfig)); // Return statement } /// /// Update a Customer Payment Instrument | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customers Payment Instrument**<br>Your system can use this API to update an existing Payment Instrument for a Customer, including selecting a [default Payment Instrument](#token-management_customer-payment-instrument_update-a-customer-payment-instrument_samplerequests-dropdown_make-customer-payment-instrument-the-default_liveconsole-tab-request-body) for use in payments. @@ -1547,7 +1547,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement + (PatchCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } /// /// Create a Customer Payment Instrument | | | | | - -- | - -- | - -- | |**Customer Payment Instrument**<br>A Customer Payment Instrument represents tokenized customer payment information such as expiration date, billing address & card type.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Payment Instruments](#token-management_customer-payment-instrument_retrieve-a-customer-payment-instrument), with one allocated as the Customers default for use in payments.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br><br>**Creating a Customer Payment Instrument**<br>It is recommended you [create a Customer Payment Instrument via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body), this can be for a zero amount.<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Customers Payment Instrument**<br>To perform a payment with a particular Payment Instrument or Shipping Address specify the [Payment Instrument in the payment request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). @@ -1805,7 +1805,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest),merchantConfig)); // Return statement + (PostCustomerPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerPaymentInstrumentRequest), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerShippingAddressApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerShippingAddressApi.cs index 0b052fd6..dbb972f6 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerShippingAddressApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CustomerShippingAddressApi.cs @@ -975,7 +975,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest),merchantConfig)); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest), merchantConfig)); // Return statement } /// /// List Shipping Addresses for a Customer | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Customer Shipping Addresses**<br>Your system can use this API to retrieve all existing Shipping Addresses for a Customer. @@ -1251,7 +1251,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer),merchantConfig)); // Return statement + (ShippingAddressListForCustomer) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShippingAddressListForCustomer), merchantConfig)); // Return statement } /// /// Update a Customer Shipping Address | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Customers Shipping Address**<br>Your system can use this API to update an existing Shipping Addresses for a Customer, including selecting a [default Shipping Address](#token-management_customer-shipping-address_update-a-customer-shipping-address_samplerequests-dropdown_make-customer-shipping-address-the-default_liveconsole-tab-request-body) for use in payments. @@ -1547,7 +1547,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest),merchantConfig)); // Return statement + (PatchCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchCustomerShippingAddressRequest), merchantConfig)); // Return statement } /// /// Create a Customer Shipping Address | | | | | - -- | - -- | - -- | |**Customer Shipping Address**<br>A Customer Shipping Address represents tokenized customer shipping information.<br>A [Customer](#token-management_customer_create-a-customer) can have [one or more Shipping Addresses](#token-management_customer-shipping-address_list-shipping-addresses-for-a-customer), with one allocated as the Customers default for use in payments.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Creating a Customer Shipping Address**<br>Your system can use this API to create an existing Customers default or non default Shipping Address.<br>You can also create additional Customer Shipping Addresses via the [Payments API](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body). @@ -1805,7 +1805,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest),merchantConfig)); // Return statement + (PostCustomerShippingAddressRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostCustomerShippingAddressRequest), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DecisionManagerApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DecisionManagerApi.cs index 16487190..00ecf6fe 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DecisionManagerApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DecisionManagerApi.cs @@ -641,7 +641,7 @@ public async System.Threading.Tasks.Task> Action return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001),merchantConfig)); // Return statement + (InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001), merchantConfig)); // Return statement } /// /// List Management This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be 'postiive', 'negative' or 'review'. @@ -887,7 +887,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response),merchantConfig)); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response), merchantConfig)); // Return statement } /// /// Add a comment to a DM post-transactional case Add a comment to a DM post-transactional case @@ -1133,7 +1133,7 @@ public async System.Threading.Tasks.Task> Commen return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011),merchantConfig)); // Return statement + (InlineResponse2011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2011), merchantConfig)); // Return statement } /// /// Create Decision Manager Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values. @@ -1353,7 +1353,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response),merchantConfig)); // Return statement + (RiskV1DecisionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1DecisionsPost201Response), merchantConfig)); // Return statement } /// /// Fraud Marking This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request. @@ -1599,7 +1599,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response),merchantConfig)); // Return statement + (RiskV1UpdatePost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1UpdatePost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs index 977b2d87..b9c881de 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs @@ -689,7 +689,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs index d6469278..17a4d5c7 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs @@ -473,7 +473,7 @@ public async System.Threading.Tasks.Task> PostSe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006),merchantConfig)); // Return statement + (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006), merchantConfig)); // Return statement } /// /// Retrieve List of Devices for a given search query Search for devices matching a given search query. The search query supports serialNumber, readerId, terminalId, status, statusChangeReason or organizationId Matching results are paginated. @@ -693,7 +693,7 @@ public async System.Threading.Tasks.Task> PostSe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2008) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2008),merchantConfig)); // Return statement + (InlineResponse2008) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2008), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/EMVTagDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/EMVTagDetailsApi.cs index bca391a4..501831c2 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/EMVTagDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/EMVTagDetailsApi.cs @@ -459,7 +459,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response),merchantConfig)); // Return statement + (TssV2GetEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2GetEmvTags200Response), merchantConfig)); // Return statement } /// /// Parse an EMV String Pass an EMV Tag-Length-Value (TLV) string for parsing. @@ -679,7 +679,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response),merchantConfig)); // Return statement + (TssV2PostEmvTags200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2PostEmvTags200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/FlexAPIApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/FlexAPIApi.cs index 04bac5bc..bce3806d 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/FlexAPIApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/FlexAPIApi.cs @@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateFlexAPICap return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InstrumentIdentifierApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InstrumentIdentifierApi.cs index d73243ed..36f7c132 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InstrumentIdentifierApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InstrumentIdentifierApi.cs @@ -987,7 +987,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest),merchantConfig)); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// /// List Payment Instruments for an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing <br>and account numbers.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the <br>Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) <br>or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Retrieving all Payment Instruments associated with an Instrument Identifier**<br>Your system can use this API to retrieve all Payment Instruments linked to an Instrument Identifier. @@ -1277,7 +1277,7 @@ public async System.Threading.Tasks.Task> Ge return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1),merchantConfig)); // Return statement + (PaymentInstrumentList1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PaymentInstrumentList1), merchantConfig)); // Return statement } /// /// Update an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating an Instrument Identifier**<br>When an Instrument Identifier is used in a payment the **_previousTransactionId_** and **_originalAuthorizedAmount_** values are automatically recorded.<br>These values will be added for you to future Merchant Initiated Transaction payments.<br>Your system can use this API to update these values. @@ -1561,7 +1561,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest),merchantConfig)); // Return statement + (PatchInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// /// Create an Instrument Identifier | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).<br><br>**Creating an Instrument Identifier**<br>It is recommended you [create an Instrument Identifier via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-instrument-identifier-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>An Instrument Identifier will also be created if you [create a Customer via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body)<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Instrument Identifiers**<br>To perform a payment with an Instrument Identifier simply specify the [Instrument Identifier Id in the payments request along with the expiration date, card type, & billing address](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-instrument-identifier-token-id_liveconsole-tab-request-body).<br>When an Instrument Identifier is used in a payment the **_previousTransactionId_** and **_originalAuthorizedAmount_** values are automatically recorded.<br>These values will be added for you to future Merchant Initiated Transaction payments. @@ -1807,7 +1807,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest),merchantConfig)); // Return statement + (PostInstrumentIdentifierRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostInstrumentIdentifierRequest), merchantConfig)); // Return statement } /// /// Enroll an Instrument Identifier for Payment Network Token | | | | | - -- | - -- | - -- | |**Instrument Identifiers**<br>An Instrument Identifier represents either a card number, or in the case of an ACH bank account, the routing and account number.<br>The same token Id is returned for a specific card number or bank account & routing number allowing the Instrument Identifier Id to be used for cross-channel payment tracking.<br>An Instrument Identifier can exist independently but also be associated with a [Customer Payment Instrument](#token-management_customer-payment-instrument_create-a-customer-payment-instrument) or [Standalone Payment Instrument](#token-management_payment-instrument_create-a-payment-instrument).|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Enroll an Instrument Identifier for a Payment Network Token**<br>Your system can use this API to provision a Network token for an existing Instrument Identifier.<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Network token can be [provisioned when creating an Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier_samplerequests-dropdown_create-instrument-identifier-card-enroll-for-network-token_liveconsole-tab-request-body).This will occur automatically when creating a [Customer](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), [Payment Instrument](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-create-default-payment-instrument-shipping-address-for-existing-customer_liveconsole-tab-request-body) or [Instrument Identifier](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-instrument-identifier-token-creation_liveconsole-tab-request-body) via the Payments API.<br>For more information about Payment Network Tokens see the Developer Guide. diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InterchangeClearingLevelDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InterchangeClearingLevelDetailsApi.cs index c90945d9..67c17f3c 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InterchangeClearingLevelDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InterchangeClearingLevelDetailsApi.cs @@ -497,7 +497,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response),merchantConfig)); // Return statement + (ReportingV3InterchangeClearingLevelDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3InterchangeClearingLevelDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoiceSettingsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoiceSettingsApi.cs index 2a5d4ea1..4ea1489f 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoiceSettingsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoiceSettingsApi.cs @@ -465,7 +465,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response),merchantConfig)); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response), merchantConfig)); // Return statement } /// /// Update Invoice Settings Allows you to customize the payment page, the checkout experience, email communication and payer authentication. You can customize the invoice to match your brand with your business name, logo and brand colors, and a VAT Tax number. You can choose to capture the payers shipping details, phone number and email during the checkout process. You can add a custom message to all invoice emails and enable or disable payer authentication for invoice payments. @@ -691,7 +691,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response),merchantConfig)); // Return statement + (InvoicingV2InvoiceSettingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoiceSettingsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoicesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoicesApi.cs index dc2855bf..170d0721 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoicesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/InvoicesApi.cs @@ -701,7 +701,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response),merchantConfig)); // Return statement + (InvoicingV2InvoicesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPost201Response), merchantConfig)); // Return statement } /// /// Get a List of Invoices Provides a (filtered) list of invoices that have been created in your account. You can filter the list based on Invoice Status by setting the status query parameter to one of DRAFT, CREATED, SENT, PARTIAL, PAID or CANCELED. @@ -983,7 +983,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response),merchantConfig)); // Return statement + (InvoicingV2InvoicesAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesAllGet200Response), merchantConfig)); // Return statement } /// /// Get Invoice Details You can retrieve details of a specific invoice. This can be used to check the Invoice status and get a list of invoice payments in the invoice history section of the response. For each payment transaction you can use the Transaction Details API to get more details on the payment transaction. @@ -1225,7 +1225,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response),merchantConfig)); // Return statement + (InvoicingV2InvoicesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesGet200Response), merchantConfig)); // Return statement } /// /// Cancel an Invoice You can cancel an invoice if no payment is made to it. You cannot cancel partially or fully paid invoices. @@ -1467,7 +1467,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response),merchantConfig)); // Return statement + (InvoicingV2InvoicesCancel200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesCancel200Response), merchantConfig)); // Return statement } /// /// Publish an Invoice You can publish an invoice in DRAFT status. After invoking this method, the invoice status is changed to CREATED. @@ -1709,7 +1709,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response),merchantConfig)); // Return statement + (InvoicingV2InvoicesPublish200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPublish200Response), merchantConfig)); // Return statement } /// /// Send an Invoice You can send an invoice in draft or created state or resend a sent or partially paid invoice. Fully paid or canceled invoices cannot be resent. @@ -1951,7 +1951,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response),merchantConfig)); // Return statement + (InvoicingV2InvoicesSend200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesSend200Response), merchantConfig)); // Return statement } /// /// Update an Invoice You can update all information except the invoice number till any payment is received for an invoice. Invoices that are partially or fully paid or cancelled cannot be updated. @@ -2203,7 +2203,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response),merchantConfig)); // Return statement + (InvoicingV2InvoicesPut200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InvoicingV2InvoicesPut200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs index 3e8df2f1..a9c3c43f 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs @@ -959,7 +959,7 @@ public async System.Threading.Tasks.Task> GetWeb return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015),merchantConfig)); // Return statement + (InlineResponse2015) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2015), merchantConfig)); // Return statement } /// /// Get Details On All Created Webhooks Retrieve a list of all previously created webhooks. @@ -1223,7 +1223,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } /// /// Test a Webhook Configuration Test the webhook configuration by sending a sample webhook. Calling this endpoint sends a sample webhook to the endpoint identified in the user's subscription. It will contain sample values for the product & eventType based on values present in your subscription along with a sample message in the payload. Based on the webhook response users can make any necessary modifications or rest assured knowing their setup is configured correctly. @@ -1459,7 +1459,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016),merchantConfig)); // Return statement + (InlineResponse2016) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2016), merchantConfig)); // Return statement } /// /// Update a Webhook Subscription Update a Webhook Subscription. @@ -1693,7 +1693,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2005) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2005),merchantConfig)); // Return statement + (InlineResponse2005) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2005), merchantConfig)); // Return statement } /// /// Update a Webhook Status Users can update the status of a webhook subscription by calling this endpoint. The webhookId parameter in the URL path identifies the specific webhook subscription to be updated. The request body accepts the values ACTIVE or INACTIVE. If the subscription is set to INACTIVE, webhooks will not be delivered until the subscription is activated again. @@ -2203,7 +2203,7 @@ public async System.Threading.Tasks.Task> SaveAs return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017),merchantConfig)); // Return statement + (InlineResponse2017) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2017), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs index 17dd9ef7..7773e1f8 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs @@ -493,7 +493,7 @@ public async System.Threading.Tasks.Task> GetReg return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2002) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2002),merchantConfig)); // Return statement + (InlineResponse2002) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2002), merchantConfig)); // Return statement } /// /// Create a boarding registration Boarding Product is specifically for resellers who onboard merchants to resell their services to merchants and help integrate REST API into their systems. The Boarding API is designed to simplify and streamline the onboarding process of merchants by enabling administrators and developers to: 1. Enable and Configure Products: The API helps in adding new products to an existing organization and configuring them to suit specific needs. 2. Update Merchant Information: The API allows for updating an organization's information efficiently. 3. Manage Payment Integration: It provides templates for secure payment integration and management. @@ -725,7 +725,7 @@ public async System.Threading.Tasks.Task> PostRe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013),merchantConfig)); // Return statement + (InlineResponse2013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2013), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MicroformIntegrationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MicroformIntegrationApi.cs index 7e855d76..6eb3c7e0 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MicroformIntegrationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MicroformIntegrationApi.cs @@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateCaptureCon return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NetFundingsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NetFundingsApi.cs index 32ad20c2..97acd8d4 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NetFundingsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NetFundingsApi.cs @@ -515,7 +515,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response),merchantConfig)); // Return statement + (ReportingV3NetFundingsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NetFundingsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NotificationOfChangesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NotificationOfChangesApi.cs index a3d1af1e..37b75284 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NotificationOfChangesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/NotificationOfChangesApi.cs @@ -481,7 +481,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response),merchantConfig)); // Return statement + (ReportingV3NotificationofChangesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3NotificationofChangesGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OrdersApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OrdersApi.cs index c252c5cc..d41f36af 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OrdersApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/OrdersApi.cs @@ -477,7 +477,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response),merchantConfig)); // Return statement + (PtsV2CreateOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2CreateOrderPost201Response), merchantConfig)); // Return statement } /// /// Update an Order This API can be used in two flavours - for updating the order as well as saving the order. @@ -723,7 +723,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response),merchantConfig)); // Return statement + (PtsV2UpdateOrderPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2UpdateOrderPatch201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayerAuthenticationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayerAuthenticationApi.cs index 1a4016fb..23bd68e6 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayerAuthenticationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayerAuthenticationApi.cs @@ -515,7 +515,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response),merchantConfig)); // Return statement + (RiskV1AuthenticationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response), merchantConfig)); // Return statement } /// /// Setup Payer Auth A new service for Merchants to get reference_id for Digital Wallets to use in place of BIN number in Cardinal. Set up file while authenticating with Cardinal. This service should be called by Merchant when payment instrument chosen or changes. This service has to be called before enrollment check. The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -735,7 +735,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response),merchantConfig)); // Return statement + (RiskV1AuthenticationSetupsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationSetupsPost201Response), merchantConfig)); // Return statement } /// /// Validate Authentication Results This call retrieves and validates the authentication results from issuer and allows the merchant to proceed with processing the payment. @@ -955,7 +955,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response),merchantConfig)); // Return statement + (RiskV1AuthenticationResultsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationResultsPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentBatchSummariesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentBatchSummariesApi.cs index 7e184b78..2786d9e2 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentBatchSummariesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentBatchSummariesApi.cs @@ -553,7 +553,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response),merchantConfig)); // Return statement + (ReportingV3PaymentBatchSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PaymentBatchSummariesGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentInstrumentApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentInstrumentApi.cs index 18585ff1..e86c9e01 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentInstrumentApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentInstrumentApi.cs @@ -879,7 +879,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest),merchantConfig)); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest), merchantConfig)); // Return statement } /// /// Update a Payment Instrument | | | | | - -- | - -- | - -- | |**Standalone Payment Instruments**<br>A Payment Instrument represents tokenized payment information such as expiration date, billing address & card type.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>**Standalone Payment Instruments do not belong to a [Customer](#token-management_customer_create-a-customer).**|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Updating a Payment Instrument**<br>Your system can use this API to update an existing Payment Instrument. @@ -1163,7 +1163,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest),merchantConfig)); // Return statement + (PatchPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PatchPaymentInstrumentRequest), merchantConfig)); // Return statement } /// /// Create a Payment Instrument | | | | | - -- | - -- | - -- | |**Standalone Payment Instruments**<br>A Payment Instrument represents tokenized payment information such as expiration date, billing address & card type.<br>A Payment Instrument token does not store the card number. A Payment Instrument is associated with an [Instrument Identifier](#token-management_instrument-identifier_create-an-instrument-identifier) that represents either a payment card number, or in the case of an ACH bank account, the routing and account number.<br>**Standalone Payment Instruments do not belong to a [Customer](#token-management_customer_create-a-customer).**<br><br>**Creating a Payment Instrument**<br>It is recommended you [create a Payment Instrument via a Payment Authorization](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-token-create_authorization-with-customer-token-creation_liveconsole-tab-request-body), this can be for a zero amount.<br>In Europe: You should perform Payer Authentication alongside the Authorization.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Network Tokens**<br>Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.<br>A Payment Network Token will be automatically created and used in future payments if you are enabled for the service.<br>A Payment Network Token can also be [provisioned for an existing Instrument Identifier](#token-management_instrument-identifier_enroll-an-instrument-identifier-for-payment-network-token).<br>For more information about Payment Network Tokens see the Developer Guide.<br><br>**Payments with Payment Instruments**<br>To perform a payment with a particular Payment Instrument specify the [Payment Instrument in the payment request](#payments_payments_process-a-payment_samplerequests-dropdown_authorization-using-tokens_authorization-with-customer-payment-instrument-and-shipping-address-token-id_liveconsole-tab-request-body). @@ -1409,7 +1409,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest),merchantConfig)); // Return statement + (PostPaymentInstrumentRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostPaymentInstrumentRequest), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentLinksApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentLinksApi.cs index 77c7135f..a361ea5e 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentLinksApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentLinksApi.cs @@ -575,7 +575,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response),merchantConfig)); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response), merchantConfig)); // Return statement } /// /// Get a List of Payment Links Provides a (filtered) list of payment links that have been created in your account. You can filter the list based on the following status types: - ACTIVE - INACTIVE @@ -857,7 +857,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response),merchantConfig)); // Return statement + (PblPaymentLinksAllGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksAllGet200Response), merchantConfig)); // Return statement } /// /// Get Payment Link Details You can retrieve details of a specific payment link. For each payment transaction you can use the Transaction Details API to get more details on the payment transaction. @@ -1099,7 +1099,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response),merchantConfig)); // Return statement + (PblPaymentLinksGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksGet200Response), merchantConfig)); // Return statement } /// /// Update a Payment Link You can update all information except the payment link number for a payment link. Changes made to amount/price will apply to new payments made using the payment link. @@ -1351,7 +1351,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response),merchantConfig)); // Return statement + (PblPaymentLinksPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PblPaymentLinksPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentTokensApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentTokensApi.cs index 963ce4d0..cf1c36ed 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentTokensApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentTokensApi.cs @@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task> Retriev return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201),merchantConfig)); // Return statement + (InlineResponse201) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse201), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentsApi.cs index 0df93911..189aa863 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PaymentsApi.cs @@ -683,7 +683,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsOrderPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsOrderPost201Response), merchantConfig)); // Return statement } /// /// Process a Payment A payment authorizes the amount for the transaction. There are a number of supported payment features, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation. @@ -903,7 +903,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response), merchantConfig)); // Return statement } /// /// Create Alternative Payments Sessions Request Create Alternative Payments Sessions Request @@ -1123,7 +1123,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2),merchantConfig)); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2), merchantConfig)); // Return statement } /// /// Increment an Authorization Use this service to authorize additional charges in a lodging or autorental transaction. Include the ID returned from the original authorization in the PATCH request to add additional charges to that authorization. @@ -1369,7 +1369,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response),merchantConfig)); // Return statement + (PtsV2IncrementalAuthorizationPatch201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2IncrementalAuthorizationPatch201Response), merchantConfig)); // Return statement } /// /// Check a Payment Status Checks and updates the payment status @@ -1615,7 +1615,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1),merchantConfig)); // Return statement + (PtsV2PaymentsPost201Response1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response1), merchantConfig)); // Return statement } /// /// Update Alternative Payments Sessions Request Update Alternative Payments Sessions Request @@ -1861,7 +1861,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2),merchantConfig)); // Return statement + (PtsV2PaymentsPost201Response2) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsPost201Response2), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayoutsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayoutsApi.cs index 9a90c6bb..e58e2d15 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayoutsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PayoutsApi.cs @@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response),merchantConfig)); // Return statement + (PtsV2PayoutsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PayoutsPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PlansApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PlansApi.cs index d9e213f8..d39a1155 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PlansApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PlansApi.cs @@ -763,7 +763,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse),merchantConfig)); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse), merchantConfig)); // Return statement } /// /// Create a Plan The recurring billing service enables you to manage payment plans and subscriptions for recurring payment schedules. It securely stores your customer's payment information and personal data within secure Visa data centers, reducing storage risks and PCI DSS scope through the use of *Token Management* (*TMS*). The three key elements of *Cybersource* Recurring Billing are: -  **Token**: stores customer billing, shipping, and payment details. -  **Plan**: stores the billing schedule. -  **Subscription**: combines the token and plan, and defines the subscription start date, name, and description. The APIs in this section demonstrate the management of the Plans and Subscriptions. For Tokens please refer to [Token Management](#token-management) The availability of API features for a merchant can depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. @@ -989,7 +989,7 @@ public async System.Threading.Tasks.Task> Create return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse),merchantConfig)); // Return statement + (CreatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatePlanResponse), merchantConfig)); // Return statement } /// /// Deactivate a Plan Deactivate a Plan @@ -1231,7 +1231,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse),merchantConfig)); // Return statement + (ActivateDeactivatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateDeactivatePlanResponse), merchantConfig)); // Return statement } /// /// Delete a Plan Delete a Plan is only allowed: - plan status is in `DRAFT` - plan status is in `ACTIVE`, and `INACTIVE` only allowed when no subscriptions attached to a plan in the lifetime of a plan @@ -1473,7 +1473,7 @@ public async System.Threading.Tasks.Task> Delete return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse),merchantConfig)); // Return statement + (DeletePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeletePlanResponse), merchantConfig)); // Return statement } /// /// Get a Plan Retrieve a Plan details by Plan Id. @@ -1715,7 +1715,7 @@ public async System.Threading.Tasks.Task> GetPlanAs return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse),merchantConfig)); // Return statement + (GetPlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanResponse), merchantConfig)); // Return statement } /// /// Get a Plan Code Get a Unique Plan Code @@ -1931,7 +1931,7 @@ public async System.Threading.Tasks.Task> GetPl return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse),merchantConfig)); // Return statement + (GetPlanCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPlanCodeResponse), merchantConfig)); // Return statement } /// /// Get a List of Plans Retrieve Plans by Plan Code & Plan Status. @@ -2217,7 +2217,7 @@ public async System.Threading.Tasks.Task> GetPl return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse),merchantConfig)); // Return statement + (GetAllPlansResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllPlansResponse), merchantConfig)); // Return statement } /// /// Update a Plan Update a Plan Plan in `DRAFT` status - All updates are allowed on Plan with `DRAFT` status Plan in `ACTIVE` status [Following fields are **Not Updatable**] - `planInformation.billingPeriod` - `planInformation.billingCycles` [Update is only allowed to **increase** billingCycles] - `orderInformation.amountDetails.currency` @@ -2469,7 +2469,7 @@ public async System.Threading.Tasks.Task> Update return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse),merchantConfig)); // Return statement + (UpdatePlanResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdatePlanResponse), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PurchaseAndRefundDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PurchaseAndRefundDetailsApi.cs index 34f41f20..24d72d10 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PurchaseAndRefundDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PurchaseAndRefundDetailsApi.cs @@ -589,7 +589,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response),merchantConfig)); // Return statement + (ReportingV3PurchaseRefundDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3PurchaseRefundDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PushFundsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PushFundsApi.cs index 32262d2f..b5ec4c97 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PushFundsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/PushFundsApi.cs @@ -599,7 +599,7 @@ public async System.Threading.Tasks.Task> Crea return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response),merchantConfig)); // Return statement + (PushFunds201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PushFunds201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RefundApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RefundApi.cs index eb4dfd3a..6fc4c570 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RefundApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RefundApi.cs @@ -507,7 +507,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response), merchantConfig)); // Return statement } /// /// Refund a Payment Refund a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to refund the payment amount. @@ -753,7 +753,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsRefundPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsRefundPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDefinitionsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDefinitionsApi.cs index 88bcbdfc..946679d2 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDefinitionsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportDefinitionsApi.cs @@ -547,7 +547,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response),merchantConfig)); // Return statement + (ReportingV3ReportDefinitionsNameGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsNameGet200Response), merchantConfig)); // Return statement } /// /// Get Reporting Resource Information View a list of supported reports and their attributes before subscribing to them. @@ -785,7 +785,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response),merchantConfig)); // Return statement + (ReportingV3ReportDefinitionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportDefinitionsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportSubscriptionsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportSubscriptionsApi.cs index 960fb9f0..5c6ae7dd 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportSubscriptionsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportSubscriptionsApi.cs @@ -1325,7 +1325,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response),merchantConfig)); // Return statement + (ReportingV3ReportSubscriptionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200Response), merchantConfig)); // Return statement } /// /// Get Subscription for Report Name View the details of a report subscription, such as the report format or report frequency, using the report's unique name. @@ -1575,7 +1575,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions),merchantConfig)); // Return statement + (ReportingV3ReportSubscriptionsGet200ResponseSubscriptions) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportsApi.cs index 54f4b815..c67c0b88 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReportsApi.cs @@ -817,7 +817,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response),merchantConfig)); // Return statement + (ReportingV3ReportsIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsIdGet200Response), merchantConfig)); // Return statement } /// /// Retrieve Available Reports Retrieve a list of the available reports to which you are subscribed. This will also give you the reportId value, which you can also use to download a report. @@ -1189,7 +1189,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response),merchantConfig)); // Return statement + (ReportingV3ReportsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3ReportsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalDetailsApi.cs index 55be606c..ca13a65b 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalDetailsApi.cs @@ -497,7 +497,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response),merchantConfig)); // Return statement + (ReportingV3RetrievalDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalSummariesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalSummariesApi.cs index 899e58aa..972f01a8 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalSummariesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/RetrievalSummariesApi.cs @@ -497,7 +497,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response),merchantConfig)); // Return statement + (ReportingV3RetrievalSummariesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportingV3RetrievalSummariesGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReversalApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReversalApi.cs index 260481bc..410082c9 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReversalApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ReversalApi.cs @@ -503,7 +503,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response), merchantConfig)); // Return statement } /// /// Timeout Reversal This is to reverse a previous payment that merchant does not receive a reply(Mostly due to Timeout). To use this feature/API, make sure to pass unique value to field - clientReferenceInformation -> transactionId in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call and use same transactionId in this API request payload to reverse the payment. @@ -723,7 +723,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsReversalsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsReversalsPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SearchTransactionsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SearchTransactionsApi.cs index 527f112d..88ee2297 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SearchTransactionsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SearchTransactionsApi.cs @@ -473,7 +473,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response),merchantConfig)); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response), merchantConfig)); // Return statement } /// /// Get Search Results Include the Search ID in the GET request to retrieve the search results. @@ -709,7 +709,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response),merchantConfig)); // Return statement + (TssV2TransactionsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SecureFileShareApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SecureFileShareApi.cs index 68288331..cf2d24c6 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SecureFileShareApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SecureFileShareApi.cs @@ -809,7 +809,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response),merchantConfig)); // Return statement + (V1FileDetailsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(V1FileDetailsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsApi.cs index 3fca6db5..4de1997c 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsApi.cs @@ -777,7 +777,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse),merchantConfig)); // Return statement + (ActivateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(ActivateSubscriptionResponse), merchantConfig)); // Return statement } /// /// Cancel a Subscription Cancel a Subscription @@ -1019,7 +1019,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse),merchantConfig)); // Return statement + (CancelSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelSubscriptionResponse), merchantConfig)); // Return statement } /// /// Create a Subscription Create a Recurring Billing Subscription @@ -1245,7 +1245,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse),merchantConfig)); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse), merchantConfig)); // Return statement } /// /// Get a List of Subscriptions Retrieve Subscriptions by Subscription Code & Subscription Status. @@ -1517,7 +1517,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse),merchantConfig)); // Return statement + (GetAllSubscriptionsResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAllSubscriptionsResponse), merchantConfig)); // Return statement } /// /// Get a Subscription Get a Subscription by Subscription Id @@ -1759,7 +1759,7 @@ public async System.Threading.Tasks.Task> G return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse),merchantConfig)); // Return statement + (GetSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse), merchantConfig)); // Return statement } /// /// Get a Subscription Code Get a Unique Subscription Code @@ -1975,7 +1975,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse),merchantConfig)); // Return statement + (GetSubscriptionCodeResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionCodeResponse), merchantConfig)); // Return statement } /// /// Suspend a Subscription Suspend a Subscription @@ -2217,7 +2217,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse),merchantConfig)); // Return statement + (SuspendSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(SuspendSubscriptionResponse), merchantConfig)); // Return statement } /// /// Update a Subscription Update a Subscription by Subscription Id @@ -2469,7 +2469,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse),merchantConfig)); // Return statement + (UpdateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UpdateSubscriptionResponse), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsFollowOnsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsFollowOnsApi.cs index 5e837410..95d2266a 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsFollowOnsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/SubscriptionsFollowOnsApi.cs @@ -509,7 +509,7 @@ public async System.Threading.Tasks.Task return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse),merchantConfig)); // Return statement + (CreateSubscriptionResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse), merchantConfig)); // Return statement } /// /// Get a Follow-On Subscription Get details of the Subscription being created based on the Request Id of an existing successful Transaction. @@ -751,7 +751,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1),merchantConfig)); // Return statement + (GetSubscriptionResponse1) Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse1), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TaxesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TaxesApi.cs index 32eeb290..f9a0f372 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TaxesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TaxesApi.cs @@ -477,7 +477,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response),merchantConfig)); // Return statement + (VasV2PaymentsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2PaymentsPost201Response), merchantConfig)); // Return statement } /// /// Void Taxes Pass the Tax Request ID in the PATCH request to void the committed tax calculation. @@ -723,7 +723,7 @@ public async System.Threading.Tasks.Task> V return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response),merchantConfig)); // Return statement + (VasV2TaxVoid200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(VasV2TaxVoid200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenApi.cs index 78dc2d49..dc7a60ba 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenApi.cs @@ -557,7 +557,7 @@ public async System.Threading.Tasks.Task> GetCard return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200),merchantConfig)); // Return statement + (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200), merchantConfig)); // Return statement } /// /// Generate Payment Credentials for a TMS Token | | | | | - -- | - -- | - -- | |**Token**<br>A Token can represent your tokenized Customer, Payment Instrument or Instrument Identifier information.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Credentials**<br>Contains payment information such as the network token, generated cryptogram for Visa & MasterCard or dynamic CVV for Amex in a JSON Web Encryption (JWE) response.<br>Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument or Instrument Identifier. @@ -815,7 +815,7 @@ public async System.Threading.Tasks.Task> PostTokenPaymentCr return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs index f10c97d8..daae611a 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs @@ -799,7 +799,7 @@ public async System.Threading.Tasks.Task> GetT return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest),merchantConfig)); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest), merchantConfig)); // Return statement } /// /// Create a Tokenized Card | | | | | - -- | - -- | - -- | |**Tokenized cards**<br>A Tokenized card represents a network token. Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires. @@ -1031,7 +1031,7 @@ public async System.Threading.Tasks.Task> Post return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest),merchantConfig)); // Return statement + (TokenizedcardRequest) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TokenizedcardRequest), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionBatchesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionBatchesApi.cs index a9971796..fb40593d 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionBatchesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionBatchesApi.cs @@ -849,7 +849,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response),merchantConfig)); // Return statement + (PtsV1TransactionBatchesIdGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesIdGet200Response), merchantConfig)); // Return statement } /// /// Get a List of Batch Files Provide the date and time search range to get a list of Batch Files ready for settlement @@ -1111,7 +1111,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response),merchantConfig)); // Return statement + (PtsV1TransactionBatchesGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV1TransactionBatchesGet200Response), merchantConfig)); // Return statement } /// /// Upload a Batch File This endpoint enables the upload of a batch file containing transactions for processing. diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionDetailsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionDetailsApi.cs index 332fad6f..3821ccea 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionDetailsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransactionDetailsApi.cs @@ -447,7 +447,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response),merchantConfig)); // Return statement + (TssV2TransactionsGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TssV2TransactionsGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransientTokenDataApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransientTokenDataApi.cs index 148c9848..0bc3803b 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransientTokenDataApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TransientTokenDataApi.cs @@ -488,7 +488,7 @@ public async System.Threading.Tasks.Task> GetPaymentCredenti return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } /// /// Get Transient Token Data Retrieve the data captured by Unified Checkout. This API is used to retrieve the detailed data represented by the Transient Token. This API will not return PCI payment data (PAN). Include the Request ID in the GET request to retrieve the transaction details. diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UnifiedCheckoutCaptureContextApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UnifiedCheckoutCaptureContextApi.cs index 28fee0d2..fcd94461 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UnifiedCheckoutCaptureContextApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UnifiedCheckoutCaptureContextApi.cs @@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task> GenerateUnifiedChe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string),merchantConfig)); // Return statement + (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementApi.cs index a44c12c3..1f50d2f0 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementApi.cs @@ -489,7 +489,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response),merchantConfig)); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementSearchApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementSearchApi.cs index 25d97166..bcec5eef 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementSearchApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/UserManagementSearchApi.cs @@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task> return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response),merchantConfig)); // Return statement + (UmsV1UsersGet200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(UmsV1UsersGet200Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VerificationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VerificationApi.cs index 08115381..417839c6 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VerificationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VerificationApi.cs @@ -473,7 +473,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response),merchantConfig)); // Return statement + (RiskV1ExportComplianceInquiriesPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1ExportComplianceInquiriesPost201Response), merchantConfig)); // Return statement } /// /// Verify customer address This call verifies that the customer address submitted is valid. @@ -693,7 +693,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response),merchantConfig)); // Return statement + (RiskV1AddressVerificationsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AddressVerificationsPost201Response), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VoidApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VoidApi.cs index b0ac2b76..d37f73c5 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VoidApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/VoidApi.cs @@ -615,7 +615,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// /// Void a Capture Refund a capture API is only used, if you have requested Capture independenlty using [/pts/v2/payments/{id}/captures](https://developer.cybersource.com/api-reference-assets/index.html#payments_capture) API call. Include the capture ID in the POST request to cancel the capture. @@ -861,7 +861,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// /// Void a Credit Include the credit ID in the POST request to cancel the credit. @@ -1107,7 +1107,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// /// Void a Payment Void a Payment API is only used, if you have requested Authorization and Capture together in [/pts/v2/payments](https://developer.cybersource.com/api-reference-assets/index.html#payments_payments) API call. Include the payment ID in the POST request to cancel the payment. @@ -1353,7 +1353,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } /// /// Void a Refund Include the refund ID in the POST request to cancel the refund. @@ -1599,7 +1599,7 @@ public async System.Threading.Tasks.Task(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response),merchantConfig)); // Return statement + (PtsV2PaymentsVoidsPost201Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(PtsV2PaymentsVoidsPost201Response), merchantConfig)); // Return statement } } } From 7cd956bec438eab41a30ad2de7d421e0dacb821f Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Fri, 26 Sep 2025 14:44:45 +0530 Subject: [PATCH 32/41] review comment changes --- .../authentication/jwt/JwtTokenGenerator.cs | 2 +- .../AuthenticationSdk/core/Authorize.cs | 2 +- .../AuthenticationSdk/util/Constants.cs | 9 ++ .../AuthenticationSdk/util/MLEUtility.cs | 7 +- .../AuthenticationSdk/util/Utility.cs | 94 ++++++++++++------- .../Client/ApiClient.cs | 7 +- .../ApiClient.mustache | 7 +- .../cybersource-csharp-template/api.mustache | 2 +- 8 files changed, 86 insertions(+), 44 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs index f63bc26e..7b99ca73 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs @@ -13,7 +13,7 @@ public class JwtTokenGenerator : ITokenGenerator private readonly JwtToken _jwtToken; private readonly bool _isResponseMLEForApi; - public JwtTokenGenerator(MerchantConfig merchantConfig,bool isResponseMLEForApi) + public JwtTokenGenerator(MerchantConfig merchantConfig, bool isResponseMLEForApi) { _isResponseMLEForApi = isResponseMLEForApi; _merchantConfig = merchantConfig; diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/Authorize.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/Authorize.cs index 0b8db77d..82f07909 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/Authorize.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/Authorize.cs @@ -101,7 +101,7 @@ public JwtToken GetToken(bool isResponseMLEForApi = false) throw new Exception("Missing or Empty Credentials : MerchantID or KeyAlias or KeyPassphrase"); } - var tokenObj = (JwtToken)new JwtTokenGenerator(_merchantConfig,isResponseMLEForApi).GetToken(); + var tokenObj = (JwtToken)new JwtTokenGenerator(_merchantConfig, isResponseMLEForApi).GetToken(); if (_merchantConfig.IsGetRequest || _merchantConfig.IsDeleteRequest) { diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs index 05451032..c8e1fb9d 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs @@ -47,5 +47,14 @@ public static class Constants public static readonly string MLE_CACHE_IDENTIFIER_FOR_P12_CERT = "mleCertFromP12"; public static readonly string MLE_CACHE_KEY_IDENTIFIER_FOR_RESPONSE_PRIVATE_KEY = "mleResponsePrivateKeyFromFile"; + + public static readonly string PKCS8_PRIVATE_KEY_HEADER = "-----BEGIN PRIVATE KEY-----"; + + public static readonly string PKCS8_ENCRYPTED_PRIVATE_KEY_HEADER = "-----BEGIN ENCRYPTED PRIVATE KEY-----"; + + public static readonly string PKCS1_PRIVATE_KEY_HEADER = "-----BEGIN RSA PRIVATE KEY-----"; + + public static readonly string PROC_TYPE_ENCRYPTED_HEADER = "Proc-Type: 4,ENCRYPTED"; + } } diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index 38323f01..bfe6a42e 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -6,6 +6,7 @@ using System.IO; using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography; +using Newtonsoft.Json.Linq; namespace AuthenticationSdk.util { @@ -170,7 +171,7 @@ public static bool CheckIsMleEncryptedResponse(string responseBody) } try { - var jsonObject = JsonConvert.DeserializeObject(responseBody); + var jsonObject = JsonConvert.DeserializeObject(responseBody); if (jsonObject == null || jsonObject.Count != 1) { return false; @@ -178,7 +179,7 @@ public static bool CheckIsMleEncryptedResponse(string responseBody) if (jsonObject.ContainsKey("encryptedResponse")) { var value = jsonObject["encryptedResponse"]; - return value != null && value.Type == Newtonsoft.Json.Linq.JTokenType.String; + return value != null && value.Type == JTokenType.String; } return false; } @@ -192,7 +193,7 @@ private static string GetResponseMleToken(string mleResponseBody) { try { - var jsonObject = JsonConvert.DeserializeObject(mleResponseBody); + var jsonObject = JsonConvert.DeserializeObject(mleResponseBody); return jsonObject?["encryptedResponse"]?.ToString(); } catch (Exception e) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs index 78edb43e..76712410 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs @@ -39,10 +39,9 @@ public static bool IsValidBooleanString(string value) public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, SecureString password = null) { if (string.IsNullOrWhiteSpace(p12FilePath)) + { throw new ArgumentException("File path cannot be null or empty", nameof(p12FilePath)); - - if (!File.Exists(p12FilePath)) - throw new FileNotFoundException("The specified PKCS#12 file was not found.", p12FilePath); + } try { @@ -57,17 +56,16 @@ public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, Secu // Check if private key exists if (!cert.HasPrivateKey) + { throw new InvalidOperationException("No private key found in the P12 file."); + } - // Try RSA first + // Try RSA key var rsaKey = cert.GetRSAPrivateKey(); if (rsaKey != null) + { return rsaKey; - - // Try ECDsa next - var ecdsaKey = cert.GetECDsaPrivateKey(); - if (ecdsaKey != null) - return ecdsaKey; + } throw new InvalidOperationException("Private key found but unsupported algorithm type."); } @@ -75,6 +73,18 @@ public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, Secu { throw new CryptographicException("Failed to read private key. Possible causes: wrong password, corrupted file, or unsupported format.", ex); } + catch (InvalidOperationException ex) + { + if (ex.Message.Contains("No private key found")) + { + throw new InvalidOperationException("No private key found in the P12 file.", ex); + } + else if (ex.Message.Contains("unsupported algorithm type")) + { + throw new InvalidOperationException("Private key found but unsupported algorithm type.", ex); + } + throw; + } } /// @@ -90,7 +100,9 @@ public static RSA ExtractPrivateKey(string pemContent, SecureString password = n // First try with PemReader (handles most PEM formats) var privateKey = ExtractWithPemReader(pemContent, password); if (privateKey != null) + { return ConvertToRSA(privateKey); + } // If PemReader fails, try manual parsing return ExtractWithManualParsing(pemContent, password); @@ -110,7 +122,9 @@ public static RSA ExtractPrivateKey(string pemContent, SecureString password = n public static RSA ExtractPrivateKeyFromFile(string filePath, SecureString password = null) { if (!File.Exists(filePath)) + { throw new FileNotFoundException($"Private key file not found: {filePath}"); + } string pemContent = File.ReadAllText(filePath); return ExtractPrivateKey(pemContent, password); @@ -161,11 +175,11 @@ private static RSA ExtractWithManualParsing(string pemContent, SecureString pass var keyBytes = Convert.FromBase64String(base64Content); // Determine the key format and handle accordingly - if (IsPkcs8Format(pemContent)) + if (IsKeyPkcs8Format(pemContent)) { return HandlePkcs8Key(keyBytes, password); } - else if (IsPkcs1Format(pemContent)) + else if (IsKeyPkcs1Format(pemContent)) { return HandlePkcs1Key(keyBytes, password); } @@ -175,6 +189,17 @@ private static RSA ExtractWithManualParsing(string pemContent, SecureString pass } } + /// + /// Check if PEM content is PKCS#8 format + /// + /// PEM content as string + /// True if PKCS#8 format + private static bool IsKeyPkcs8Format(string pemContent) + { + return pemContent.Contains(Constants.PKCS8_PRIVATE_KEY_HEADER) || + pemContent.Contains(Constants.PKCS8_ENCRYPTED_PRIVATE_KEY_HEADER); + } + /// /// Handle PKCS#8 format keys (encrypted and unencrypted) /// @@ -210,6 +235,16 @@ private static RSA HandlePkcs8Key(byte[] keyBytes, SecureString password) } } + /// + /// Check if PEM content is PKCS#1 format + /// + /// PEM content as string + /// True if PKCS#1 format + private static bool IsKeyPkcs1Format(string pemContent) + { + return pemContent.Contains(Constants.PKCS1_PRIVATE_KEY_HEADER); + } + /// /// Handle PKCS#1 format keys /// @@ -301,27 +336,6 @@ private static string ExtractBase64FromPem(string pemContent) return string.Join("", base64Lines); } - /// - /// Check if PEM content is PKCS#8 format - /// - /// PEM content as string - /// True if PKCS#8 format - private static bool IsPkcs8Format(string pemContent) - { - return pemContent.Contains("-----BEGIN PRIVATE KEY-----") || - pemContent.Contains("-----BEGIN ENCRYPTED PRIVATE KEY-----"); - } - - /// - /// Check if PEM content is PKCS#1 format - /// - /// PEM content as string - /// True if PKCS#1 format - private static bool IsPkcs1Format(string pemContent) - { - return pemContent.Contains("-----BEGIN RSA PRIVATE KEY-----"); - } - /// /// Password finder for encrypted keys /// @@ -345,7 +359,9 @@ public PasswordFinder(SecureString password) public char[] GetPassword() { if (_password == null || _password.Length == 0) + { return null; + } var pwd = new System.Net.NetworkCredential(string.Empty, _password).Password.ToCharArray(); return pwd; } @@ -378,12 +394,18 @@ public static KeyInfo GetKeyInfo(string pemContent, SecureString password = null /// Key format string private static string DetermineKeyFormat(string pemContent) { - if (IsPkcs8Format(pemContent)) + if (IsKeyPkcs8Format(pemContent)) + { return "PKCS#8"; - else if (IsPkcs1Format(pemContent)) + } + else if (IsKeyPkcs1Format(pemContent)) + { return "PKCS#1"; + } else + { return "Unknown"; + } } /// @@ -393,8 +415,8 @@ private static string DetermineKeyFormat(string pemContent) /// True if encrypted private static bool DetermineIfEncrypted(string pemContent) { - return pemContent.Contains("-----BEGIN ENCRYPTED PRIVATE KEY-----") || - pemContent.Contains("Proc-Type: 4,ENCRYPTED"); + return pemContent.Contains(Constants.PKCS8_ENCRYPTED_PRIVATE_KEY_HEADER) || + pemContent.Contains(Constants.PROC_TYPE_ENCRYPTED_HEADER); } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs index 73c3b5a5..91ca4d21 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs @@ -667,7 +667,7 @@ public string ParameterToString(object obj) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - public object Deserialize(RestResponse response, Type type,MerchantConfig merchantConfig = null) // CHANGED + public object Deserialize(RestResponse response, Type type, MerchantConfig merchantConfig) // CHANGED { IList headers = response.Headers.ToList(); if (type == typeof(byte[])) // return byte array @@ -706,6 +706,11 @@ public object Deserialize(RestResponse response, Type type,MerchantConfig mercha // check if Response MLE is enabled, then decrypt the response content and then deserialize if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) { + if (merchantConfig == null) + { + throw new ApiException(500, "merchantConfig cannot be null when decrypting MLE encrypted response."); + } + // Inside the if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) block try { diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache index 9105bdbd..ad0c875a 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache @@ -721,7 +721,7 @@ namespace {{packageName}}.Client /// The HTTP response. /// Object type. /// Object representation of the JSON string. - public object Deserialize(RestResponse response, Type type,MerchantConfig merchantConfig = null) // CHANGED + public object Deserialize(RestResponse response, Type type, MerchantConfig merchantConfig) // CHANGED { {{^netStandard}}IList{{/netStandard}}{{#netStandard}}IHttpHeaders{{/netStandard}} headers = response.Headers.ToList(); if (type == typeof(byte[])) // return byte array @@ -760,6 +760,11 @@ namespace {{packageName}}.Client // check if Response MLE is enabled, then decrypt the response content and then deserialize if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) { + if (merchantConfig == null) + { + throw new ApiException(500, "merchantConfig cannot be null when decrypting MLE encrypted response."); + } + // Inside the if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) block try { diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/api.mustache b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/api.mustache index 5beba1a3..5a959cac 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/api.mustache +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/api.mustache @@ -623,7 +623,7 @@ namespace {{packageName}}.{{apiPackage}} {{#returnType}} return new ApiResponse<{{{returnType}}}>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}),merchantConfig)); // Return statement + ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}), merchantConfig)); // Return statement {{/returnType}} {{^returnType}} this.SetStatusCode(localVarStatusCode); From 56776ea6e8b563e34f4db476e3f524b9cf48567b Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Tue, 30 Sep 2025 10:47:47 +0530 Subject: [PATCH 33/41] review comment changes --- .../authentication/jwt/JwtTokenGenerator.cs | 31 +++++++++++-------- .../AuthenticationSdk/core/MerchantConfig.cs | 17 ++-------- .../AuthenticationSdk/util/Cache.cs | 4 --- .../AuthenticationSdk/util/Utility.cs | 20 +++++++++--- .../Client/ApiClient.cs | 4 +-- .../ApiClient.mustache | 4 +-- 6 files changed, 41 insertions(+), 39 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs index 7b99ca73..048a1e54 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/authentication/jwt/JwtTokenGenerator.cs @@ -4,6 +4,7 @@ using System.Security.Cryptography.X509Certificates; using System.Text; using AuthenticationSdk.core; +using Newtonsoft.Json.Linq; namespace AuthenticationSdk.authentication.jwt { @@ -56,16 +57,17 @@ private string SetToken() private string TokenForCategory1() { - var jwtBody = ""; + JObject claimSetJson = new JObject(); + claimSetJson["iat"] = DateTime.Now.ToUniversalTime().ToString("r"); + if (_isResponseMLEForApi) { - jwtBody = $"{{ \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\", \"v-c-response-mle-kid\":\"{_merchantConfig.ResponseMleKID}\" }}"; - } - else - { - jwtBody = $"{{ \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\"}}"; + claimSetJson["v-c-response-mle-kid"] = _merchantConfig.ResponseMleKID; } + String jwtBody = ""; + jwtBody = claimSetJson.ToString(Newtonsoft.Json.Formatting.None); + var x5Cert = _jwtToken.Certificate; var publicKey = Convert.ToBase64String(x5Cert.RawData); @@ -91,16 +93,20 @@ private string TokenForCategory1() private string TokenForCategory2() { var digest = GenerateDigest(_jwtToken.RequestJsonData); - var jwtBody = ""; + + JObject claimSetJson = new JObject(); + claimSetJson["digest"] = digest; + claimSetJson["digestAlgorithm"] = "SHA-256"; + claimSetJson["iat"] = DateTime.Now.ToUniversalTime().ToString("r"); + if (_isResponseMLEForApi) { - jwtBody = $"{{\n \"digest\":\"{digest}\", \"digestAlgorithm\":\"SHA-256\", \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\", \"v-c-response-mle-kid\":\"{_merchantConfig.ResponseMleKID}\"}}"; - } - else - { - jwtBody = $"{{\n \"digest\":\"{digest}\", \"digestAlgorithm\":\"SHA-256\", \"iat\":\"{DateTime.Now.ToUniversalTime().ToString("r")}\"}}"; + claimSetJson["v-c-response-mle-kid"] = _merchantConfig.ResponseMleKID; } + String jwtBody = ""; + jwtBody = claimSetJson.ToString(Newtonsoft.Json.Formatting.None); + var x5Cert = _jwtToken.Certificate; var publicKey = Convert.ToBase64String(x5Cert.RawData); @@ -118,7 +124,6 @@ private string TokenForCategory2() }; var token = Jose.JWT.Encode(jwtBody, privateKey, Jose.JwsAlgorithm.RS256, cybsHeaders); - return token; } } diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index eadba437..2979de40 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -418,7 +418,7 @@ private void SetValuesFromAppConfig(NameValueCollection merchantConfigSection, D if (merchantConfigSection["responseMlePrivateKeyFilePassword"] != null && !string.IsNullOrEmpty(merchantConfigSection["responseMlePrivateKeyFilePassword"])) { - ResponseMlePrivateKeyFilePassword = ConvertToSecureString(merchantConfigSection["responseMlePrivateKeyFilePassword"]); + ResponseMlePrivateKeyFilePassword = Utility.ConvertStringToSecureString(merchantConfigSection["responseMlePrivateKeyFilePassword"]); } } @@ -715,7 +715,7 @@ private void SetValuesUsingDictObj(IReadOnlyDictionary merchantC if (merchantConfigDictionary.ContainsKey("responseMlePrivateKeyFilePassword") && !string.IsNullOrEmpty(merchantConfigDictionary["responseMlePrivateKeyFilePassword"])) { - ResponseMlePrivateKeyFilePassword = ConvertToSecureString(merchantConfigDictionary["responseMlePrivateKeyFilePassword"]); + ResponseMlePrivateKeyFilePassword = Utility.ConvertStringToSecureString(merchantConfigDictionary["responseMlePrivateKeyFilePassword"]); } } } @@ -1060,17 +1060,6 @@ public bool CheckKeyFile() return false; } } - private SecureString ConvertToSecureString(string password) - { - if (string.IsNullOrEmpty(password)) - return null; - var securePassword = new SecureString(); - foreach (char c in password) - { - securePassword.AppendChar(c); - } - securePassword.MakeReadOnly(); - return securePassword; - } + } } \ No newline at end of file diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs index 5f8d522b..da7de9de 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs @@ -314,10 +314,6 @@ public static AsymmetricAlgorithm GetMleResponsePrivateKeyFromFilePath(MerchantC try { - if (cachedResponseMlePrivateKeyInfo == null || cachedResponseMlePrivateKeyInfo.PrivateKey == null) - { - throw new Exception($"{Constants.ErrorPrefix} MLE response private key could not be retrieved from cache."); - } RSA privateKey = (RSA)cachedResponseMlePrivateKeyInfo.PrivateKey; return cachedResponseMlePrivateKeyInfo.PrivateKey; } diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs index 76712410..1975f563 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs @@ -16,6 +16,20 @@ namespace AuthenticationSdk.util { public static class Utility { + + + public static SecureString ConvertStringToSecureString(string password) + { + if (string.IsNullOrEmpty(password)) + return null; + var securePassword = new SecureString(); + foreach (char c in password) + { + securePassword.AppendChar(c); + } + securePassword.MakeReadOnly(); + return securePassword; + } /// /// Checks if the provided string represents a valid boolean value ("true" or "false", case-insensitive). /// @@ -45,12 +59,10 @@ public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, Secu try { - // Convert SecureString to string for X509Certificate2 - string pwd = password == null ? string.Empty : new System.Net.NetworkCredential(string.Empty, password).Password; // Load the certificate (including private key) from the P12 file var cert = new X509Certificate2( p12FilePath, - pwd, + password == null ? string.Empty : new System.Net.NetworkCredential(string.Empty, password).Password, X509KeyStorageFlags.Exportable | X509KeyStorageFlags.MachineKeySet ); @@ -93,7 +105,7 @@ public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, Secu /// PEM content as string /// Password for encrypted keys (optional, SecureString) /// RSA private key object - public static RSA ExtractPrivateKey(string pemContent, SecureString password = null) + private static RSA ExtractPrivateKey(string pemContent, SecureString password = null) { try { diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs index 91ca4d21..ed5b4a9d 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs @@ -708,7 +708,7 @@ public object Deserialize(RestResponse response, Type type, MerchantConfig merch { if (merchantConfig == null) { - throw new ApiException(500, "merchantConfig cannot be null when decrypting MLE encrypted response."); + throw new ApiException((int)response.StatusCode, "merchantConfig cannot be null when decrypting MLE encrypted response."); } // Inside the if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) block @@ -721,7 +721,7 @@ public object Deserialize(RestResponse response, Type type, MerchantConfig merch catch (Exception e) { logger.Error($"MLE Encrypted Response Decryption Error Occurred. Error: {e.Message}"); - throw new ApiException(500, e.Message); + throw new ApiException((int)response.StatusCode, e.Message); } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache index ad0c875a..f5781ca7 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache @@ -762,7 +762,7 @@ namespace {{packageName}}.Client { if (merchantConfig == null) { - throw new ApiException(500, "merchantConfig cannot be null when decrypting MLE encrypted response."); + throw new ApiException((int)response.StatusCode, "merchantConfig cannot be null when decrypting MLE encrypted response."); } // Inside the if (MLEUtility.CheckIsMleEncryptedResponse(response.Content)) block @@ -775,7 +775,7 @@ namespace {{packageName}}.Client catch (Exception e) { logger.Error($"MLE Encrypted Response Decryption Error Occurred. Error: {e.Message}"); - throw new ApiException(500, e.Message); + throw new ApiException((int)response.StatusCode, e.Message); } } From 5eae8b17634e985989bd2b99100c5ea615afdc46 Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Tue, 30 Sep 2025 15:00:39 +0530 Subject: [PATCH 34/41] moved Utility Functions to PEMUtility --- .../AuthenticationSdk/util/PEMUtility.cs | 368 +++++++++++++++++ .../AuthenticationSdk/util/Utility.cs | 377 +----------------- 2 files changed, 385 insertions(+), 360 deletions(-) create mode 100644 cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs new file mode 100644 index 00000000..556546da --- /dev/null +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs @@ -0,0 +1,368 @@ +using System; +using System.IO; +using System.Security; +using System.Security.Cryptography; +using Org.BouncyCastle.Asn1.Pkcs; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Parameters; +using Org.BouncyCastle.OpenSsl; +using Org.BouncyCastle.Pkcs; +using Org.BouncyCastle.Security; + +namespace AuthenticationSdk.util +{ + public class PEMUtility + { + /// + /// Extracts private key from file + /// + /// Path to PEM file + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + public static RSA ExtractPrivateKeyFromFile(string filePath, SecureString password = null) + { + if (!File.Exists(filePath)) + { + throw new FileNotFoundException($"Private key file not found: {filePath}"); + } + + string pemContent = File.ReadAllText(filePath); + return ExtractPrivateKey(pemContent, password); + } + + + + /// + /// Extracts private key supporting PKCS#1 and PKCS#8, encrypted and unencrypted + /// + /// PEM content as string + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + private static RSA ExtractPrivateKey(string pemContent, SecureString password = null) + { + try + { + // First try with PemReader (handles most PEM formats) + var privateKey = ExtractWithPemReader(pemContent, password); + if (privateKey != null) + { + return ConvertToRSA(privateKey); + } + + // If PemReader fails, try manual parsing + return ExtractWithManualParsing(pemContent, password); + } + catch (Exception ex) + { + throw new InvalidOperationException($"Failed to extract private key: {ex.Message}", ex); + } + } + + + /// + /// Extract using PemReader (handles standard PEM formats) + /// + /// PEM content as string + /// Password for encrypted keys (optional, SecureString) + /// BouncyCastle AsymmetricKeyParameter + private static AsymmetricKeyParameter ExtractWithPemReader(string pemContent, SecureString password) + { + try + { + using var stringReader = new StringReader(pemContent); + var pemReader = new PemReader(stringReader, new PasswordFinder(password)); + + var keyObject = pemReader.ReadObject(); + + if (keyObject is AsymmetricCipherKeyPair keyPair) + { + return keyPair.Private; + } + else if (keyObject is AsymmetricKeyParameter keyParam && keyParam.IsPrivate) + { + return keyParam; + } + + return null; + } + catch + { + return null; + } + } + + /// + /// Manual parsing for different key formats + /// + /// PEM content as string + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + private static RSA ExtractWithManualParsing(string pemContent, SecureString password) + { + // Remove PEM headers and decode base64 + var base64Content = ExtractBase64FromPem(pemContent); + var keyBytes = Convert.FromBase64String(base64Content); + + // Determine the key format and handle accordingly + if (IsKeyPkcs8Format(pemContent)) + { + return HandlePkcs8Key(keyBytes, password); + } + else if (IsKeyPkcs1Format(pemContent)) + { + return HandlePkcs1Key(keyBytes, password); + } + else + { + throw new NotSupportedException("Unsupported key format"); + } + } + + /// + /// Check if PEM content is PKCS#8 format + /// + /// PEM content as string + /// True if PKCS#8 format + private static bool IsKeyPkcs8Format(string pemContent) + { + return pemContent.Contains(Constants.PKCS8_PRIVATE_KEY_HEADER) || + pemContent.Contains(Constants.PKCS8_ENCRYPTED_PRIVATE_KEY_HEADER); + } + + /// + /// Handle PKCS#8 format keys (encrypted and unencrypted) + /// + /// Key bytes + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + private static RSA HandlePkcs8Key(byte[] keyBytes, SecureString password) + { + try + { + if (password == null || password.Length == 0) + { + // Unencrypted PKCS#8 + var privateKeyInfo = PrivateKeyInfo.GetInstance(keyBytes); + var privateKey = PrivateKeyFactory.CreateKey(privateKeyInfo); + return ConvertToRSA(privateKey); + } + else + { + // Encrypted PKCS#8 + char[] pwdChars = new System.Net.NetworkCredential(string.Empty, password).Password.ToCharArray(); + var encryptedPrivateKeyInfo = EncryptedPrivateKeyInfo.GetInstance(keyBytes); + var privateKeyInfo = PrivateKeyInfoFactory.CreatePrivateKeyInfo( + pwdChars, encryptedPrivateKeyInfo); + Array.Clear(pwdChars, 0, pwdChars.Length); // Clear password from memory + var privateKey = PrivateKeyFactory.CreateKey(privateKeyInfo); + return ConvertToRSA(privateKey); + } + } + catch (Exception ex) + { + throw new InvalidOperationException($"Possible causes: wrong password, corrupted file, or unsupported format.: {ex.Message}", ex); + } + } + + /// + /// Check if PEM content is PKCS#1 format + /// + /// PEM content as string + /// True if PKCS#1 format + private static bool IsKeyPkcs1Format(string pemContent) + { + return pemContent.Contains(Constants.PKCS1_PRIVATE_KEY_HEADER); + } + + /// + /// Handle PKCS#1 format keys + /// + /// Key bytes + /// Password for encrypted keys (optional, SecureString) + /// RSA private key object + private static RSA HandlePkcs1Key(byte[] keyBytes, SecureString password) + { + try + { + // Parse PKCS#1 RSA private key + var rsaPrivateKey = RsaPrivateKeyStructure.GetInstance(keyBytes); + var rsaParams = new RsaPrivateCrtKeyParameters( + rsaPrivateKey.Modulus, + rsaPrivateKey.PublicExponent, + rsaPrivateKey.PrivateExponent, + rsaPrivateKey.Prime1, + rsaPrivateKey.Prime2, + rsaPrivateKey.Exponent1, + rsaPrivateKey.Exponent2, + rsaPrivateKey.Coefficient); + + return ConvertToRSA(rsaParams); + } + catch (Exception ex) + { + throw new InvalidOperationException($"Possible causes: wrong password, corrupted file, or unsupported format.: {ex.Message}", ex); + } + } + + /// + /// Convert Bouncy Castle RSA parameters to .NET RSA object + /// + /// BouncyCastle AsymmetricKeyParameter + /// .NET RSA object + private static RSA ConvertToRSA(AsymmetricKeyParameter privateKey) + { + if (!(privateKey is RsaPrivateCrtKeyParameters rsaParams)) + { + throw new InvalidOperationException("Key is not an RSA private key"); + } + + var rsa = RSA.Create(); + var parameters = new RSAParameters + { + Modulus = rsaParams.Modulus.ToByteArrayUnsigned(), + Exponent = rsaParams.PublicExponent.ToByteArrayUnsigned(), + D = rsaParams.Exponent.ToByteArrayUnsigned(), + P = rsaParams.P.ToByteArrayUnsigned(), + Q = rsaParams.Q.ToByteArrayUnsigned(), + DP = rsaParams.DP.ToByteArrayUnsigned(), + DQ = rsaParams.DQ.ToByteArrayUnsigned(), + InverseQ = rsaParams.QInv.ToByteArrayUnsigned() + }; + + rsa.ImportParameters(parameters); + return rsa; + } + + /// + /// Extract base64 content from PEM format + /// + /// PEM content as string + /// Base64 string + private static string ExtractBase64FromPem(string pemContent) + { + var lines = pemContent.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + var base64Lines = new System.Collections.Generic.List(); + + bool inKey = false; + foreach (var line in lines) + { + if (line.StartsWith("-----BEGIN")) + { + inKey = true; + continue; + } + if (line.StartsWith("-----END")) + { + break; + } + // Skip encryption headers + if (inKey && !line.StartsWith("Proc-Type:") && !line.StartsWith("DEK-Info:")) + { + base64Lines.Add(line.Trim()); + } + } + + return string.Join("", base64Lines); + } + + /// + /// Password finder for encrypted keys + /// + private class PasswordFinder : IPasswordFinder + { + private readonly SecureString _password; + + /// + /// Initializes a new instance of the PasswordFinder class. + /// + /// Password as SecureString + public PasswordFinder(SecureString password) + { + _password = password; + } + + /// + /// Returns the password as a char array for BouncyCastle + /// + /// Char array of password + public char[] GetPassword() + { + if (_password == null || _password.Length == 0) + { + return null; + } + var pwd = new System.Net.NetworkCredential(string.Empty, _password).Password.ToCharArray(); + return pwd; + } + } + + /// + /// Get detailed information about the extracted key + /// + /// PEM content as string + /// Password for encrypted keys (optional, SecureString) + /// KeyInfo object with details + public static KeyInfo GetKeyInfo(string pemContent, SecureString password = null) + { + using var rsa = ExtractPrivateKey(pemContent, password); + var parameters = rsa.ExportParameters(false); // Export public parameters only for info + + return new KeyInfo + { + KeySize = rsa.KeySize, + KeyFormat = DetermineKeyFormat(pemContent), + IsEncrypted = DetermineIfEncrypted(pemContent), + ModulusSize = parameters.Modulus?.Length * 8 ?? 0 + }; + } + + /// + /// Determines the key format from PEM content + /// + /// PEM content as string + /// Key format string + private static string DetermineKeyFormat(string pemContent) + { + if (IsKeyPkcs8Format(pemContent)) + { + return "PKCS#8"; + } + else if (IsKeyPkcs1Format(pemContent)) + { + return "PKCS#1"; + } + else + { + return "Unknown"; + } + } + + /// + /// Determines if the key is encrypted from PEM content + /// + /// PEM content as string + /// True if encrypted + private static bool DetermineIfEncrypted(string pemContent) + { + return pemContent.Contains(Constants.PKCS8_ENCRYPTED_PRIVATE_KEY_HEADER) || + pemContent.Contains(Constants.PROC_TYPE_ENCRYPTED_HEADER); + } + + } + + /// + /// Information about a cryptographic key + /// + public class KeyInfo + { + public int KeySize { get; set; } + public string KeyFormat { get; set; } + public bool IsEncrypted { get; set; } + public int ModulusSize { get; set; } + + public override string ToString() + { + return $"Key Size: {KeySize} bits, Format: {KeyFormat}, Encrypted: {IsEncrypted}, Modulus: {ModulusSize} bits"; + } + } +} diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs index 1975f563..66f596ed 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Utility.cs @@ -1,46 +1,14 @@ using System; -using System.Collections.Generic; using System.IO; using System.Security; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using System.Text; -using Org.BouncyCastle.Asn1.Pkcs; -using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.Parameters; -using Org.BouncyCastle.OpenSsl; -using Org.BouncyCastle.Pkcs; -using Org.BouncyCastle.Security; namespace AuthenticationSdk.util { public static class Utility { - - public static SecureString ConvertStringToSecureString(string password) - { - if (string.IsNullOrEmpty(password)) - return null; - var securePassword = new SecureString(); - foreach (char c in password) - { - securePassword.AppendChar(c); - } - securePassword.MakeReadOnly(); - return securePassword; - } - /// - /// Checks if the provided string represents a valid boolean value ("true" or "false", case-insensitive). - /// - /// The string to validate. - /// True if the string is "true" or "false" (case-insensitive); otherwise, false. - public static bool IsValidBooleanString(string value) - { - return string.Equals(value, "true", StringComparison.OrdinalIgnoreCase) || - string.Equals(value, "false", StringComparison.OrdinalIgnoreCase); - } - /// /// Reads a private key from a PKCS#12 (.p12 or .pfx) file. /// @@ -99,352 +67,41 @@ public static AsymmetricAlgorithm ReadPrivateKeyFromP12(string p12FilePath, Secu } } - /// - /// Extracts private key supporting PKCS#1 and PKCS#8, encrypted and unencrypted - /// - /// PEM content as string - /// Password for encrypted keys (optional, SecureString) - /// RSA private key object - private static RSA ExtractPrivateKey(string pemContent, SecureString password = null) - { - try - { - // First try with PemReader (handles most PEM formats) - var privateKey = ExtractWithPemReader(pemContent, password); - if (privateKey != null) - { - return ConvertToRSA(privateKey); - } - - // If PemReader fails, try manual parsing - return ExtractWithManualParsing(pemContent, password); - } - catch (Exception ex) - { - throw new InvalidOperationException($"Failed to extract private key: {ex.Message}", ex); - } - } - - /// - /// Extracts private key from file - /// - /// Path to PEM file - /// Password for encrypted keys (optional, SecureString) - /// RSA private key object - public static RSA ExtractPrivateKeyFromFile(string filePath, SecureString password = null) - { - if (!File.Exists(filePath)) - { - throw new FileNotFoundException($"Private key file not found: {filePath}"); - } - - string pemContent = File.ReadAllText(filePath); - return ExtractPrivateKey(pemContent, password); - } - - /// - /// Extract using PemReader (handles standard PEM formats) - /// - /// PEM content as string - /// Password for encrypted keys (optional, SecureString) - /// BouncyCastle AsymmetricKeyParameter - private static AsymmetricKeyParameter ExtractWithPemReader(string pemContent, SecureString password) + public static SecureString ConvertStringToSecureString(string password) { - try - { - using var stringReader = new StringReader(pemContent); - var pemReader = new PemReader(stringReader, new PasswordFinder(password)); - - var keyObject = pemReader.ReadObject(); - - if (keyObject is AsymmetricCipherKeyPair keyPair) - { - return keyPair.Private; - } - else if (keyObject is AsymmetricKeyParameter keyParam && keyParam.IsPrivate) - { - return keyParam; - } - - return null; - } - catch - { + if (string.IsNullOrEmpty(password)) return null; - } - } - - /// - /// Manual parsing for different key formats - /// - /// PEM content as string - /// Password for encrypted keys (optional, SecureString) - /// RSA private key object - private static RSA ExtractWithManualParsing(string pemContent, SecureString password) - { - // Remove PEM headers and decode base64 - var base64Content = ExtractBase64FromPem(pemContent); - var keyBytes = Convert.FromBase64String(base64Content); - - // Determine the key format and handle accordingly - if (IsKeyPkcs8Format(pemContent)) - { - return HandlePkcs8Key(keyBytes, password); - } - else if (IsKeyPkcs1Format(pemContent)) - { - return HandlePkcs1Key(keyBytes, password); - } - else - { - throw new NotSupportedException("Unsupported key format"); - } - } - - /// - /// Check if PEM content is PKCS#8 format - /// - /// PEM content as string - /// True if PKCS#8 format - private static bool IsKeyPkcs8Format(string pemContent) - { - return pemContent.Contains(Constants.PKCS8_PRIVATE_KEY_HEADER) || - pemContent.Contains(Constants.PKCS8_ENCRYPTED_PRIVATE_KEY_HEADER); - } - - /// - /// Handle PKCS#8 format keys (encrypted and unencrypted) - /// - /// Key bytes - /// Password for encrypted keys (optional, SecureString) - /// RSA private key object - private static RSA HandlePkcs8Key(byte[] keyBytes, SecureString password) - { - try - { - if (password == null || password.Length == 0) - { - // Unencrypted PKCS#8 - var privateKeyInfo = PrivateKeyInfo.GetInstance(keyBytes); - var privateKey = PrivateKeyFactory.CreateKey(privateKeyInfo); - return ConvertToRSA(privateKey); - } - else - { - // Encrypted PKCS#8 - char[] pwdChars = new System.Net.NetworkCredential(string.Empty, password).Password.ToCharArray(); - var encryptedPrivateKeyInfo = EncryptedPrivateKeyInfo.GetInstance(keyBytes); - var privateKeyInfo = PrivateKeyInfoFactory.CreatePrivateKeyInfo( - pwdChars, encryptedPrivateKeyInfo); - Array.Clear(pwdChars, 0, pwdChars.Length); // Clear password from memory - var privateKey = PrivateKeyFactory.CreateKey(privateKeyInfo); - return ConvertToRSA(privateKey); - } - } - catch (Exception ex) + var securePassword = new SecureString(); + foreach (char c in password) { - throw new InvalidOperationException($"Possible causes: wrong password, corrupted file, or unsupported format.: {ex.Message}", ex); + securePassword.AppendChar(c); } + securePassword.MakeReadOnly(); + return securePassword; } /// - /// Check if PEM content is PKCS#1 format + /// Checks if the provided string represents a valid boolean value ("true" or "false", case-insensitive). /// - /// PEM content as string - /// True if PKCS#1 format - private static bool IsKeyPkcs1Format(string pemContent) + /// The string to validate. + /// True if the string is "true" or "false" (case-insensitive); otherwise, false. + public static bool IsValidBooleanString(string value) { - return pemContent.Contains(Constants.PKCS1_PRIVATE_KEY_HEADER); + return string.Equals(value, "true", StringComparison.OrdinalIgnoreCase) || + string.Equals(value, "false", StringComparison.OrdinalIgnoreCase); } /// - /// Handle PKCS#1 format keys + /// Extracts private key from file /// - /// Key bytes + /// Path to PEM file /// Password for encrypted keys (optional, SecureString) /// RSA private key object - private static RSA HandlePkcs1Key(byte[] keyBytes, SecureString password) - { - try - { - // Parse PKCS#1 RSA private key - var rsaPrivateKey = RsaPrivateKeyStructure.GetInstance(keyBytes); - var rsaParams = new RsaPrivateCrtKeyParameters( - rsaPrivateKey.Modulus, - rsaPrivateKey.PublicExponent, - rsaPrivateKey.PrivateExponent, - rsaPrivateKey.Prime1, - rsaPrivateKey.Prime2, - rsaPrivateKey.Exponent1, - rsaPrivateKey.Exponent2, - rsaPrivateKey.Coefficient); - - return ConvertToRSA(rsaParams); - } - catch (Exception ex) - { - throw new InvalidOperationException($"Possible causes: wrong password, corrupted file, or unsupported format.: {ex.Message}", ex); - } - } - - /// - /// Convert Bouncy Castle RSA parameters to .NET RSA object - /// - /// BouncyCastle AsymmetricKeyParameter - /// .NET RSA object - private static RSA ConvertToRSA(AsymmetricKeyParameter privateKey) - { - if (!(privateKey is RsaPrivateCrtKeyParameters rsaParams)) - { - throw new InvalidOperationException("Key is not an RSA private key"); - } - - var rsa = RSA.Create(); - var parameters = new RSAParameters - { - Modulus = rsaParams.Modulus.ToByteArrayUnsigned(), - Exponent = rsaParams.PublicExponent.ToByteArrayUnsigned(), - D = rsaParams.Exponent.ToByteArrayUnsigned(), - P = rsaParams.P.ToByteArrayUnsigned(), - Q = rsaParams.Q.ToByteArrayUnsigned(), - DP = rsaParams.DP.ToByteArrayUnsigned(), - DQ = rsaParams.DQ.ToByteArrayUnsigned(), - InverseQ = rsaParams.QInv.ToByteArrayUnsigned() - }; - - rsa.ImportParameters(parameters); - return rsa; - } - - /// - /// Extract base64 content from PEM format - /// - /// PEM content as string - /// Base64 string - private static string ExtractBase64FromPem(string pemContent) - { - var lines = pemContent.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); - var base64Lines = new System.Collections.Generic.List(); - - bool inKey = false; - foreach (var line in lines) - { - if (line.StartsWith("-----BEGIN")) - { - inKey = true; - continue; - } - if (line.StartsWith("-----END")) - { - break; - } - // Skip encryption headers - if (inKey && !line.StartsWith("Proc-Type:") && !line.StartsWith("DEK-Info:")) - { - base64Lines.Add(line.Trim()); - } - } - - return string.Join("", base64Lines); - } - - /// - /// Password finder for encrypted keys - /// - private class PasswordFinder : IPasswordFinder - { - private readonly SecureString _password; - - /// - /// Initializes a new instance of the PasswordFinder class. - /// - /// Password as SecureString - public PasswordFinder(SecureString password) - { - _password = password; - } - - /// - /// Returns the password as a char array for BouncyCastle - /// - /// Char array of password - public char[] GetPassword() - { - if (_password == null || _password.Length == 0) - { - return null; - } - var pwd = new System.Net.NetworkCredential(string.Empty, _password).Password.ToCharArray(); - return pwd; - } - } - - /// - /// Get detailed information about the extracted key - /// - /// PEM content as string - /// Password for encrypted keys (optional, SecureString) - /// KeyInfo object with details - public static KeyInfo GetKeyInfo(string pemContent, SecureString password = null) + public static RSA ExtractPrivateKeyFromFile(string filePath, SecureString password = null) { - using var rsa = ExtractPrivateKey(pemContent, password); - var parameters = rsa.ExportParameters(false); // Export public parameters only for info - - return new KeyInfo - { - KeySize = rsa.KeySize, - KeyFormat = DetermineKeyFormat(pemContent), - IsEncrypted = DetermineIfEncrypted(pemContent), - ModulusSize = parameters.Modulus?.Length * 8 ?? 0 - }; + return PEMUtility.ExtractPrivateKeyFromFile(filePath, password); } - /// - /// Determines the key format from PEM content - /// - /// PEM content as string - /// Key format string - private static string DetermineKeyFormat(string pemContent) - { - if (IsKeyPkcs8Format(pemContent)) - { - return "PKCS#8"; - } - else if (IsKeyPkcs1Format(pemContent)) - { - return "PKCS#1"; - } - else - { - return "Unknown"; - } - } - - /// - /// Determines if the key is encrypted from PEM content - /// - /// PEM content as string - /// True if encrypted - private static bool DetermineIfEncrypted(string pemContent) - { - return pemContent.Contains(Constants.PKCS8_ENCRYPTED_PRIVATE_KEY_HEADER) || - pemContent.Contains(Constants.PROC_TYPE_ENCRYPTED_HEADER); - } } - /// - /// Information about a cryptographic key - /// - public class KeyInfo - { - public int KeySize { get; set; } - public string KeyFormat { get; set; } - public bool IsEncrypted { get; set; } - public int ModulusSize { get; set; } - - public override string ToString() - { - return $"Key Size: {KeySize} bits, Format: {KeyFormat}, Encrypted: {IsEncrypted}, Modulus: {ModulusSize} bits"; - } - } } From 524dbf50e960e8895d7253bc27ec59978808c8d4 Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Mon, 6 Oct 2025 22:15:06 +0530 Subject: [PATCH 35/41] proper error handling --- .../AuthenticationSdk/util/PEMUtility.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs index 556546da..de84ba94 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs @@ -26,8 +26,15 @@ public static RSA ExtractPrivateKeyFromFile(string filePath, SecureString passwo throw new FileNotFoundException($"Private key file not found: {filePath}"); } - string pemContent = File.ReadAllText(filePath); - return ExtractPrivateKey(pemContent, password); + try + { + string pemContent = File.ReadAllText(filePath); + return ExtractPrivateKey(pemContent, password); + } + catch (Exception ex) + { + throw new InvalidOperationException($"Failed to read or extract private key from file: {ex.Message}", ex); + } } From 40165ed0ba9aef3525f9e69174cdff846693fdee Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Wed, 8 Oct 2025 16:59:27 +0530 Subject: [PATCH 36/41] fixed checkmarx findings --- .../AuthenticationSdk/core/MerchantConfig.cs | 16 ++++- .../AuthenticationSdk/util/Constants.cs | 2 - .../AuthenticationSdk/util/Enumerations.cs | 2 +- .../AuthenticationSdk/util/PEMUtility.cs | 71 +------------------ .../Client/ApiClient.cs | 12 +++- .../ApiClient.mustache | 12 +++- 6 files changed, 37 insertions(+), 78 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs index 0793fb1a..4350a12a 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/core/MerchantConfig.cs @@ -44,7 +44,21 @@ public MerchantConfig(IReadOnlyDictionary merchantConfigDictiona else { // MerchantConfig section inside App.Config File - var merchantConfigSection = (NameValueCollection)ConfigurationManager.GetSection("MerchantConfig"); + NameValueCollection merchantConfigSection = null; + try + { + merchantConfigSection = (NameValueCollection)ConfigurationManager.GetSection("MerchantConfig"); + } + catch (ConfigurationErrorsException ex) + { + Logger.Error($"Error accessing MerchantConfig section in App.Config: {ex.Message}"); + throw new Exception($"{Constants.ErrorPrefix} Error accessing MerchantConfig section in App.Config: {ex.Message}", ex); + } + catch (Exception ex) + { + Logger.Error($"Unexpected error accessing MerchantConfig section in App.Config: {ex.Message}"); + throw new Exception($"{Constants.ErrorPrefix} Unexpected error accessing MerchantConfig section in App.Config: {ex.Message}", ex); + } if (merchantConfigSection != null) { diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs index a87243e5..072f9b57 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs @@ -60,7 +60,5 @@ public static class Constants public static readonly string PKCS1_PRIVATE_KEY_HEADER = "-----BEGIN RSA PRIVATE KEY-----"; - public static readonly string PROC_TYPE_ENCRYPTED_HEADER = "Proc-Type: 4,ENCRYPTED"; - } } diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Enumerations.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Enumerations.cs index 338d0562..b4f57e2a 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Enumerations.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Enumerations.cs @@ -35,7 +35,7 @@ public static bool ValidateAuthenticationType(string authType) return true; } - throw new Exception($"{Constants.ErrorPrefix}Invalid Auth type {authType} provided in config file"); + throw new Exception($"{Constants.ErrorPrefix}Invalid Auth type provided in config file"); } public static bool ValidateRequestType(string requestType) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs index de84ba94..efdcb015 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs @@ -298,78 +298,9 @@ public char[] GetPassword() { return null; } - var pwd = new System.Net.NetworkCredential(string.Empty, _password).Password.ToCharArray(); - return pwd; + return new System.Net.NetworkCredential(string.Empty, _password).Password.ToCharArray(); } } - /// - /// Get detailed information about the extracted key - /// - /// PEM content as string - /// Password for encrypted keys (optional, SecureString) - /// KeyInfo object with details - public static KeyInfo GetKeyInfo(string pemContent, SecureString password = null) - { - using var rsa = ExtractPrivateKey(pemContent, password); - var parameters = rsa.ExportParameters(false); // Export public parameters only for info - - return new KeyInfo - { - KeySize = rsa.KeySize, - KeyFormat = DetermineKeyFormat(pemContent), - IsEncrypted = DetermineIfEncrypted(pemContent), - ModulusSize = parameters.Modulus?.Length * 8 ?? 0 - }; - } - - /// - /// Determines the key format from PEM content - /// - /// PEM content as string - /// Key format string - private static string DetermineKeyFormat(string pemContent) - { - if (IsKeyPkcs8Format(pemContent)) - { - return "PKCS#8"; - } - else if (IsKeyPkcs1Format(pemContent)) - { - return "PKCS#1"; - } - else - { - return "Unknown"; - } - } - - /// - /// Determines if the key is encrypted from PEM content - /// - /// PEM content as string - /// True if encrypted - private static bool DetermineIfEncrypted(string pemContent) - { - return pemContent.Contains(Constants.PKCS8_ENCRYPTED_PRIVATE_KEY_HEADER) || - pemContent.Contains(Constants.PROC_TYPE_ENCRYPTED_HEADER); - } - - } - - /// - /// Information about a cryptographic key - /// - public class KeyInfo - { - public int KeySize { get; set; } - public string KeyFormat { get; set; } - public bool IsEncrypted { get; set; } - public int ModulusSize { get; set; } - - public override string ToString() - { - return $"Key Size: {KeySize} bits, Format: {KeyFormat}, Encrypted: {IsEncrypted}, Modulus: {ModulusSize} bits"; - } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs index 102a3c98..6cdcd2ff 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Client/ApiClient.cs @@ -642,8 +642,16 @@ public object Deserialize(RestResponse response, Type type, MerchantConfig merch if (match.Success) { string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); + try + { + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + catch (Exception ex) + { + logger.Error($"Error writing file '{fileName}': {ex.Message}"); + throw new Exception($"Error writing file '{fileName}': {ex.Message}"); + } } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache index 322ed432..27a1977c 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache @@ -696,8 +696,16 @@ namespace {{packageName}}.Client if (match.Success) { string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); + try + { + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + catch (Exception ex) + { + logger.Error($"Error writing file '{fileName}': {ex.Message}"); + throw new Exception($"Error writing file '{fileName}': {ex.Message}"); + } } } } From e9ea9ad54777448ea3965ff8b3b0716090be44ff Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Thu, 9 Oct 2025 09:27:53 +0530 Subject: [PATCH 37/41] made code same as dotnet --- .../AuthenticationSdk/util/PEMUtility.cs | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs index efdcb015..f4da9ede 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/PEMUtility.cs @@ -76,21 +76,23 @@ private static AsymmetricKeyParameter ExtractWithPemReader(string pemContent, Se { try { - using var stringReader = new StringReader(pemContent); - var pemReader = new PemReader(stringReader, new PasswordFinder(password)); + using (var stringReader = new StringReader(pemContent)) + { + var pemReader = new PemReader(stringReader, new PasswordFinder(password)); - var keyObject = pemReader.ReadObject(); + var keyObject = pemReader.ReadObject(); - if (keyObject is AsymmetricCipherKeyPair keyPair) - { - return keyPair.Private; - } - else if (keyObject is AsymmetricKeyParameter keyParam && keyParam.IsPrivate) - { - return keyParam; - } + if (keyObject is AsymmetricCipherKeyPair keyPair) + { + return keyPair.Private; + } + else if (keyObject is AsymmetricKeyParameter keyParam && keyParam.IsPrivate) + { + return keyParam; + } - return null; + return null; + } } catch { @@ -303,4 +305,4 @@ public char[] GetPassword() } } -} +} \ No newline at end of file From eea5b1b38b7978692181522d34dc4a7aa779a2e2 Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Fri, 17 Oct 2025 10:19:37 +0530 Subject: [PATCH 38/41] removed unused line of code --- .../AuthenticationSdk/AuthenticationSdk/util/Cache.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs index da7de9de..5f3ca88f 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Cache.cs @@ -314,7 +314,6 @@ public static AsymmetricAlgorithm GetMleResponsePrivateKeyFromFilePath(MerchantC try { - RSA privateKey = (RSA)cachedResponseMlePrivateKeyInfo.PrivateKey; return cachedResponseMlePrivateKeyInfo.PrivateKey; } catch (Exception ex) From e750a78dd1cd2e20b854df0a9566a6288851992d Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Fri, 17 Oct 2025 16:53:56 +0530 Subject: [PATCH 39/41] masked sensitive information in response MLE logs --- .../AuthenticationSdk/AuthenticationSdk/util/Constants.cs | 4 ++++ .../AuthenticationSdk/util/LogUtility.cs | 8 ++++++++ .../AuthenticationSdk/util/MLEUtility.cs | 4 ++-- .../util/SensitiveDataConfigurationType.cs | 3 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs index 072f9b57..3b15811f 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/Constants.cs @@ -60,5 +60,9 @@ public static class Constants public static readonly string PKCS1_PRIVATE_KEY_HEADER = "-----BEGIN RSA PRIVATE KEY-----"; + public static readonly string LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION = "LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION: "; + + public static readonly string LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION = "LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION: "; + } } diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/LogUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/LogUtility.cs index e3b2b67b..0c80ecd1 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/LogUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/LogUtility.cs @@ -57,6 +57,14 @@ public string MaskSensitiveData(string str) { return Constants.LOG_REQUEST_AFTER_MLE + MaskSensitiveData(str.Substring(Constants.LOG_REQUEST_AFTER_MLE.Length)); } + if (str.StartsWith(Constants.LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION)) + { + return Constants.LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION + MaskSensitiveData(str.Substring(Constants.LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION.Length)); + } + if (str.StartsWith(Constants.LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION)) + { + return Constants.LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION + MaskSensitiveData(str.Substring(Constants.LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION.Length)); + } bool isJsonString; try diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs index bfe6a42e..21ed038f 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/MLEUtility.cs @@ -231,7 +231,7 @@ public static string DecryptMleResponsePayload(MerchantConfig merchantConfig, st try { - logger.Debug("LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION: " + mleResponseBody); + logUtility.LogDebugMessage(logger, Constants.LOG_NETWORK_RESPONSE_BEFORE_MLE_DECRYPTION + mleResponseBody); // Convert AsymmetricAlgorithm to RSA if needed RSA rsaKey = mlePrivateKey as RSA; @@ -240,7 +240,7 @@ public static string DecryptMleResponsePayload(MerchantConfig merchantConfig, st throw new Exception("MLE Response private key is not an RSA key. Only RSA keys are supported for MLE decryption."); } string decryptedResponse = JWEUtilty.DecryptUsingRSAParameters(rsaKey.ExportParameters(true), jweResponseToken); - logger.Debug("LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION: " + decryptedResponse); + logUtility.LogDebugMessage(logger, Constants.LOG_NETWORK_RESPONSE_AFTER_MLE_DECRYPTION + decryptedResponse); return decryptedResponse; } catch (Jose.JoseException e) diff --git a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/SensitiveDataConfigurationType.cs b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/SensitiveDataConfigurationType.cs index 0b9ca3f6..9b00d868 100644 --- a/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/SensitiveDataConfigurationType.cs +++ b/cybersource-rest-auth-netstandard/AuthenticationSdk/AuthenticationSdk/util/SensitiveDataConfigurationType.cs @@ -21,7 +21,8 @@ public class SensitiveDataConfigurationType new SensitiveTag("signature", "", "", false), new SensitiveTag("prefix", "", "", false), new SensitiveTag("bin", "", "", false), - new SensitiveTag("encryptedRequest", "", "", false) + new SensitiveTag("encryptedRequest", "", "", false), + new SensitiveTag("encryptedResponse", "", "", false) }; public static AuthenticationSchemeTag[] authenticationTags = new AuthenticationSchemeTag[] From ef119718ea14fd37f6b3f186fdae755d271f5abc Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Sat, 18 Oct 2025 13:59:49 +0530 Subject: [PATCH 40/41] updated MLE.md --- cybersource-rest-client-netstandard/MLE.md | 598 +++++++++++++++++---- 1 file changed, 505 insertions(+), 93 deletions(-) diff --git a/cybersource-rest-client-netstandard/MLE.md b/cybersource-rest-client-netstandard/MLE.md index 2ecb7423..55a63dc0 100644 --- a/cybersource-rest-client-netstandard/MLE.md +++ b/cybersource-rest-client-netstandard/MLE.md @@ -4,110 +4,522 @@ This feature provides an implementation of Message Level Encryption (MLE) for APIs provided by CyberSource, integrated within our SDK. This feature ensures secure communication by encrypting messages at the application level before they are sent over the network. +MLE supports both **Request Encryption** (encrypting outgoing request payloads) and **Response Decryption** (decrypting incoming response payloads). + +## Authentication Requirements + +- **Request MLE**: Only supported with `JWT (JSON Web Token)` authentication type +- **Response MLE**: Only supported with `JWT (JSON Web Token)` authentication type + +
+ ## Configuration -### Global MLE Configuration +## 1. Request MLE Configuration + +#### 1.1 Global Request MLE Configuration -In the `merchantConfig` object, set the `useMLEGlobally` variable to enable or disable MLE for all supported APIs for the Rest SDK. +Configure global settings for request MLE using these properties in your `merchantConfig`: -- **Variable**: `useMLEGlobally` -- **Type**: `boolean` +##### (i) Primary Configuration + +- **Variable**: `enableRequestMLEForOptionalApisGlobally` +- **Type**: `bool` - **Default**: `false` -- **Description**: Enables MLE globally for all APIs when set to `true`. If set to `true`, it will enable MLE for all API calls that support MLE by CyberSource, unless overridden by `mapToControlMLEonAPI`. +- **Description**: Enables request MLE globally for all APIs that have optional MLE support when set to `true`. -### API-level MLE Control +--- -Optionally, you can control the MLE feature at the API level using the `mapToControlMLEonAPI` variable in the `merchantConfig` object. +##### (ii) Deprecated Configuration (Backward Compatibility) -- **Variable**: `mapToControlMLEonAPI` -- **Type**: `Dictionary` -- **Description**: Overrides the global MLE setting for specific APIs. The key is the function name of the API in the SDK, and the value is a boolean indicating whether MLE should be enabled (`true`) or disabled (`false`) for that specific API call. +- **Variable**: `useMLEGlobally` ⚠️ **DEPRECATED** +- **Type**: `bool` +- **Default**: `false` +- **Description**: **DEPRECATED** - Use `enableRequestMLEForOptionalApisGlobally` instead. This field is maintained for backward compatibility and will be used as an alias for `enableRequestMLEForOptionalApisGlobally`. + +--- + +##### (iii) Advanced Configuration + +- **Variable**: `disableRequestMLEForMandatoryApisGlobally` +- **Type**: `bool` +- **Default**: `false` +- **Description**: Disables request MLE for APIs that have mandatory MLE requirement when set to `true`. + +--- + +#### 1.2 Request MLE Certificate Configuration [Optional Params] + +##### (i) Certificate File Path (Optional) + +- **Variable**: `mleForRequestPublicCertPath` +- **Type**: `string` +- **Optional**: `true` +- **Description**: Path to the public certificate file used for request encryption. Supported formats: `.pem`, `.crt`. + - **Note**: This parameter is optional when using JWT authentication. If not provided, the request MLE certificate will be automatically fetched from the JWT authentication P12 file using the `requestMleKeyAlias`. + +--- -### MLE Key Alias +##### (ii) Key Alias Configuration (Optional) -Another optional parameter for MLE is `mleKeyAlias`, which specifies the key alias used to retrieve the MLE certificate from the JWT P12 file. +- **Variable**: `requestMleKeyAlias` +- **Type**: `string` +- **Optional**: `true` +- **Default**: `CyberSource_SJC_US` +- **Description**: Key alias used to retrieve the MLE certificate from the certificate file. When `mleForRequestPublicCertPath` is not provided, this alias is used to fetch the certificate from the JWT authentication P12 file. If not specified, the SDK will automatically use the default value `CyberSource_SJC_US`. + +--- -- **Variable**: `mleKeyAlias` +##### (iii) Deprecated Key Alias (Backward Compatibility) (Optional) + +- **Variable**: `mleKeyAlias` ⚠️ **DEPRECATED** - **Type**: `string` +- **Optional**: `true` - **Default**: `CyberSource_SJC_US` -- **Description**: By default, CyberSource uses the `CyberSource_SJC_US` public certificate to encrypt the payload. However, users can override this default value by setting their own key alias. - -## Notes -- If `useMLEGlobally` is set to true, it will enable MLE for all API calls that support MLE by CyberSource, unless overridden by mapToControlMLEonAPI. -- If `mapToControlMLEonAPI` is not provided or does not contain a specific API function name, the global useMLEGlobally setting will be applied. -- The `mleKeyAlias` parameter is optional and defaults to CyberSource_SJC_US if not specified by the user. Users can override this default value by setting their own key alias. - -## Example Configuration - - private readonly Dictionary _configurationDictionary = new Dictionary(); - - public Dictionary GetConfiguration() - { - _configurationDictionary.Add("authenticationType", "JWT"); - _configurationDictionary.Add("useMLEGlobally", "true"); //globally MLE will be enabled for all the MLE supported APIs by Cybs in SDK - _configurationDictionary.Add("mleKeyAlias", "CyberSource_SJC_US"); //this is optional paramter, not required to set the parameter/value if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - //other properties - } - -Or - - private readonly Dictionary _configurationDictionary = new Dictionary(); - private readonly Dictionary _configurationDictionaryforMLE = new Dictionary(); - - public Dictionary GetMapToControlMLE() - { - _configurationDictionaryforMLE.Add("CreatePayment", true); //CreatePayment function will have MLE=true i.e. (/pts/v2/payments POST API) - _configurationDictionaryforMLE.Add("CapturePayment", false); //capturePayment function will have MLE=false i.e. (/pts/v2/payments/{id}/captures POST API) - - return _configurationDictionaryforMLE; - } - - public Dictionary GetConfiguration() - { - _configurationDictionary.Add("authenticationType", "JWT"); - _configurationDictionary.Add("useMLEGlobally", "true"); //globally MLE will be enabled for all the MLE supported APIs by Cybs in SDK except the APIs marked false in GetMapToControlMLE. - _configurationDictionary.Add("mleKeyAlias", "CyberSource_SJC_US"); //this is optional paramter, not required to set the parameter/value if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - //other properties - } - -Or - - private readonly Dictionary _configurationDictionary = new Dictionary(); - private readonly Dictionary _configurationDictionaryforMLE = new Dictionary(); - - public Dictionary GetMapToControlMLE() - { - _configurationDictionaryforMLE.Add("CreatePayment", true); //CreatePayment function will have MLE=true i.e. (/pts/v2/payments POST API) - _configurationDictionaryforMLE.Add("CapturePayment", false); //capturePayment function will have MLE=false i.e. (/pts/v2/payments/{id}/captures POST API) - - return _configurationDictionaryforMLE; - } - - public Dictionary GetConfiguration() - { - _configurationDictionary.Add("authenticationType", "JWT"); - _configurationDictionary.Add("useMLEGlobally", "false"); //globally MLE will be disabled for all the MLE supported APIs by Cybs in SDK, the APIs marked true in GetMapToControlMLE will only have MLE enabled. - _configurationDictionary.Add("mleKeyAlias", "CyberSource_SJC_US"); //this is optional paramter, not required to set the parameter/value if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - //other properties - } - -In the above example: -- MLE is enabled/disabled globally (`useMLEGlobally` is true/false). -- `apiFunctionName1` i.e "CapturePayment" will have MLE disabled/enabled based on value provided. -- `apiFunctionName2` i.e. "CreatePayment" will have MLE enabled. -- `mleKeyAlias` is set to `Custom_Key_Alias`, overriding the default value. - -Please refer given link for sample codes with MLE: https://github.com/CyberSource/cybersource-rest-samples-csharp/tree/master/Source/Samples/MLEFeature - -## Additional Information - -### API Support -- MLE is initially designed to support a few APIs. -- It can be extended to support more APIs in the future based on requirements and updates. -### Authentication Type -- MLE is only supported with `JWT (JSON Web Token)` authentication type within the SDK. -### Using the SDK -To use the MLE feature in the SDK, configure the `merchantConfig` object as shown above and pass it to the SDK initialization. - -## Contact +- **Description**: **DEPRECATED** - Use `requestMleKeyAlias` instead. This field is maintained for backward compatibility and will be used as an alias for `requestMleKeyAlias`. + +
+ +## 2. Response MLE Configuration + +#### 2.1 Global Response MLE Configuration + +- **Variable**: `enableResponseMleGlobally` +- **Type**: `bool` +- **Default**: `false` +- **Description**: Enables response MLE globally for all APIs that support MLE responses when set to `true`. + +---- + +#### 2.2 Response MLE Private Key Configuration + +##### (i) Option 1: Provide Private Key Object + +- **Variable**: `responseMlePrivateKey` +- **Type**: `AsymmetricAlgorithm` +- **Description**: Direct private key object for response decryption. + +--- + +##### (ii) Option 2: Provide Private Key File Path + +- **Variable**: `responseMlePrivateKeyFilePath` +- **Type**: `string` +- **Description**: Path to the private key file. Supported formats: `.p12`, `.pfx`, `.pem`, `.key`, `.p8`. Recommendation use encrypted private Key (password protection) for MLE response. + +--- + +##### (iii) Private Key File Password + +- **Variable**: `responseMlePrivateKeyFilePassword` +- **Type**: `String` +- **Description**: Password for the private key file (required for `.p12/.pfx` files or encrypted private keys). + +--- + +#### 2.3 Response MLE Additional Configuration + +- **Variable**: `responseMleKID` +- **Type**: `string` +- **Required**: `true` (when response MLE is enabled) +- **Description**: Key ID value for the MLE response certificate (provided in merchant portal). + +
+ +## 3. API-level MLE Control for Request and Response MLE + +### Dictionary Configuration + +- **Variable**: `mapToControlMLEonAPI` +- **Type**: `Dictionary` +- **Description**: Overrides global MLE settings for specific APIs. The key is the API function name, and the value controls both request and response MLE. +- **Example**: `Dictionary { {"apiFunctionName", "true::true"} }` + +#### Structure of Values in Dictionary: + +(i) **"requestMLE::responseMLE"** - Control both request and response MLE + - `"true::true"` - Enable both request and response MLE + - `"false::false"` - Disable both request and response MLE + - `"true::false"` - Enable request MLE, disable response MLE + - `"false::true"` - Disable request MLE, enable response MLE + - `"::true"` - Use global setting for request, enable response MLE + - `"true::"` - Enable request MLE, use global setting for response + - `"::false"` - Use global setting for request, disable response MLE + - `"false::"` - Disable request MLE, use global setting for response + +(ii) **"requestMLE"** - Control request MLE only (response uses global setting) + - `"true"` - Enable request MLE + - `"false"` - Disable request MLE + +
+ +## 4. Example Configurations + +### (i) Minimal Request MLE Configuration + +```csharp +// Dictionary-based configuration - Uses defaults (most common scenario) +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + // Both mleForRequestPublicCertPath and requestMleKeyAlias are optional + // SDK will use JWT P12 file with default alias "CyberSource_SJC_US" + + return _configurationDictionary; +} +``` + +### (ii) Request MLE with Deprecated Parameters (Backward Compatibility) + +```csharp +// Using deprecated parameters - still supported but not recommended +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("useMLEGlobally", "true"); // Deprecated - use enableRequestMLEForOptionalApisGlobally + _configurationDictionary.Add("mleKeyAlias", "Custom_Key_Alias"); // Deprecated - use requestMleKeyAlias + + return _configurationDictionary; +} +``` + +### (iii) Request MLE with Custom Key Alias + +```csharp +// Dictionary-based configuration - With custom key alias only +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + _configurationDictionary.Add("requestMleKeyAlias", "Custom_Key_Alias"); + // Will fetch from JWT P12 file using custom alias + + return _configurationDictionary; +} +``` + +### (iv) Request MLE with Separate Certificate File + +```csharp +// Dictionary-based configuration - With separate MLE certificate file +private readonly Dictionary _configurationDictionary = new Dictionary(); +private readonly Dictionary _mleControlDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + _configurationDictionary.Add("mleForRequestPublicCertPath", "C:\path\to\public\cert.pem"); + _configurationDictionary.Add("requestMleKeyAlias", "Custom_Key_Alias"); + + return _configurationDictionary; +} + +public Dictionary GetMLEControlMap() +{ + _mleControlDictionary.Add("CreatePayment", "true"); // Enable request MLE for this API + _mleControlDictionary.Add("CapturePayment", "false"); // Disable request MLE for this API + + return _mleControlDictionary; +} +``` + +### (v) Response MLE Configuration with Private Key File + +```csharp +// Dictionary-based configuration +private readonly Dictionary _configurationDictionary = new Dictionary(); +private readonly Dictionary _mleControlDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableResponseMleGlobally", "true"); + _configurationDictionary.Add("responseMlePrivateKeyFilePath", "C:\path\to\private\key.p12"); + _configurationDictionary.Add("responseMlePrivateKeyFilePassword", "password"); + _configurationDictionary.Add("responseMleKID", "your-key-id"); + + return _configurationDictionary; +} + +public Dictionary GetMLEControlMap() +{ + _mleControlDictionary.Add("CreatePayment", "::true"); // Enable response MLE only for this API + + return _mleControlDictionary; +} +``` + +### (vi) Response MLE Configuration with Private Key Object + +```csharp +// Load private key programmatically +AsymmetricAlgorithm privateKey = LoadPrivateKeyFromSomewhere(); + +// Dictionary-based configuration +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + _configurationDictionary.Add("enableResponseMleGlobally", "true"); + _configurationDictionary.Add("responseMleKID", "your-key-id"); + + return _configurationDictionary; +} + +// Use constructor that accepts private key object +MerchantConfig merchantConfig = new MerchantConfig(GetConfiguration(), null, privateKey); +``` + +### (vii) Both Request and Response MLE Configuration + +```csharp +// Dictionary-based configuration +private readonly Dictionary _configurationDictionary = new Dictionary(); +private readonly Dictionary _mleControlDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + + // Request MLE settings (minimal - uses defaults) + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + + // Response MLE settings + _configurationDictionary.Add("enableResponseMleGlobally", "true"); + _configurationDictionary.Add("responseMlePrivateKeyFilePath", @"C:\path\to\private\key.p12"); + _configurationDictionary.Add("responseMlePrivateKeyFilePassword", "password"); + _configurationDictionary.Add("responseMleKID", "your-key-id"); + + return _configurationDictionary; +} + +public Dictionary GetMLEControlMap() +{ + _mleControlDictionary.Add("CreatePayment", "true::true"); // Enable both request and response MLE for this API + _mleControlDictionary.Add("CapturePayment", "false::true"); // Disable request, enable response MLE for this API + _mleControlDictionary.Add("RefundPayment", "true::false"); // Enable request, disable response MLE for this API + _mleControlDictionary.Add("CreateCredit", "::true"); // Use global request setting, enable response MLE for this API + + return _mleControlDictionary; +} +``` + +### (viii) Mixed Configuration (New and Deprecated Parameters) + +```csharp +// Example showing both new and deprecated parameters (deprecated will be used as aliases) +private readonly Dictionary _configurationDictionary = new Dictionary(); + +public Dictionary GetConfiguration() +{ + _configurationDictionary.Add("authenticationType", "JWT"); + + // If both are set with same value, it works fine + _configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); + _configurationDictionary.Add("useMLEGlobally", "true"); // Deprecated but same value + + // If both are set with different values, it will cause ConfigException + + // Key alias - new parameter takes precedence if both are provided + _configurationDictionary.Add("requestMleKeyAlias", "New_Alias"); + _configurationDictionary.Add("mleKeyAlias", "Old_Alias"); // This will be ignored + + return _configurationDictionary; +} +``` + +
+ +## 5. App.Config Configuration Examples + +### (i) Minimal Request MLE + +```xml + + +
+ + + + + + +``` + +### (ii) Request MLE with Deprecated Parameters + +```xml + + +
+ + + + + + + +``` + +### (iii) Request MLE with Custom Configuration + +```xml + + +
+ + + + + + + + +``` + +### (iv) Response MLE Only + +```xml + + +
+ + + + + + + + + +``` + +### (v) Both Request and Response MLE + +```xml + + +
+ + + + + + + + + + +``` + +
+ +## 6. Supported Private Key File Formats + +For Response MLE private key files, the following formats are supported: + +- **PKCS#12**: `.p12`, `.pfx` (requires password) +- **PEM**: `.pem`, `.key`, `.p8` (supports both encrypted and unencrypted) + +
+ +## 7. Important Notes + +### (i) Request MLE +- Both `mleForRequestPublicCertPath` and `requestMleKeyAlias` are **optional** parameters +- If `mleForRequestPublicCertPath` is not provided, the SDK will automatically fetch the MLE certificate from the JWT authentication P12 file +- If `requestMleKeyAlias` is not provided, the SDK will use the default value `CyberSource_SJC_US` +- The SDK provides flexible configuration options: you can use defaults, customize the key alias only, or provide a separate certificate file +- If `enableRequestMLEForOptionalApisGlobally` is set to `true`, it enables request MLE for all APIs that have optional MLE support +- APIs with mandatory MLE requirements are enabled by default unless `disableRequestMLEForMandatoryApisGlobally` is set to `true` +- If `mapToControlMLEonAPI` doesn't contain a specific API, the global setting applies +- For HTTP Signature authentication, request MLE will fall back to non-encrypted requests with a warning + +### (ii) Response MLE +- Response MLE requires either `responseMlePrivateKey` object OR `responseMlePrivateKeyFilePath` (not both) +- The `responseMleKID` parameter is mandatory when response MLE is enabled +- If an API expects a mandatory MLE response but the map specifies non-MLE response, the API might return an error +- Both the private key object and file path approaches are mutually exclusive +- `responseMlePrivateKeyFilePassword` uses `SecureString` type for enhanced security + +### (iii) Backward Compatibility +- `useMLEGlobally` is **deprecated** but still supported as an alias for `enableRequestMLEForOptionalApisGlobally` + +- If `useMLEGlobally` and `enableRequestMLEForOptionalApisGlobally` are provided with **different values**, it will cause a `ConfigException` +- `mleKeyAlias` is **deprecated** but still supported as an alias for `requestMleKeyAlias` +- When both `mleKeyAlias` and `requestMleKeyAlias` are provided, the **`requestMleKeyAlias`** takes precedence + +### (iv) API-level Control Validation +- The `mapToControlMLEonAPI` values are validated for proper format +- Invalid formats (empty values, multiple separators, non-boolean values) will cause configuration errors +- Empty string after or before `::` separator will use global defaults + + +### (v) Configuration Validation +- The SDK performs comprehensive validation of MLE configuration parameters +- Conflicting values between new and deprecated parameters will result in `ConfigException` +- File path validation is performed for certificate and private key files +- Invalid boolean values in `mapToControlMLEonAPI` will cause parsing errors + +
+ +## 8. Error Handling + +The SDK provides specific error messages for common MLE issues: +- Invalid private key for response decryption +- Missing certificates for request encryption +- Invalid file formats or paths +- Authentication type mismatches +- Configuration validation errors +- Conflicting parameter values between new and deprecated fields +- Invalid format in `mapToControlMLEonAPI` values + +
+ +## 9. Sample Code Repository + +For comprehensive examples and sample implementations, please refer to: +[Cybersource .NET Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-csharp) + +
+ +## 10. Additional Information + +### (i) API Support +- MLE is designed to support specific APIs that have been enabled for encryption +- Support can be extended to additional APIs based on requirements and updates + +### (ii) Using the SDK +To use the MLE feature in the SDK, configure the `merchantConfig` object as shown above and pass it to the SDK initialization. The SDK will automatically handle encryption and decryption based on your configuration. + + + +### (iii) Migration from Deprecated Parameters + +If you're currently using deprecated parameters, here's how to migrate: + +```csharp +// OLD (Deprecated) +_configurationDictionary.Add("useMLEGlobally", "true"); +_configurationDictionary.Add("mleKeyAlias", "Custom_Alias"); + +// NEW (Recommended) +_configurationDictionary.Add("enableRequestMLEForOptionalApisGlobally", "true"); +_configurationDictionary.Add("requestMleKeyAlias", "Custom_Alias"); +``` + +The deprecated parameters will continue to work but are not recommended for new implementations. + +
+ +## 11. Contact For any issues or further assistance, please open an issue on the GitHub repository or contact our support team. From 9576b20fee298f69edd09f9b89da69115c57b16a Mon Sep 17 00:00:00 2001 From: "Goel, Aastvik" Date: Thu, 27 Nov 2025 11:08:27 +0530 Subject: [PATCH 41/41] regenerated the SDK code after merging future --- .../Api/BankAccountValidationApi.cs | 16 +++-- .../Api/BatchesApi.cs | 12 ++-- .../Api/CreateNewWebhooksApi.cs | 4 +- .../Api/DeviceDeAssociationApi.cs | 4 +- .../Api/DeviceSearchApi.cs | 8 +-- .../Api/ManageWebhooksApi.cs | 8 +-- .../Api/MerchantBoardingApi.cs | 4 +- .../Api/MerchantDefinedFieldsApi.cs | 60 ++++++++++++------- .../Api/TokenizedCardApi.cs | 12 ++-- 9 files changed, 76 insertions(+), 52 deletions(-) diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BankAccountValidationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BankAccountValidationApi.cs index b167a97a..ec09aa97 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BankAccountValidationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BankAccountValidationApi.cs @@ -283,7 +283,7 @@ public ApiResponse< InlineResponse20013 > BankAccountValidationRequestWithHttpIn } string inboundMLEStatus = "mandatory"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "BankAccountValidationRequest,BankAccountValidationRequestAsync,BankAccountValidationRequestWithHttpInfo,BankAccountValidationRequestAsyncWithHttpInfo")) { try @@ -297,13 +297,15 @@ public ApiResponse< InlineResponse20013 > BankAccountValidationRequestWithHttpIn } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "BankAccountValidationRequest,BankAccountValidationRequestAsync,BankAccountValidationRequestWithHttpInfo,BankAccountValidationRequestAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -319,7 +321,7 @@ public ApiResponse< InlineResponse20013 > BankAccountValidationRequestWithHttpIn return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20013))); // Return statement + (InlineResponse20013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20013),merchantConfig)); // Return statement } /// @@ -392,7 +394,7 @@ public async System.Threading.Tasks.Task> BankA } string inboundMLEStatus = "mandatory"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "BankAccountValidationRequest,BankAccountValidationRequestAsync,BankAccountValidationRequestWithHttpInfo,BankAccountValidationRequestAsyncWithHttpInfo")) { try @@ -406,13 +408,15 @@ public async System.Threading.Tasks.Task> BankA } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "BankAccountValidationRequest,BankAccountValidationRequestAsync,BankAccountValidationRequestWithHttpInfo,BankAccountValidationRequestAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -428,7 +432,7 @@ public async System.Threading.Tasks.Task> BankA return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20013))); // Return statement + (InlineResponse20013) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20013), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs index 420690e1..850ff1c9 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/BatchesApi.cs @@ -466,7 +466,7 @@ public ApiResponse< InlineResponse20012 > GetBatchReportWithHttpInfo (string bat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20012))); // Return statement + (InlineResponse20012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20012),merchantConfig)); // Return statement } /// @@ -585,7 +585,7 @@ public async System.Threading.Tasks.Task> GetBa return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20012))); // Return statement + (InlineResponse20012) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20012), merchantConfig)); // Return statement } /// /// Retrieve a Batch Status **Get Batch Status**<br>This resource accepts a batch id and returns: - The batch status. - The total number of accepted, rejected, updated records. - The total number of card association responses. - The billable quantities of: - New Account Numbers (NAN) - New Expiry Dates (NED) - Account Closures (ACL) - Contact Card Holders (CCH) @@ -702,7 +702,7 @@ public ApiResponse< InlineResponse20011 > GetBatchStatusWithHttpInfo (string bat return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011))); // Return statement + (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011),merchantConfig)); // Return statement } /// @@ -821,7 +821,7 @@ public async System.Threading.Tasks.Task> GetBa return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011))); // Return statement + (InlineResponse20011) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20011), merchantConfig)); // Return statement } /// /// List Batches **List Batches**<br>This resource accepts a optional date range, record offset and limit, returning a paginated response of batches containing: - The batch id. - The batch status. - The batch created / modified dates. - The total number of accepted, rejected, updated records. - The total number of card association responses. @@ -953,7 +953,7 @@ public ApiResponse< InlineResponse20010 > GetBatchesListWithHttpInfo (long? offs return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010))); // Return statement + (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010),merchantConfig)); // Return statement } /// @@ -1087,7 +1087,7 @@ public async System.Threading.Tasks.Task> GetBa return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010))); // Return statement + (InlineResponse20010) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse20010), merchantConfig)); // Return statement } /// /// Create a Batch **Create a Batch**<br>This resource accepts TMS tokens ids of a Customer, Payment Instrument or Instrument Identifier. <br> The card numbers for the supplied tokens ids are then sent to the relevant card associations to check for updates.<br>The following type of batches can be submitted: - **oneOff** batch containing tokens id for Visa or MasterCard card numbers. - **amexRegistration** batch containing tokens id for Amex card numbers. A batch id will be returned on a successful response which can be used to get the batch status and the batch report. The availability of API features for a merchant may depend on the portfolio configuration and may need to be enabled at the portfolio level before they can be added to merchant accounts. diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs index 8f07020a..135cc212 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/CreateNewWebhooksApi.cs @@ -424,7 +424,7 @@ public ApiResponse< List > FindProductsToSubscribeWithHttpIn return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -543,7 +543,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } /// /// Create a New Webhook Subscription Create a new webhook subscription. Before creating a webhook, ensure that a signature key has been created. For the example \"Create Webhook using oAuth with Client Credentials\" - for clients who have more than one oAuth Provider and have different client secrets that they would like to config for a given webhook, they may do so by overriding the keyId inside security config of webhook subscription. See the Developer Center examples section titled \"Webhook Security - Create or Store Egress Symmetric Key - Store oAuth Credentials For Symmetric Key\" to store these oAuth credentials that CYBS will need for oAuth. For JWT authentication, attach your oAuth details to the webhook subscription. See the example \"Create Webhook using oAuth with JWT\" diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs index 7460d01f..8f0bd717 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceDeAssociationApi.cs @@ -578,7 +578,7 @@ public ApiResponse< List > PostDeAssociateV3TerminalWithHttp return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -689,7 +689,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs index ef8cf9a7..800306c2 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/DeviceSearchApi.cs @@ -362,7 +362,7 @@ public ApiResponse< InlineResponse2007 > PostSearchQueryWithHttpInfo (PostDevice return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2007) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2007))); // Return statement + (InlineResponse2007) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2007),merchantConfig)); // Return statement } /// @@ -473,7 +473,7 @@ public async System.Threading.Tasks.Task> PostSe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2007) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2007))); // Return statement + (InlineResponse2007) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2007), merchantConfig)); // Return statement } /// /// Retrieve List of Devices for a given search query Search for devices matching a given search query. The search query supports serialNumber, readerId, terminalId, status, statusChangeReason or organizationId Matching results are paginated. @@ -582,7 +582,7 @@ public ApiResponse< InlineResponse2009 > PostSearchQueryV3WithHttpInfo (PostDevi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009))); // Return statement + (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009),merchantConfig)); // Return statement } /// @@ -693,7 +693,7 @@ public async System.Threading.Tasks.Task> PostSe return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009))); // Return statement + (InlineResponse2009) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2009), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs index 260482aa..5e3e25e7 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/ManageWebhooksApi.cs @@ -1090,7 +1090,7 @@ public ApiResponse< List > GetWebhookSubscriptionsByOrgWithH return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -1223,7 +1223,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } /// /// Test a Webhook Configuration Test the webhook configuration by sending a sample webhook. Calling this endpoint sends a sample webhook to the endpoint identified in the user's subscription. It will contain sample values for the product & eventType based on values present in your subscription along with a sample message in the payload. Based on the webhook response users can make any necessary modifications or rest assured knowing their setup is configured correctly. @@ -1575,7 +1575,7 @@ public ApiResponse< InlineResponse2006 > NotificationSubscriptionsV2WebhooksWebh return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006))); // Return statement + (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006),merchantConfig)); // Return statement } /// @@ -1693,7 +1693,7 @@ public async System.Threading.Tasks.Task> Notifi return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006))); // Return statement + (InlineResponse2006) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2006), merchantConfig)); // Return statement } /// /// Update a Webhook Status Users can update the status of a webhook subscription by calling this endpoint. The webhookId parameter in the URL path identifies the specific webhook subscription to be updated. The request body accepts the values ACTIVE or INACTIVE. If the subscription is set to INACTIVE, webhooks will not be delivered until the subscription is activated again. diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs index a4fba3a5..29ccd836 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantBoardingApi.cs @@ -374,7 +374,7 @@ public ApiResponse< InlineResponse2003 > GetRegistrationWithHttpInfo (string reg return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2003) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2003))); // Return statement + (InlineResponse2003) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2003),merchantConfig)); // Return statement } /// @@ -493,7 +493,7 @@ public async System.Threading.Tasks.Task> GetReg return new ApiResponse(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (InlineResponse2003) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2003))); // Return statement + (InlineResponse2003) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2003), merchantConfig)); // Return statement } /// /// Create a boarding registration Boarding Product is specifically for resellers who onboard merchants to resell their services to merchants and help integrate REST API into their systems. The Boarding API is designed to simplify and streamline the onboarding process of merchants by enabling administrators and developers to: 1. Enable and Configure Products: The API helps in adding new products to an existing organization and configuring them to suit specific needs. 2. Update Merchant Information: The API allows for updating an organization's information efficiently. 3. Manage Payment Integration: It provides templates for secure payment integration and management. diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantDefinedFieldsApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantDefinedFieldsApi.cs index 80222e01..7117b30e 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantDefinedFieldsApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/MerchantDefinedFieldsApi.cs @@ -437,7 +437,7 @@ public ApiResponse< List > CreateMerchantDefinedFieldDefinit } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateMerchantDefinedFieldDefinition,CreateMerchantDefinedFieldDefinitionAsync,CreateMerchantDefinedFieldDefinitionWithHttpInfo,CreateMerchantDefinedFieldDefinitionAsyncWithHttpInfo")) { try @@ -451,13 +451,15 @@ public ApiResponse< List > CreateMerchantDefinedFieldDefinit } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateMerchantDefinedFieldDefinition,CreateMerchantDefinedFieldDefinitionAsync,CreateMerchantDefinedFieldDefinitionWithHttpInfo,CreateMerchantDefinedFieldDefinitionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -473,7 +475,7 @@ public ApiResponse< List > CreateMerchantDefinedFieldDefinit return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -559,7 +561,7 @@ public async System.Threading.Tasks.Task>> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "CreateMerchantDefinedFieldDefinition,CreateMerchantDefinedFieldDefinitionAsync,CreateMerchantDefinedFieldDefinitionWithHttpInfo,CreateMerchantDefinedFieldDefinitionAsyncWithHttpInfo")) { try @@ -573,13 +575,15 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "CreateMerchantDefinedFieldDefinition,CreateMerchantDefinedFieldDefinitionAsync,CreateMerchantDefinedFieldDefinitionWithHttpInfo,CreateMerchantDefinedFieldDefinitionAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -595,7 +599,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } /// /// Get all merchant defined fields for a given reference type @@ -675,7 +679,7 @@ public ApiResponse< List > GetMerchantDefinedFieldsDefinitio } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetMerchantDefinedFieldsDefinitions,GetMerchantDefinedFieldsDefinitionsAsync,GetMerchantDefinedFieldsDefinitionsWithHttpInfo,GetMerchantDefinedFieldsDefinitionsAsyncWithHttpInfo")) { try @@ -689,12 +693,14 @@ public ApiResponse< List > GetMerchantDefinedFieldsDefinitio } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetMerchantDefinedFieldsDefinitions,GetMerchantDefinedFieldsDefinitionsAsync,GetMerchantDefinedFieldsDefinitionsWithHttpInfo,GetMerchantDefinedFieldsDefinitionsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -710,7 +716,7 @@ public ApiResponse< List > GetMerchantDefinedFieldsDefinitio return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -792,7 +798,7 @@ public async System.Threading.Tasks.Task>> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "GetMerchantDefinedFieldsDefinitions,GetMerchantDefinedFieldsDefinitionsAsync,GetMerchantDefinedFieldsDefinitionsWithHttpInfo,GetMerchantDefinedFieldsDefinitionsAsyncWithHttpInfo")) { try @@ -806,12 +812,14 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "GetMerchantDefinedFieldsDefinitions,GetMerchantDefinedFieldsDefinitionsAsync,GetMerchantDefinedFieldsDefinitionsWithHttpInfo,GetMerchantDefinedFieldsDefinitionsAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -827,7 +835,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } /// /// Delete a MerchantDefinedField by ID @@ -917,7 +925,7 @@ public ApiResponse InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDelete } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDelete,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteAsync,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteWithHttpInfo,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteAsyncWithHttpInfo")) { try @@ -931,12 +939,14 @@ public ApiResponse InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDelete } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDelete,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteAsync,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteWithHttpInfo,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1045,7 +1055,7 @@ public async System.Threading.Tasks.Task> InvoicingV2Referen } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDelete,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteAsync,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteWithHttpInfo,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteAsyncWithHttpInfo")) { try @@ -1059,12 +1069,14 @@ public async System.Threading.Tasks.Task> InvoicingV2Referen } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDelete,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteAsync,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteWithHttpInfo,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdDeleteAsyncWithHttpInfo"); + // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1178,7 +1190,7 @@ public ApiResponse< List > InvoicingV2ReferenceTypeMerchantD } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPut,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutAsync,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutWithHttpInfo,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutAsyncWithHttpInfo")) { try @@ -1192,13 +1204,15 @@ public ApiResponse< List > InvoicingV2ReferenceTypeMerchantD } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPut,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutAsync,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutWithHttpInfo,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1214,7 +1228,7 @@ public ApiResponse< List > InvoicingV2ReferenceTypeMerchantD return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List),merchantConfig)); // Return statement } /// @@ -1313,7 +1327,7 @@ public async System.Threading.Tasks.Task>> } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPut,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutAsync,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutWithHttpInfo,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutAsyncWithHttpInfo")) { try @@ -1327,13 +1341,15 @@ public async System.Threading.Tasks.Task>> } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPut,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutAsync,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutWithHttpInfo,InvoicingV2ReferenceTypeMerchantDefinedFieldsIdPutAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Put, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode; @@ -1349,7 +1365,7 @@ public async System.Threading.Tasks.Task>> return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.GroupBy(h => h.Name).ToDictionary(x => x.Key, x => string.Join(", ", x.Select(h => h.Value.ToString()))), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); // Return statement + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List), merchantConfig)); // Return statement } } } diff --git a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs index 328e9a02..d92bc0ac 100644 --- a/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs +++ b/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/Api/TokenizedCardApi.cs @@ -942,7 +942,7 @@ public ApiResponse PostIssuerLifeCycleSimulationWithHttpInfo (string pro } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostIssuerLifeCycleSimulation,PostIssuerLifeCycleSimulationAsync,PostIssuerLifeCycleSimulationWithHttpInfo,PostIssuerLifeCycleSimulationAsyncWithHttpInfo")) { try @@ -956,13 +956,15 @@ public ApiResponse PostIssuerLifeCycleSimulationWithHttpInfo (string pro } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostIssuerLifeCycleSimulation,PostIssuerLifeCycleSimulationAsync,PostIssuerLifeCycleSimulationWithHttpInfo,PostIssuerLifeCycleSimulationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int) localVarResponse.StatusCode; @@ -1074,7 +1076,7 @@ public async System.Threading.Tasks.Task> PostIssuerLifeCycl } string inboundMLEStatus = "false"; - MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI); + MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI, Configuration.ResponseMlePrivateKey); if (MLEUtility.CheckIsMLEForAPI(merchantConfig, inboundMLEStatus, "PostIssuerLifeCycleSimulation,PostIssuerLifeCycleSimulationAsync,PostIssuerLifeCycleSimulationWithHttpInfo,PostIssuerLifeCycleSimulationAsyncWithHttpInfo")) { try @@ -1088,13 +1090,15 @@ public async System.Threading.Tasks.Task> PostIssuerLifeCycl } } + bool isResponseMLEForApi = MLEUtility.CheckIsResponseMLEForAPI(merchantConfig, "PostIssuerLifeCycleSimulation,PostIssuerLifeCycleSimulationAsync,PostIssuerLifeCycleSimulationWithHttpInfo,PostIssuerLifeCycleSimulationAsyncWithHttpInfo"); + logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); // make the HTTP request RestResponse localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); + localVarPathParams, localVarHttpContentType, isResponseMLEForApi); int localVarStatusCode = (int)localVarResponse.StatusCode;