I am using react native library/sdk on Android to complete a purchase and want to get clarification on how to know the purchase completed successfully. Using this example, i call
await Purchases.purchasePackage(package)
but this evaluates to false:
typeof customerInfo.entitlements.active.my_entitlement_identifier !== "undefined"
and it is considered not a successful purchase even though in the OS it said purchase was done ok.
seems like my_entitlement_identifier is undefined.
Any idea why this would happen?
The resulting customerInfo has activeSubscriptions populated to it is telling me it was a success. What is the best way to know it was done successfully? Just compare the product id of the purchase with the one inside activeSubscriptions?
productIdentifier coming from the promise is just the name of the subscription and does not include the base so that was not enough to tell..