Skip to content

Commit 14143b2

Browse files
Update AFT properties and Fix Tests
1 parent 99cee71 commit 14143b2

File tree

4 files changed

+14
-24
lines changed

4 files changed

+14
-24
lines changed

src/CheckoutSdk/Payments/PaymentProcessing.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,9 @@ public class PaymentProcessing
4848

4949
public string MerchantCategoryCode { get; set; }
5050

51+
public long? SchemeMerchantId { get; set; }
52+
53+
public bool? Aft { get; set; }
54+
5155
}
5256
}

src/CheckoutSdk/Payments/Response/PaymentResponse.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Checkout.Common;
2-
using Checkout.Payments.Request;
32
using Checkout.Payments.Response.Source;
43
using Checkout.Payments.Util;
54
using Newtonsoft.Json;

test/CheckoutSdkTest/Payments/Contexts/PaymentContextsIntegrationTest.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@ private async Task ShouldMakeAKlarnaPaymentContextRequest()
7070
Processing = new PaymentContextsProcessing { Locale = "en-GB" }
7171
};
7272

73-
await CheckErrorItem(
74-
async () => await DefaultApi.PaymentContextsClient().RequestPaymentContexts(paymentContextsRequest),
75-
"apm_service_unavailable");
73+
var response = await DefaultApi.PaymentContextsClient().RequestPaymentContexts(paymentContextsRequest);
74+
75+
response.ShouldNotBeNull();
76+
response.Id.ShouldNotBeNull();
77+
response.PartnerMetadata.SessionId.ShouldNotBeNull();
78+
response.PartnerMetadata.ClientToken.ShouldNotBeNull();
79+
response.Links.ShouldNotBeNull();
7680
}
7781

7882
[Fact(Skip = "unavailable")]
@@ -93,10 +97,10 @@ private async Task ShouldMakeAStcpayPaymentContextRequest()
9397
new PaymentContextsItems { Name = "mask", Quantity = 1, UnitPrice = 1000, TotalAmount = 1000 }
9498
},
9599
};
100+
101+
var response = await DefaultApi.PaymentContextsClient().RequestPaymentContexts(paymentContextsRequest);
96102

97-
await CheckErrorItem(
98-
async () => await DefaultApi.PaymentContextsClient().RequestPaymentContexts(paymentContextsRequest),
99-
"apm_not_supported");
103+
response.ShouldNotBeNull();
100104
}
101105

102106
[Fact]

test/CheckoutSdkTest/Payments/RequestApmPaymentsIntegrationTest.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -489,23 +489,6 @@ await CheckErrorItem(async () => await DefaultApi.PaymentsClient().RequestPaymen
489489
PayeeNotOnboarded);
490490
}
491491

492-
[Fact(Skip = "Unavailable")]
493-
private async Task ShouldMakeKlarnaPayment()
494-
{
495-
var request = new PaymentRequest
496-
{
497-
Source = new RequestKlarnaSource { AccountHolder = GetAccountHolder() },
498-
Currency = Currency.QAR,
499-
Amount = 10,
500-
Reference = Guid.NewGuid().ToString(),
501-
SuccessUrl = "https://testing.checkout.com/sucess",
502-
FailureUrl = "https://testing.checkout.com/failure"
503-
};
504-
505-
await CheckErrorItem(async () => await DefaultApi.PaymentsClient().RequestPayment(request),
506-
ApmServiceUnavailable);
507-
}
508-
509492
[Fact(Skip = "Unavailable")]
510493
private async Task ShouldMakePayPalPayment()
511494
{

0 commit comments

Comments
 (0)