diff --git a/Sources/Purchasing/Purchases/PurchasesOrchestrator.swift b/Sources/Purchasing/Purchases/PurchasesOrchestrator.swift index 6ddd4a36ed..691bd8eb62 100644 --- a/Sources/Purchasing/Purchases/PurchasesOrchestrator.swift +++ b/Sources/Purchasing/Purchases/PurchasesOrchestrator.swift @@ -1139,11 +1139,19 @@ private extension PurchasesOrchestrator { return } + let transactionData: PurchasedTransactionData = .init( + appUserID: currentAppUserID, + presentedOfferingContext: nil, + unsyncedAttributes: unsyncedAttributes, + source: .init( + isRestore: isRestore, + initiationSource: initiationSource + ) + ) + self.backend.post(receipt: .empty, productData: nil, - transactionData: .init(appUserID: currentAppUserID, - source: .init(isRestore: isRestore, - initiationSource: initiationSource)), + transactionData: transactionData, observerMode: self.observerMode, appTransaction: appTransactionJWS) { result in diff --git a/Tests/StoreKitUnitTests/PurchasesOrchestratorSK2Tests.swift b/Tests/StoreKitUnitTests/PurchasesOrchestratorSK2Tests.swift index b4706add06..a0e723a2df 100644 --- a/Tests/StoreKitUnitTests/PurchasesOrchestratorSK2Tests.swift +++ b/Tests/StoreKitUnitTests/PurchasesOrchestratorSK2Tests.swift @@ -578,6 +578,8 @@ class PurchasesOrchestratorSK2Tests: BasePurchasesOrchestratorTests, PurchasesOr expect(self.backend.invokedPostReceiptData).to(beTrue()) expect(self.backend.invokedPostReceiptDataParameters?.data) == .jws(transaction.jwsRepresentation!) + expect(self.backend.invokedPostReceiptDataParameters?.transactionData.unsyncedAttributes).toNot(beNil()) + expect(self.backend.invokedPostReceiptDataParameters?.transactionData.presentedOfferingContext).to(beNil()) expect(customerInfo) == mockCustomerInfo }