Skip to content

Commit

Permalink
feat: add new properties and update tests for payments processing (#450)
Browse files Browse the repository at this point in the history
- Added ‘StoreForFutureUse’ to RequestNetworkTokenSource.
- Added ‘PanTypeProcessed’ and ‘CkoNetworkTokenAvailable’ to ProcessingData.
- Updated BankAccountFieldFormattingTest to skip unavailable test.
- Enhanced HostedPaymentsIntegrationTest with ‘DisplayName’ property.
- Refined RequestApmPaymentsIntegrationTest to include validation of payment response.`
  • Loading branch information
armando-rodriguez-cko authored Jan 27, 2025
1 parent 91c2537 commit 55d2875
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down
4 changes: 4 additions & 0 deletions src/CheckoutSdk/Payments/Response/ProcessingData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public BankAccountFieldFormattingTest() : base(PlatformType.DefaultOAuth)
{
}

[Fact]
[Fact(Skip = "unavailable")]
private async Task ShouldGetBankAccountFieldFormatting()
{
BankAccountFieldQuery query = new BankAccountFieldQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 55d2875

Please sign in to comment.