@@ -85,7 +85,7 @@ using Org.OpenAPITools.Model;
8585 Find it by searching ** "what's my IP"** in Google or visiting [ https://www.whatsmyip.org ] ( https://www.whatsmyip.org ) .
8686
8787 * Contact AndDone support to ensure your origin IP is registered.
88- * Email: [ support @anddone.com] ( mailto:support @anddone.com )
88+ * Email: [ integrations @anddone.com] ( mailto:integrations @anddone.com )
8989
90903 . ** Optional: Create a Configuration File:**
9191 Rename ` config.example.json ` to ` config.json ` and fill it with your values:
@@ -106,6 +106,9 @@ using Org.OpenAPITools.Model;
106106Here’s a minimal working example to call the ** Secure Create Payment Intent API** :
107107
108108``` csharp
109+ using System ;
110+ using Newtonsoft .Json ;
111+ using Newtonsoft .Json .Linq ;
109112using Org .OpenAPITools .Api ;
110113using Org .OpenAPITools .Client ;
111114using Org .OpenAPITools .Model ;
@@ -120,29 +123,33 @@ var apiInstance = new SecurePaymentIntentApi(config);
120123// Required headers
121124string xApiKey = " YOUR_API_KEY" ;
122125string xAppKey = " YOUR_APP_KEY" ;
123- string xVersion = " 2.3 " ;
126+ float xVersion = 2 . 3 F ;
124127string origin = " YOUR_ORIGIN" ;
125128
126- var request = new PaymentIntentRequest
127- {
128- SaveForFuture = true ,
129- Amount = 10000 ,
130- Title = " YOUR UNIQUE TITLE" ,
131- ShortDescription = " shortDescription" ,
132- PaymentDescription = " paymentDescription" ,
133- InvoiceNumber = " dotnet" ,
134- ExpiresIn = " 300000" ,
135- Intent = new PaymentIntentRequestIntent
136- {
137- PaymentTypes = new List <string > { " CreditCard" , " ACH" }
129+ var request = @" {
130+ "" saveForFuture"" : true,
131+ "" amount"" : 10000,
132+ "" title"" : "" test title 001a"" ,
133+ "" shortDescription"" : "" shortDescription"" ,
134+ "" paymentDescription"" : "" paymentDescription"" ,
135+ "" invoiceNumber"" : "" postman"" ,
136+ "" expiresIn"" : "" 300000"" ,
137+ "" intent"" : {
138+ "" paymentTypes"" : [
139+ "" CreditCard"" ,
140+ "" ACH""
141+ ]
138142 },
139- EnablePremiumFinance = true ,
140- AdditionalDetailsPreference = " NoAdditionalDetails"
141- };
143+ "" enablePremiumFinance"" : true,
144+ "" splits"" : null,
145+ "" additionalDetailsPreference"" : "" NoAdditionalDetails""
146+ }" ;
147+ JObject data = JObject .Parse (request );
148+ PaymentIntentRequest postBody = JsonConvert .DeserializeObject <PaymentIntentRequest >(data .ToString ());
142149
143150try
144151{
145- var response = apiInstance .SecurePaymentintentsPost (xApiKey , xAppKey , xVersion , origin , request );
152+ var response = apiInstance .SecurePaymentintentsPost (xApiKey , xAppKey , xVersion , origin , postBody );
146153 Console .WriteLine (response );
147154}
148155catch (ApiException e )
@@ -437,4 +444,3 @@ Authentication is handled via API keys in HTTP headers:
437444
438445* ** API Environments:** Use UAT for testing; switch to Production only after validation.
439446* ** Issues:** Report bugs or request features via the [ GitHub Issues] ( https://github.com/anddone-kit/AndDone-SecureAPI-ClientLibrary-DotNet/issues ) page.
440-
0 commit comments