adaptyteam / AdaptySDK-Flutter

SDK for growing mobile in-app purchases
https://docs.adapty.io/docs/quickstart
MIT License
96 stars 17 forks source link

PurchaserInfo is empty after makePurchase on Android #66

Closed LoadJulz closed 1 year ago

LoadJulz commented 1 year ago

Hello,

I have the that the purchaserInfo's properties are empty after making a purchase with makePurchase on Android. On iOS it works as expected. There the accessLevel is set to the expected value after a successful purchase. On Android it doesn't set the accessLevel.

Here is the code that I execute:

final MakePurchaseResult makePurchaseResult =
            await Adapty.makePurchase(state.product!);

if (makePurchaseResult
                .purchaserInfo?.accessLevels['premium']?.isActive) {
// execution of code upon successful verification of purchase
}

Here is the flutter doctor output:

`[✓] Flutter (Channel stable, 3.3.7, on macOS 13.0 22A380 darwin-x64, locale de)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.73.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.`