From a96c071c7ea7cb62233917814340e400aa6c87d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:18:13 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20add=20new=20properties=20and=20update?= =?UTF-8?q?=20tests=20for=20payments=20processing=20-=20Added=20=E2=80=98S?= =?UTF-8?q?toreForFutureUse=E2=80=99=20to=20RequestNetworkTokenSource.=20-?= =?UTF-8?q?=20Added=20=E2=80=98PanTypeProcessed=E2=80=99=20and=20=E2=80=98?= =?UTF-8?q?CkoNetworkTokenAvailable=E2=80=99=20to=20ProcessingData.=20-=20?= =?UTF-8?q?Updated=20BankAccountFieldFormattingTest=20to=20skip=20unavaila?= =?UTF-8?q?ble=20test.=20-=20Enhanced=20HostedPaymentsIntegrationTest=20wi?= =?UTF-8?q?th=20=E2=80=98DisplayName=E2=80=99=20property.=20-=20Refined=20?= =?UTF-8?q?RequestApmPaymentsIntegrationTest=20to=20include=20validation?= =?UTF-8?q?=20of=20payment=20response.`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Payments/Request/Source/RequestNetworkTokenSource.cs | 2 ++ src/CheckoutSdk/Payments/Response/ProcessingData.cs | 4 ++++ .../Instruments/BankAccountFieldFormattingTest.cs | 2 +- .../Payments/Hosted/HostedPaymentsIntegrationTest.cs | 1 + .../Payments/RequestApmPaymentsIntegrationTest.cs | 5 +++-- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/CheckoutSdk/Payments/Request/Source/RequestNetworkTokenSource.cs b/src/CheckoutSdk/Payments/Request/Source/RequestNetworkTokenSource.cs index 094d5fb7..2adf88e1 100644 --- a/src/CheckoutSdk/Payments/Request/Source/RequestNetworkTokenSource.cs +++ b/src/CheckoutSdk/Payments/Request/Source/RequestNetworkTokenSource.cs @@ -21,6 +21,8 @@ public RequestNetworkTokenSource() : base(PaymentSourceType.NetworkToken) public string Eci { get; set; } public bool? Stored { get; set; } + + public bool? StoreForFutureUse { get; set; } public string Name { get; set; } diff --git a/src/CheckoutSdk/Payments/Response/ProcessingData.cs b/src/CheckoutSdk/Payments/Response/ProcessingData.cs index 4f74109e..85a88e03 100644 --- a/src/CheckoutSdk/Payments/Response/ProcessingData.cs +++ b/src/CheckoutSdk/Payments/Response/ProcessingData.cs @@ -46,5 +46,9 @@ public class ProcessingData public string MerchantCategoryCode { get; set; } public string SchemeMerchantId { get; set; } + + public PanProcessedType? PanTypeProcessed { get; set; } + + public bool? CkoNetworkTokenAvailable { get; set; } } } \ No newline at end of file diff --git a/test/CheckoutSdkTest/Instruments/BankAccountFieldFormattingTest.cs b/test/CheckoutSdkTest/Instruments/BankAccountFieldFormattingTest.cs index 6137f78c..a6c4861f 100644 --- a/test/CheckoutSdkTest/Instruments/BankAccountFieldFormattingTest.cs +++ b/test/CheckoutSdkTest/Instruments/BankAccountFieldFormattingTest.cs @@ -12,7 +12,7 @@ public BankAccountFieldFormattingTest() : base(PlatformType.DefaultOAuth) { } - [Fact] + [Fact(Skip = "unavailable")] private async Task ShouldGetBankAccountFieldFormatting() { BankAccountFieldQuery query = new BankAccountFieldQuery diff --git a/test/CheckoutSdkTest/Payments/Hosted/HostedPaymentsIntegrationTest.cs b/test/CheckoutSdkTest/Payments/Hosted/HostedPaymentsIntegrationTest.cs index 4309da63..5bafb6e9 100644 --- a/test/CheckoutSdkTest/Payments/Hosted/HostedPaymentsIntegrationTest.cs +++ b/test/CheckoutSdkTest/Payments/Hosted/HostedPaymentsIntegrationTest.cs @@ -70,6 +70,7 @@ protected static HostedPaymentRequest CreateHostedPaymentRequest() Reference = "reference", Currency = Currency.GBP, Description = "Payment for Gold Necklace", + DisplayName = "Gold Necklace", Customer = customer, Shipping = shippingDetails, Billing = billing, diff --git a/test/CheckoutSdkTest/Payments/RequestApmPaymentsIntegrationTest.cs b/test/CheckoutSdkTest/Payments/RequestApmPaymentsIntegrationTest.cs index 7bbc8502..fa3265b9 100644 --- a/test/CheckoutSdkTest/Payments/RequestApmPaymentsIntegrationTest.cs +++ b/test/CheckoutSdkTest/Payments/RequestApmPaymentsIntegrationTest.cs @@ -378,8 +378,9 @@ private async Task ShouldMakeKnetPayment() FailureUrl = "https://testing.checkout.com/failure" }; - await CheckErrorItem(async () => await DefaultApi.PaymentsClient().RequestPayment(request), - PayeeNotOnboarded); + var paymentResponse = await DefaultApi.PaymentsClient().RequestPayment(request); + paymentResponse.ShouldNotBeNull(); + } [Fact]