@@ -31,33 +31,6 @@ codeunit 139566 "Shpfy Payments Test"
3131 isInitialized := true;
3232 end ;
3333
34- [Test]
35- procedure UnitTestImportPayoutWithExternalTraceId()
36- var
37- Payout: Record "Shpfy Payout";
38- PaymentsAPI: Codeunit "Shpfy Payments API";
39- Id: BigInteger ;
40- ExpectedExternalTraceId: Text ;
41- JPayout: JsonObject ;
42- begin
43- // [SCENARIO] Import payout correctly imports the externalTraceId field (2026-01 API)
44- Initialize() ;
45-
46- // [GIVEN] A random Generated Payout with externalTraceId
47- Id := Any. IntegerInRange( 10000 , 99999 ) ;
48- ExpectedExternalTraceId := Any. AlphanumericText( 50 ) ;
49- JPayout := GetRandomPayout( Id, ExpectedExternalTraceId) ;
50-
51- // [WHEN] Invoke the function ImportPayout(JPayout)
52- PaymentsAPI. SetShop( Shop) ;
53- PaymentsAPI. ImportPayout( JPayout) ;
54-
55- // [THEN] We must find the "Shpfy Payout" record with the correct externalTraceId and Shop Code
56- LibraryAssert. IsTrue( Payout. Get( Id) , ' Get "Shpfy Payout" record' ) ;
57- LibraryAssert. AreEqual( ExpectedExternalTraceId, Payout. "External Trace Id", ' External Trace Id should match' ) ;
58- LibraryAssert. AreEqual( Shop. Code , Payout. "Shop Code", ' Shop Code should match' ) ;
59- end ;
60-
6134 [Test]
6235 procedure UnitTestImportPayoutBackfillsShopCode()
6336 var
@@ -71,7 +44,7 @@ codeunit 139566 "Shpfy Payments Test"
7144
7245 // [GIVEN] An existing payout record imported without a shop context (blank Shop Code)
7346 Id := Any. IntegerInRange( 10000 , 99999 ) ;
74- JPayout := GetRandomPayout( Id, Any . AlphanumericText ( 50 ) ) ;
47+ JPayout := GetRandomPayout( Id) ;
7548 PaymentsAPI. ImportPayout( JPayout) ;
7649 LibraryAssert. IsTrue( Payout. Get( Id) , ' Payout should be created' ) ;
7750 LibraryAssert. AreEqual( ' ' , Payout. "Shop Code", ' Shop Code should initially be blank' ) ;
@@ -85,7 +58,7 @@ codeunit 139566 "Shpfy Payments Test"
8558 LibraryAssert. AreEqual( Shop. Code , Payout. "Shop Code", ' Shop Code should be backfilled on existing payout' ) ;
8659 end ;
8760
88- local procedure GetRandomPayout( Id: BigInteger ; ExternalTraceId: Text ) : JsonObject
61+ local procedure GetRandomPayout( Id: BigInteger ) : JsonObject
8962 var
9063 JPayout: JsonObject ;
9164 JNet: JsonObject ;
@@ -95,7 +68,6 @@ codeunit 139566 "Shpfy Payments Test"
9568 begin
9669 JPayout. Add ( ' id' , StrSubstNo( PayoutGidTxt, Id)) ;
9770 JPayout. Add ( ' status' , ' SCHEDULED' ) ;
98- JPayout. Add ( ' externalTraceId' , ExternalTraceId) ;
9971 JPayout. Add ( ' issuedAt' , Format( Today, 0 , 9 )) ;
10072 JNet. Add ( ' amount' , Any. DecimalInRange( 1000 , 2 )) ;
10173 JNet. Add ( ' currencyCode' , ' USD' ) ;
0 commit comments