/// <summary> /// Check Payer Auth Enrollment This call verifies that the card is enrolled in a card authentication program. /// </summary> /// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="checkPayerAuthEnrollmentRequest"></param> /// <returns>RiskV1AuthenticationsPost201Response</returns> public RiskV1AuthenticationsPost201Response CheckPayerAuthEnrollment(CheckPayerAuthEnrollmentRequest checkPayerAuthEnrollmentRequest) { logger.Debug("CALLING API \"CheckPayerAuthEnrollment\" STARTED"); this.SetStatusCode(null); ApiResponse <RiskV1AuthenticationsPost201Response> localVarResponse = CheckPayerAuthEnrollmentWithHttpInfo(checkPayerAuthEnrollmentRequest); logger.Debug("CALLING API \"CheckPayerAuthEnrollment\" ENDED"); this.SetStatusCode(localVarResponse.StatusCode); return(localVarResponse.Data); }
/// <summary> /// Check Payer Auth Enrollment This call verifies that the card is enrolled in a card authentication program. /// </summary> /// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="checkPayerAuthEnrollmentRequest"></param> /// <returns>Task of ApiResponse (RiskV1AuthenticationsPost201Response)</returns> public async System.Threading.Tasks.Task <ApiResponse <RiskV1AuthenticationsPost201Response> > CheckPayerAuthEnrollmentAsyncWithHttpInfo(CheckPayerAuthEnrollmentRequest checkPayerAuthEnrollmentRequest) { // verify the required parameter 'checkPayerAuthEnrollmentRequest' is set if (checkPayerAuthEnrollmentRequest == null) { throw new ApiException(400, "Missing required parameter 'checkPayerAuthEnrollmentRequest' when calling PayerAuthenticationApi->CheckPayerAuthEnrollment"); } var localVarPath = $"/risk/v1/authentications"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new Dictionary <String, String>(); var localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader); var localVarFormParams = new Dictionary <String, String>(); var localVarFileParams = new Dictionary <String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json;charset=utf-8" }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/hal+json;charset=utf-8" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (checkPayerAuthEnrollmentRequest != null && checkPayerAuthEnrollmentRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(checkPayerAuthEnrollmentRequest); // http body (model) parameter } else { localVarPostBody = checkPayerAuthEnrollmentRequest; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CheckPayerAuthEnrollment", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <RiskV1AuthenticationsPost201Response>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (RiskV1AuthenticationsPost201Response)Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response)))); }
/// <summary> /// Check Payer Auth Enrollment This call verifies that the card is enrolled in a card authentication program. /// </summary> /// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="checkPayerAuthEnrollmentRequest"></param> /// <returns>Task of RiskV1AuthenticationsPost201Response</returns> public async System.Threading.Tasks.Task <RiskV1AuthenticationsPost201Response> CheckPayerAuthEnrollmentAsync(CheckPayerAuthEnrollmentRequest checkPayerAuthEnrollmentRequest) { ApiResponse <RiskV1AuthenticationsPost201Response> localVarResponse = await CheckPayerAuthEnrollmentAsyncWithHttpInfo(checkPayerAuthEnrollmentRequest); return(localVarResponse.Data); }
/// <summary> /// Check Payer Auth Enrollment This call verifies that the card is enrolled in a card authentication program. /// </summary> /// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="checkPayerAuthEnrollmentRequest"></param> /// <returns>RiskV1AuthenticationsPost201Response</returns> public RiskV1AuthenticationsPost201Response CheckPayerAuthEnrollment(CheckPayerAuthEnrollmentRequest checkPayerAuthEnrollmentRequest) { ApiResponse <RiskV1AuthenticationsPost201Response> localVarResponse = CheckPayerAuthEnrollmentWithHttpInfo(checkPayerAuthEnrollmentRequest); return(localVarResponse.Data); }
public static RiskV1AuthenticationsPost201Response Run() { string clientReferenceInformationCode = "UNKNOWN"; Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation( Code: clientReferenceInformationCode ); string orderInformationAmountDetailsCurrency = "USD"; string orderInformationAmountDetailsTotalAmount = "10.99"; Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails( Currency: orderInformationAmountDetailsCurrency, TotalAmount: orderInformationAmountDetailsTotalAmount ); string orderInformationBillToAddress1 = "1 Market St"; string orderInformationBillToAddress2 = "Address 2"; string orderInformationBillToAdministrativeArea = "CA"; string orderInformationBillToCountry = "US"; string orderInformationBillToLocality = "san francisco"; string orderInformationBillToFirstName = "John"; string orderInformationBillToLastName = "Doe"; string orderInformationBillToPhoneNumber = "4158880000"; string orderInformationBillToEmail = "*****@*****.**"; string orderInformationBillToPostalCode = "94105"; Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo( Address1: orderInformationBillToAddress1, Address2: orderInformationBillToAddress2, AdministrativeArea: orderInformationBillToAdministrativeArea, Country: orderInformationBillToCountry, Locality: orderInformationBillToLocality, FirstName: orderInformationBillToFirstName, LastName: orderInformationBillToLastName, PhoneNumber: orderInformationBillToPhoneNumber, Email: orderInformationBillToEmail, PostalCode: orderInformationBillToPostalCode ); Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation( AmountDetails: orderInformationAmountDetails, BillTo: orderInformationBillTo ); string paymentInformationCardType = "001"; string paymentInformationCardExpirationMonth = "12"; string paymentInformationCardExpirationYear = "2025"; string paymentInformationCardNumber = "4012001037490014"; Riskv1authenticationsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsPaymentInformationCard( Type: paymentInformationCardType, ExpirationMonth: paymentInformationCardExpirationMonth, ExpirationYear: paymentInformationCardExpirationYear, Number: paymentInformationCardNumber ); Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation( Card: paymentInformationCard ); var requestObj = new CheckPayerAuthEnrollmentRequest( ClientReferenceInformation: clientReferenceInformation, OrderInformation: orderInformation, PaymentInformation: paymentInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new PayerAuthenticationApi(clientConfig); RiskV1AuthenticationsPost201Response result = apiInstance.CheckPayerAuthEnrollment(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }
public static RiskV1AuthenticationsPost201Response Run() { string clientReferenceInformationCode = "cybs_test"; Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation( Code: clientReferenceInformationCode ); string orderInformationAmountDetailsCurrency = "USD"; string orderInformationAmountDetailsTotalAmount = "10.99"; Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails( Currency: orderInformationAmountDetailsCurrency, TotalAmount: orderInformationAmountDetailsTotalAmount ); string orderInformationBillToAddress1 = "1 Market St"; string orderInformationBillToAddress2 = "Address 2"; string orderInformationBillToAdministrativeArea = "CA"; string orderInformationBillToCountry = "US"; string orderInformationBillToLocality = "san francisco"; string orderInformationBillToFirstName = "John"; string orderInformationBillToLastName = "Doe"; string orderInformationBillToPhoneNumber = "4158880000"; string orderInformationBillToEmail = "*****@*****.**"; string orderInformationBillToPostalCode = "94105"; Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo( Address1: orderInformationBillToAddress1, Address2: orderInformationBillToAddress2, AdministrativeArea: orderInformationBillToAdministrativeArea, Country: orderInformationBillToCountry, Locality: orderInformationBillToLocality, FirstName: orderInformationBillToFirstName, LastName: orderInformationBillToLastName, PhoneNumber: orderInformationBillToPhoneNumber, Email: orderInformationBillToEmail, PostalCode: orderInformationBillToPostalCode ); Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation( AmountDetails: orderInformationAmountDetails, BillTo: orderInformationBillTo ); string paymentInformationCardType = "002"; string paymentInformationCardExpirationMonth = "12"; string paymentInformationCardExpirationYear = "2025"; string paymentInformationCardNumber = "5200340000000015"; Riskv1authenticationsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsPaymentInformationCard( Type: paymentInformationCardType, ExpirationMonth: paymentInformationCardExpirationMonth, ExpirationYear: paymentInformationCardExpirationYear, Number: paymentInformationCardNumber ); Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation( Card: paymentInformationCard ); int buyerInformationMobilePhone = 1245789632; Riskv1authenticationsBuyerInformation buyerInformation = new Riskv1authenticationsBuyerInformation( MobilePhone: buyerInformationMobilePhone ); string consumerAuthenticationInformationTransactionMode = "MOTO"; Riskv1decisionsConsumerAuthenticationInformation consumerAuthenticationInformation = new Riskv1decisionsConsumerAuthenticationInformation( TransactionMode: consumerAuthenticationInformationTransactionMode ); List <Riskv1decisionsTravelInformationLegs> travelInformationLegs = new List <Riskv1decisionsTravelInformationLegs>(); string travelInformationLegsDestination1 = "DEF"; string travelInformationLegsCarrierCode1 = "UA"; string travelInformationLegsDepartureDate1 = "2019-01-01"; travelInformationLegs.Add(new Riskv1decisionsTravelInformationLegs( Destination: travelInformationLegsDestination1, CarrierCode: travelInformationLegsCarrierCode1, DepartureDate: travelInformationLegsDepartureDate1 )); string travelInformationLegsDestination2 = "RES"; string travelInformationLegsCarrierCode2 = "AS"; string travelInformationLegsDepartureDate2 = "2019-02-21"; travelInformationLegs.Add(new Riskv1decisionsTravelInformationLegs( Destination: travelInformationLegsDestination2, CarrierCode: travelInformationLegsCarrierCode2, DepartureDate: travelInformationLegsDepartureDate2 )); int travelInformationNumberOfPassengers = 2; List <Riskv1decisionsTravelInformationPassengers> travelInformationPassengers = new List <Riskv1decisionsTravelInformationPassengers>(); string travelInformationPassengersFirstName1 = "Raj"; string travelInformationPassengersLastName1 = "Charles"; travelInformationPassengers.Add(new Riskv1decisionsTravelInformationPassengers( FirstName: travelInformationPassengersFirstName1, LastName: travelInformationPassengersLastName1 )); string travelInformationPassengersFirstName2 = "Potter"; string travelInformationPassengersLastName2 = "Suhember"; travelInformationPassengers.Add(new Riskv1decisionsTravelInformationPassengers( FirstName: travelInformationPassengersFirstName2, LastName: travelInformationPassengersLastName2 )); Riskv1authenticationsTravelInformation travelInformation = new Riskv1authenticationsTravelInformation( Legs: travelInformationLegs, NumberOfPassengers: travelInformationNumberOfPassengers, Passengers: travelInformationPassengers ); var requestObj = new CheckPayerAuthEnrollmentRequest( ClientReferenceInformation: clientReferenceInformation, OrderInformation: orderInformation, PaymentInformation: paymentInformation, BuyerInformation: buyerInformation, ConsumerAuthenticationInformation: consumerAuthenticationInformation, TravelInformation: travelInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new PayerAuthenticationApi(clientConfig); RiskV1AuthenticationsPost201Response result = apiInstance.CheckPayerAuthEnrollment(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }
public static RiskV1AuthenticationsPost201Response Run() { string clientReferenceInformationCode = "UNKNOWN"; Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation( Code: clientReferenceInformationCode ); string orderInformationAmountDetailsCurrency = "USD"; string orderInformationAmountDetailsTotalAmount = "10.99"; Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails( Currency: orderInformationAmountDetailsCurrency, TotalAmount: orderInformationAmountDetailsTotalAmount ); string orderInformationBillToAddress1 = "1 Market St"; string orderInformationBillToAddress2 = "Address 2"; string orderInformationBillToAdministrativeArea = "CA"; string orderInformationBillToCountry = "US"; string orderInformationBillToLocality = "san francisco"; string orderInformationBillToFirstName = "John"; string orderInformationBillToLastName = "Doe"; string orderInformationBillToPhoneNumber = "4158880000"; string orderInformationBillToEmail = "*****@*****.**"; string orderInformationBillToPostalCode = "94105"; Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo( Address1: orderInformationBillToAddress1, Address2: orderInformationBillToAddress2, AdministrativeArea: orderInformationBillToAdministrativeArea, Country: orderInformationBillToCountry, Locality: orderInformationBillToLocality, FirstName: orderInformationBillToFirstName, LastName: orderInformationBillToLastName, PhoneNumber: orderInformationBillToPhoneNumber, Email: orderInformationBillToEmail, PostalCode: orderInformationBillToPostalCode ); Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation( AmountDetails: orderInformationAmountDetails, BillTo: orderInformationBillTo ); string tokenInformationTransientToken = "1D5ZX4HMOV20FKEBE3IO240JWYJ0NJ90B4V9XQ6SCK4BDN0W96E65E2A39052056"; Riskv1authenticationsetupsTokenInformation tokenInformation = new Riskv1authenticationsetupsTokenInformation( TransientToken: tokenInformationTransientToken ); var requestObj = new CheckPayerAuthEnrollmentRequest( ClientReferenceInformation: clientReferenceInformation, OrderInformation: orderInformation, TokenInformation: tokenInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new PayerAuthenticationApi(clientConfig); RiskV1AuthenticationsPost201Response result = apiInstance.CheckPayerAuthEnrollment(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }
/// <summary> /// Check Payer Auth Enrollment This call verifies that the card is enrolled in a card authentication program. /// </summary> /// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="checkPayerAuthEnrollmentRequest"></param> /// <returns>Task of RiskV1AuthenticationsPost201Response</returns> public async System.Threading.Tasks.Task <RiskV1AuthenticationsPost201Response> CheckPayerAuthEnrollmentAsync(CheckPayerAuthEnrollmentRequest checkPayerAuthEnrollmentRequest) { logger.Debug("CALLING API \"CheckPayerAuthEnrollmentAsync\" STARTED"); this.SetStatusCode(null); ApiResponse <RiskV1AuthenticationsPost201Response> localVarResponse = await CheckPayerAuthEnrollmentAsyncWithHttpInfo(checkPayerAuthEnrollmentRequest); logger.Debug("CALLING API \"CheckPayerAuthEnrollmentAsync\" ENDED"); this.SetStatusCode(localVarResponse.StatusCode); return(localVarResponse.Data); }
/// <summary> /// Check Payer Auth Enrollment This call verifies that the card is enrolled in a card authentication program. /// </summary> /// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="checkPayerAuthEnrollmentRequest"></param> /// <returns>ApiResponse of RiskV1AuthenticationsPost201Response</returns> public ApiResponse <RiskV1AuthenticationsPost201Response> CheckPayerAuthEnrollmentWithHttpInfo(CheckPayerAuthEnrollmentRequest checkPayerAuthEnrollmentRequest) { LogUtility logUtility = new LogUtility(); // verify the required parameter 'checkPayerAuthEnrollmentRequest' is set if (checkPayerAuthEnrollmentRequest == null) { logger.Error("ApiException : Missing required parameter 'checkPayerAuthEnrollmentRequest' when calling PayerAuthenticationApi->CheckPayerAuthEnrollment"); throw new ApiException(400, "Missing required parameter 'checkPayerAuthEnrollmentRequest' when calling PayerAuthenticationApi->CheckPayerAuthEnrollment"); } var localVarPath = $"/risk/v1/authentications"; var localVarPathParams = new Dictionary <string, string>(); var localVarQueryParams = new Dictionary <string, string>(); var localVarHeaderParams = new Dictionary <string, string>(Configuration.DefaultHeader); var localVarFormParams = new Dictionary <string, string>(); var localVarFileParams = new Dictionary <string, FileParameter>(); object localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { "application/json;charset=utf-8" }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { "application/hal+json;charset=utf-8" }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (checkPayerAuthEnrollmentRequest != null && checkPayerAuthEnrollmentRequest.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(checkPayerAuthEnrollmentRequest); // http body (model) parameter } else { localVarPostBody = checkPayerAuthEnrollmentRequest; // byte array } if (logUtility.IsMaskingEnabled(logger)) { logger.Debug($"HTTP Request Body :\n{logUtility.MaskSensitiveData(localVarPostBody.ToString())}"); } else { logger.Debug($"HTTP Request Body :\n{localVarPostBody}"); } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CheckPayerAuthEnrollment", localVarResponse); if (exception != null) { logger.Error($"Exception : {exception.Message}"); throw exception; } } return(new ApiResponse <RiskV1AuthenticationsPost201Response>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (RiskV1AuthenticationsPost201Response)Configuration.ApiClient.Deserialize(localVarResponse, typeof(RiskV1AuthenticationsPost201Response)))); // Return statement }
public static RiskV1AuthenticationsPost201Response Run() { string clientReferenceInformationCode = "New Account"; Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation( Code: clientReferenceInformationCode ); string orderInformationAmountDetailsCurrency = "USD"; string orderInformationAmountDetailsTotalAmount = "10.99"; Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails( Currency: orderInformationAmountDetailsCurrency, TotalAmount: orderInformationAmountDetailsTotalAmount ); string orderInformationBillToAddress1 = "1 Market St"; string orderInformationBillToAddress2 = "Address 2"; string orderInformationBillToAdministrativeArea = "CA"; string orderInformationBillToCountry = "US"; string orderInformationBillToLocality = "san francisco"; string orderInformationBillToFirstName = "John"; string orderInformationBillToLastName = "Doe"; string orderInformationBillToPhoneNumber = "4158880000"; string orderInformationBillToEmail = "*****@*****.**"; string orderInformationBillToPostalCode = "94105"; Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo( Address1: orderInformationBillToAddress1, Address2: orderInformationBillToAddress2, AdministrativeArea: orderInformationBillToAdministrativeArea, Country: orderInformationBillToCountry, Locality: orderInformationBillToLocality, FirstName: orderInformationBillToFirstName, LastName: orderInformationBillToLastName, PhoneNumber: orderInformationBillToPhoneNumber, Email: orderInformationBillToEmail, PostalCode: orderInformationBillToPostalCode ); Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation( AmountDetails: orderInformationAmountDetails, BillTo: orderInformationBillTo ); string paymentInformationCardType = "001"; string paymentInformationCardExpirationMonth = "12"; string paymentInformationCardExpirationYear = "2025"; string paymentInformationCardNumber = "4000990000000004"; Riskv1authenticationsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsPaymentInformationCard( Type: paymentInformationCardType, ExpirationMonth: paymentInformationCardExpirationMonth, ExpirationYear: paymentInformationCardExpirationYear, Number: paymentInformationCardNumber ); Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation( Card: paymentInformationCard ); string consumerAuthenticationInformationTransactionMode = "MOTO"; Riskv1decisionsConsumerAuthenticationInformation consumerAuthenticationInformation = new Riskv1decisionsConsumerAuthenticationInformation( TransactionMode: consumerAuthenticationInformationTransactionMode ); string riskInformationBuyerHistoryCustomerAccountCreationHistory = "NEW_ACCOUNT"; Ptsv2paymentsRiskInformationBuyerHistoryCustomerAccount riskInformationBuyerHistoryCustomerAccount = new Ptsv2paymentsRiskInformationBuyerHistoryCustomerAccount( CreationHistory: riskInformationBuyerHistoryCustomerAccountCreationHistory ); bool riskInformationBuyerHistoryAccountHistoryFirstUseOfShippingAddress = false; Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory riskInformationBuyerHistoryAccountHistory = new Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory( FirstUseOfShippingAddress: riskInformationBuyerHistoryAccountHistoryFirstUseOfShippingAddress ); Ptsv2paymentsRiskInformationBuyerHistory riskInformationBuyerHistory = new Ptsv2paymentsRiskInformationBuyerHistory( CustomerAccount: riskInformationBuyerHistoryCustomerAccount, AccountHistory: riskInformationBuyerHistoryAccountHistory ); Riskv1authenticationsRiskInformation riskInformation = new Riskv1authenticationsRiskInformation( BuyerHistory: riskInformationBuyerHistory ); var requestObj = new CheckPayerAuthEnrollmentRequest( ClientReferenceInformation: clientReferenceInformation, OrderInformation: orderInformation, PaymentInformation: paymentInformation, ConsumerAuthenticationInformation: consumerAuthenticationInformation, RiskInformation: riskInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new PayerAuthenticationApi(clientConfig); RiskV1AuthenticationsPost201Response result = apiInstance.CheckPayerAuthEnrollment(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }