observe
Observe purchases made without using Paywalls.
This method allows you to track purchases that happen outside of Superwall's paywall flow. It handles different states of the purchase process including start, completion, and errors.
Note: The shouldObservePurchases option must be enabled in SuperwallOptions for this to work.
Parameters
state
The current state of the purchase to observe, can be:
PurchaseWillBegin: When a purchase flow is about to start
PurchaseResult: When a purchase completes successfully
PurchaseError: When a purchase fails with an error