@@ -15,6 +15,8 @@ protocol WPComPlanProduct {
1515
1616extension StoreKit . Product : WPComPlanProduct { }
1717
18+ typealias InAppPurchaseResult = StoreKit . Product . PurchaseResult
19+
1820protocol InAppPurchasesForWPComPlansProtocol {
1921 /// Retrieves asynchronously all WPCom plans In-App Purchases products.
2022 ///
@@ -33,7 +35,7 @@ protocol InAppPurchasesForWPComPlansProtocol {
3335 /// id: the id of the product to be purchased
3436 /// remoteSiteId: the id of the site linked to the purchasing plan
3537 ///
36- func purchaseProduct( with id: String , for remoteSiteId: Int64 ) async throws -> StoreKit . Product . PurchaseResult
38+ func purchaseProduct( with id: String , for remoteSiteId: Int64 ) async throws -> InAppPurchaseResult
3739
3840 /// Retries forwarding the product purchase to our backend, so the plan can be unlocked.
3941 /// This can happen when the purchase was previously successful but unlocking the WPCom plan request
@@ -73,7 +75,7 @@ final class InAppPurchasesForWPComPlansManager: InAppPurchasesForWPComPlansProto
7375 }
7476 }
7577
76- func purchaseProduct( with id: String , for remoteSiteId: Int64 ) async throws -> StoreKit . Product . PurchaseResult {
78+ func purchaseProduct( with id: String , for remoteSiteId: Int64 ) async throws -> InAppPurchaseResult {
7779 try await withCheckedThrowingContinuation { continuation in
7880 stores. dispatch ( InAppPurchaseAction . purchaseProduct ( siteID: remoteSiteId, productID: id, completion: { result in
7981 continuation. resume ( with: result)
0 commit comments