// Your app's code
await Adapty.activate("PUBLIC_SDK_KEY",
customerUserId: "YOUR_USER_ID");
// Make a purchase, Adapty handles the rest
final MakePurchaseResult makePurchaseResult =
await
Adapty.makePurchase(product);
if (makePurchaseResult?.purchaserInfo?.accessLevels
['premium'].isActive) {
// grant access to premium features
}
// Your app's code
Adapty.identify("your_user_id", this);
// Make a purchase, Adapty handles the rest
Adapty.makePurchase(product, null, this);
public void OnMakePurchase(PurchaserInfoModel purchaserInfo, string receipt, Dictionary<string, object> validationResult, ProductModel product, AdaptyError error) {
if (error == null) {
// successful purchase
}
}