loadPurchasedProducts

suspend fun loadPurchasedProducts(serverEntitlementsByProductId: Map<String, Set<Entitlement>>)(source)

Loads purchased products from device receipts and builds enriched entitlements.

This method:

  1. Queries all purchases from Google Play

  2. Builds enriched entitlements using server entitlement definitions

  3. Creates device CustomerInfo from the receipts

  4. Stores the device CustomerInfo and triggers merge with web info

Parameters

serverEntitlementsByProductId

Map of product ID to entitlements from config