public static PtsV2CreditsPost201Response Run() { string clientReferenceInformationCode = "12345678"; Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation( Code: clientReferenceInformationCode ); string paymentInformationCustomerId = "AB695DA801DD1BB6E05341588E0A3BDC"; Ptsv2paymentsPaymentInformationCustomer paymentInformationCustomer = new Ptsv2paymentsPaymentInformationCustomer( Id: paymentInformationCustomerId ); Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation( Customer: paymentInformationCustomer ); string orderInformationAmountDetailsTotalAmount = "200"; string orderInformationAmountDetailsCurrency = "usd"; Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails( TotalAmount: orderInformationAmountDetailsTotalAmount, Currency: orderInformationAmountDetailsCurrency ); Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation( AmountDetails: orderInformationAmountDetails ); var requestObj = new CreateCreditRequest( ClientReferenceInformation: clientReferenceInformation, PaymentInformation: paymentInformation, OrderInformation: orderInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new CreditApi(clientConfig); PtsV2CreditsPost201Response result = apiInstance.CreateCredit(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }
public static PtsV2CreditsPost201Response Run() { string clientReferenceInformationCode = "TC46125-1"; Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation( Code: clientReferenceInformationCode ); string paymentInformationBankAccountType = "C"; string paymentInformationBankAccountNumber = "4100"; string paymentInformationBankAccountCheckNumber = "123456"; Ptsv2paymentsPaymentInformationBankAccount paymentInformationBankAccount = new Ptsv2paymentsPaymentInformationBankAccount( Type: paymentInformationBankAccountType, Number: paymentInformationBankAccountNumber, CheckNumber: paymentInformationBankAccountCheckNumber ); string paymentInformationBankRoutingNumber = "071923284"; Ptsv2paymentsPaymentInformationBank paymentInformationBank = new Ptsv2paymentsPaymentInformationBank( Account: paymentInformationBankAccount, RoutingNumber: paymentInformationBankRoutingNumber ); string paymentInformationPaymentTypeName = "CHECK"; Ptsv2paymentsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsPaymentInformationPaymentType( Name: paymentInformationPaymentTypeName ); Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation( Bank: paymentInformationBank, PaymentType: paymentInformationPaymentType ); string orderInformationAmountDetailsTotalAmount = "100"; string orderInformationAmountDetailsCurrency = "USD"; Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails( TotalAmount: orderInformationAmountDetailsTotalAmount, Currency: orderInformationAmountDetailsCurrency ); string orderInformationBillToFirstName = "John"; string orderInformationBillToLastName = "Doe"; string orderInformationBillToAddress1 = "1 Market St"; string orderInformationBillToLocality = "san francisco"; string orderInformationBillToAdministrativeArea = "CA"; string orderInformationBillToPostalCode = "94105"; string orderInformationBillToCountry = "US"; string orderInformationBillToEmail = "*****@*****.**"; string orderInformationBillToPhoneNumber = "4158880000"; Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo( FirstName: orderInformationBillToFirstName, LastName: orderInformationBillToLastName, Address1: orderInformationBillToAddress1, Locality: orderInformationBillToLocality, AdministrativeArea: orderInformationBillToAdministrativeArea, PostalCode: orderInformationBillToPostalCode, Country: orderInformationBillToCountry, Email: orderInformationBillToEmail, PhoneNumber: orderInformationBillToPhoneNumber ); Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation( AmountDetails: orderInformationAmountDetails, BillTo: orderInformationBillTo ); var requestObj = new CreateCreditRequest( ClientReferenceInformation: clientReferenceInformation, PaymentInformation: paymentInformation, OrderInformation: orderInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new CreditApi(clientConfig); PtsV2CreditsPost201Response result = apiInstance.CreateCredit(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }
public static PtsV2CreditsPost201Response Run() { string clientReferenceInformationCode = "12345678"; Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation( Code: clientReferenceInformationCode ); string paymentInformationCardExpirationMonth = "03"; string paymentInformationCardExpirationYear = "2031"; string paymentInformationCardType = "001"; Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard( ExpirationMonth: paymentInformationCardExpirationMonth, ExpirationYear: paymentInformationCardExpirationYear, Type: paymentInformationCardType ); string paymentInformationInstrumentIdentifierId = "7010000000016241111"; Ptsv2paymentsPaymentInformationInstrumentIdentifier paymentInformationInstrumentIdentifier = new Ptsv2paymentsPaymentInformationInstrumentIdentifier( Id: paymentInformationInstrumentIdentifierId ); Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation( Card: paymentInformationCard, InstrumentIdentifier: paymentInformationInstrumentIdentifier ); string orderInformationAmountDetailsTotalAmount = "200"; string orderInformationAmountDetailsCurrency = "usd"; Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails( TotalAmount: orderInformationAmountDetailsTotalAmount, Currency: orderInformationAmountDetailsCurrency ); string orderInformationBillToFirstName = "John"; string orderInformationBillToLastName = "Deo"; string orderInformationBillToAddress1 = "900 Metro Center Blvd"; string orderInformationBillToLocality = "Foster City"; string orderInformationBillToAdministrativeArea = "CA"; string orderInformationBillToPostalCode = "48104-2201"; string orderInformationBillToCountry = "US"; string orderInformationBillToEmail = "*****@*****.**"; string orderInformationBillToPhoneNumber = "9321499232"; Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo( FirstName: orderInformationBillToFirstName, LastName: orderInformationBillToLastName, Address1: orderInformationBillToAddress1, Locality: orderInformationBillToLocality, AdministrativeArea: orderInformationBillToAdministrativeArea, PostalCode: orderInformationBillToPostalCode, Country: orderInformationBillToCountry, Email: orderInformationBillToEmail, PhoneNumber: orderInformationBillToPhoneNumber ); Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation( AmountDetails: orderInformationAmountDetails, BillTo: orderInformationBillTo ); var requestObj = new CreateCreditRequest( ClientReferenceInformation: clientReferenceInformation, PaymentInformation: paymentInformation, OrderInformation: orderInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new CreditApi(clientConfig); PtsV2CreditsPost201Response result = apiInstance.CreateCredit(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }
public static PtsV2CreditsPost201Response Run() { string clientReferenceInformationCode = "demomerchant"; Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation( Code: clientReferenceInformationCode ); string processingInformationCommerceIndicator = "retail"; Ptsv2creditsProcessingInformation processingInformation = new Ptsv2creditsProcessingInformation( CommerceIndicator: processingInformationCommerceIndicator ); string paymentInformationCardExpirationMonth = "12"; string paymentInformationCardExpirationYear = "2050"; Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard( ExpirationMonth: paymentInformationCardExpirationMonth, ExpirationYear: paymentInformationCardExpirationYear ); string paymentInformationFluidDataDescriptor = "Ymx1ZWZpbg=="; string paymentInformationFluidDataValue = "02d700801f3c20008383252a363031312a2a2a2a2a2a2a2a303030395e46444d53202020202020202020202020202020202020202020205e323231322a2a2a2a2a2a2a2a3f2a3b363031312a2a2a2a2a2a2a2a303030393d323231322a2a2a2a2a2a2a2a3f2a7a75ad15d25217290c54b3d9d1c3868602136c68d339d52d98423391f3e631511d548fff08b414feac9ff6c6dede8fb09bae870e4e32f6f462d6a75fa0a178c3bd18d0d3ade21bc7a0ea687a2eef64551751e502d97cb98dc53ea55162cdfa395431323439323830303762994901000001a000731a8003"; Ptsv2paymentsPaymentInformationFluidData paymentInformationFluidData = new Ptsv2paymentsPaymentInformationFluidData( Descriptor: paymentInformationFluidDataDescriptor, Value: paymentInformationFluidDataValue ); Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation( Card: paymentInformationCard, FluidData: paymentInformationFluidData ); string orderInformationAmountDetailsTotalAmount = "100.00"; string orderInformationAmountDetailsCurrency = "USD"; Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails( TotalAmount: orderInformationAmountDetailsTotalAmount, Currency: orderInformationAmountDetailsCurrency ); string orderInformationBillToFirstName = "John"; string orderInformationBillToLastName = "Deo"; string orderInformationBillToAddress1 = "201 S. Division St."; string orderInformationBillToLocality = "Ann Arbor"; string orderInformationBillToAdministrativeArea = "MI"; string orderInformationBillToPostalCode = "48104-2201"; string orderInformationBillToCountry = "US"; string orderInformationBillToEmail = "*****@*****.**"; string orderInformationBillToPhoneNumber = "999999999"; Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo( FirstName: orderInformationBillToFirstName, LastName: orderInformationBillToLastName, Address1: orderInformationBillToAddress1, Locality: orderInformationBillToLocality, AdministrativeArea: orderInformationBillToAdministrativeArea, PostalCode: orderInformationBillToPostalCode, Country: orderInformationBillToCountry, Email: orderInformationBillToEmail, PhoneNumber: orderInformationBillToPhoneNumber ); Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation( AmountDetails: orderInformationAmountDetails, BillTo: orderInformationBillTo ); int pointOfSaleInformationCatLevel = 1; string pointOfSaleInformationEntryMode = "keyed"; int pointOfSaleInformationTerminalCapability = 2; Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation( CatLevel: pointOfSaleInformationCatLevel, EntryMode: pointOfSaleInformationEntryMode, TerminalCapability: pointOfSaleInformationTerminalCapability ); var requestObj = new CreateCreditRequest( ClientReferenceInformation: clientReferenceInformation, ProcessingInformation: processingInformation, PaymentInformation: paymentInformation, OrderInformation: orderInformation, PointOfSaleInformation: pointOfSaleInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new CreditApi(clientConfig); PtsV2CreditsPost201Response result = apiInstance.CreateCredit(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }
public static PtsV2CreditsPost201Response Run() { string clientReferenceInformationCode = "12345678"; Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation( Code: clientReferenceInformationCode ); string paymentInformationCardNumber = "4111111111111111"; string paymentInformationCardExpirationMonth = "03"; string paymentInformationCardExpirationYear = "2031"; Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard( Number: paymentInformationCardNumber, ExpirationMonth: paymentInformationCardExpirationMonth, ExpirationYear: paymentInformationCardExpirationYear ); Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation( Card: paymentInformationCard ); string orderInformationAmountDetailsTotalAmount = "2325.00"; string orderInformationAmountDetailsCurrency = "usd"; string orderInformationAmountDetailsServiceFeeAmount = "30.0"; Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails( TotalAmount: orderInformationAmountDetailsTotalAmount, Currency: orderInformationAmountDetailsCurrency, ServiceFeeAmount: orderInformationAmountDetailsServiceFeeAmount ); string orderInformationBillToFirstName = "John"; string orderInformationBillToLastName = "Doe"; string orderInformationBillToAddress1 = "1 Market St"; string orderInformationBillToLocality = "san francisco"; string orderInformationBillToAdministrativeArea = "CA"; string orderInformationBillToPostalCode = "94105"; string orderInformationBillToCountry = "US"; string orderInformationBillToEmail = "*****@*****.**"; string orderInformationBillToPhoneNumber = "4158880000"; Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo( FirstName: orderInformationBillToFirstName, LastName: orderInformationBillToLastName, Address1: orderInformationBillToAddress1, Locality: orderInformationBillToLocality, AdministrativeArea: orderInformationBillToAdministrativeArea, PostalCode: orderInformationBillToPostalCode, Country: orderInformationBillToCountry, Email: orderInformationBillToEmail, PhoneNumber: orderInformationBillToPhoneNumber ); Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation( AmountDetails: orderInformationAmountDetails, BillTo: orderInformationBillTo ); var requestObj = new CreateCreditRequest( ClientReferenceInformation: clientReferenceInformation, PaymentInformation: paymentInformation, OrderInformation: orderInformation ); try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new CreditApi(clientConfig); PtsV2CreditsPost201Response result = apiInstance.CreateCredit(requestObj); Console.WriteLine(result); return(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API : " + e.Message); return(null); } }