I would like to redirect the user in the App upon a successful purchase.
```
const purchaseResult = await Purchases.purchaseStoreProduct({
product: productToBuy
});
```
How/where would I call this redirect?
I would like to redirect the user in the App upon a successful purchase.
```
const purchaseResult = await Purchases.purchaseStoreProduct({
product: productToBuy
});
```
How/where would I call this redirect?
Hey
You will want to tap into the customerInfo object to verify a successful purchase. The purchase(package:)
completion block will contain an updated CustomerInfo object if successful, along with some details about the transaction. If the error
object is present, then the purchase failed. See our guide on Error Handling for the specific error types. The userCancelled
boolean is a helper for handling user cancellation errors. There will still be an error object if the user cancels, but you can optionally check the boolean instead of unwrapping the error completely.
Let me know if that helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.