diff --git a/src/Mollie.Api/Models/Payment/Request/PaymentSpecificParameters/CreditCardPaymentRequest.cs b/src/Mollie.Api/Models/Payment/Request/PaymentSpecificParameters/CreditCardPaymentRequest.cs index b60af7d2..217e27b0 100644 --- a/src/Mollie.Api/Models/Payment/Request/PaymentSpecificParameters/CreditCardPaymentRequest.cs +++ b/src/Mollie.Api/Models/Payment/Request/PaymentSpecificParameters/CreditCardPaymentRequest.cs @@ -4,18 +4,6 @@ public CreditCardPaymentRequest() { Method = PaymentMethod.CreditCard; } - /// - /// The card holder�s address details. We advise to provide these details to improve the credit card - /// fraud protection, and thus improve conversion. - /// - public AddressObject? BillingAddress { get; set; } - - /// - /// The shipping address details. We advise to provide these details to improve the credit card fraud - /// protection, and thus improve conversion. - /// - public AddressObject? ShippingAddress { get; set; } - /// /// The card token you get from Mollie Components. The token contains the card information /// (such as card holder, card number and expiry date) needed to complete the payment. diff --git a/src/Mollie.Api/Models/Payment/Request/PaymentSpecificParameters/PayPalPaymentRequest.cs b/src/Mollie.Api/Models/Payment/Request/PaymentSpecificParameters/PayPalPaymentRequest.cs index 204f19e1..ff6cb7cc 100644 --- a/src/Mollie.Api/Models/Payment/Request/PaymentSpecificParameters/PayPalPaymentRequest.cs +++ b/src/Mollie.Api/Models/Payment/Request/PaymentSpecificParameters/PayPalPaymentRequest.cs @@ -4,12 +4,6 @@ public PayPalPaymentRequest() { Method = PaymentMethod.PayPal; } - /// - /// The shipping address details. We advise to provide these details to improve PayPal�s fraud protection, - /// and thus improve conversion. - /// - public AddressObject? ShippingAddress { get; set; } - /// /// The unique ID you have used for the PayPal fraud library. You should include this if you use PayPal /// for an on-demand payment. The maximum character length is 32. diff --git a/tests/Mollie.Tests.Unit/Client/PaymentClientTests.cs b/tests/Mollie.Tests.Unit/Client/PaymentClientTests.cs index f64ba406..65ece2f2 100644 --- a/tests/Mollie.Tests.Unit/Client/PaymentClientTests.cs +++ b/tests/Mollie.Tests.Unit/Client/PaymentClientTests.cs @@ -563,7 +563,7 @@ public async Task CreatePaymentAsync_CreditcardPayment_RequestAndResponseAreConv Method = PaymentMethod.Ideal, RedirectUrl = "http://www.mollie.com", WebhookUrl = "http://www.mollie.com/webhook", - BillingAddress = new AddressObject() + BillingAddress = new PaymentAddressDetails() { City = "Amsterdam", Country = "NL", @@ -571,7 +571,7 @@ public async Task CreatePaymentAsync_CreditcardPayment_RequestAndResponseAreConv Region = "Noord-Holland", StreetAndNumber = "Keizersgracht 313" }, - ShippingAddress = new AddressObject() + ShippingAddress = new PaymentAddressDetails() { City = "Amsterdam", Country = "NL", @@ -582,6 +582,14 @@ public async Task CreatePaymentAsync_CreditcardPayment_RequestAndResponseAreConv CardToken = "card-token" }; const string jsonRequest = @"{ + ""cardToken"": ""card-token"", + ""amount"": { + ""currency"": ""EUR"", + ""value"": ""100.00"" + }, + ""description"": ""Description"", + ""redirectUrl"": ""http://www.mollie.com"", + ""webhookUrl"": ""http://www.mollie.com/webhook"", ""billingAddress"": { ""streetAndNumber"": ""Keizersgracht 313"", ""postalCode"": ""1000AA"", @@ -596,14 +604,6 @@ public async Task CreatePaymentAsync_CreditcardPayment_RequestAndResponseAreConv ""region"": ""Noord-Holland"", ""country"": ""NL"" }, - ""cardToken"": ""card-token"", - ""amount"": { - ""currency"": ""EUR"", - ""value"": ""100.00"" - }, - ""description"": ""Description"", - ""redirectUrl"": ""http://www.mollie.com"", - ""webhookUrl"": ""http://www.mollie.com/webhook"", ""method"": [ ""ideal"" ] @@ -636,7 +636,7 @@ public async Task CreatePaymentAsync_CreditcardPayment_RequestAndResponseAreConv }"; var mockHttp = CreateMockHttpMessageHandler(HttpMethod.Post, $"{BaseMollieClient.ApiEndPoint}payments", jsonResponse, jsonRequest); HttpClient httpClient = mockHttp.ToHttpClient(); - PaymentClient paymentClient = new PaymentClient("abcde", httpClient); + PaymentClient paymentClient = new("abcde", httpClient); // When: We send the request var result = await paymentClient.CreatePaymentAsync(paymentRequest);