Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit 489fd0e

Browse files
committed
fix: productId types
1 parent 87858c3 commit 489fd0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Models/Purchase.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import StoreKit
44
public struct OpenIapPurchase: Codable, Equatable {
55
// Core identification (PurchaseCommon required fields)
66
public let id: String
7+
public let productId: String
78
public let purchaseToken: String
89
public let transactionId: String
910
public let originalTransactionId: String?
@@ -105,7 +106,8 @@ public struct PurchaseOptions: Codable {
105106
extension OpenIapPurchase {
106107
init(from transaction: Transaction, jwsRepresentation: String? = nil) async {
107108
// Core identification
108-
self.id = transaction.productID
109+
self.id = String(transaction.id)
110+
self.productId = transaction.productID
109111
self.transactionId = String(transaction.id)
110112
self.originalTransactionId = transaction.originalID != 0 ? String(transaction.originalID) : nil
111113
self.purchaseToken = jwsRepresentation ?? String(transaction.id)

0 commit comments

Comments
 (0)