Closed mrgnhnt96 closed 2 years ago
Hey @mrgnhnt96!
The SDK is reporting both as eligible, because the sandbox user that is testing has never made a purchase of either of those products, and the SDK was able to find the introductory price object on the product object, indicating there should be an introductory price. A separate Apple ID having previously made a purchase won't affect this method's result.
Ultimately it's up to Apple to actually apply that introductory price in the system payment sheet- our SDK doesn't do anything to specifically apply it to the purchase as it happens automatically. Somehow, Apple's system sheet is determining that this purchase should not apply the intro price (my best guess is that it's just a sandbox quirk, maybe a propagation issue if you recently added that introductory price).
Describe the bug
Subscription Data:
Available:
Personal Apple Id:
New Sandbox Apple Id:
As expected,
checkTrialOrIntroductoryPriceEligibility
isIntroEligibilityStatus.introEligibilityStatusEligible
for both Monthly & Yearly subscriptions because the sandbox user has no subscriptions.When I attempt to purchase the Monthly subscription, the purchase prompt offers the intro price, which is expected. When I attempt to purchase the Yearly subscription, the purchase prompt does NOT offer the intro price, which is not expected.
I think that this is because my personal apple id has a past yearly subscription & its being referenced to determine whether to offer the intro price to the sandbox user.
As we are handling multiple apple ids (personal & sandbox) in a debug environment, I don't believe that this is a production issue, only testing.
Additional Details
flutter doctor
Flutter Doctor
Flutter Doctor
```console [✓] Flutter (Channel stable, 2.5.3, on macOS 11.5.2 20G95 darwin-x64, locale en-US) [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3) ✗ 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 [✓] Chrome - develop for the web [✓] Android Studio (version 4.1) [✓] VS Code (version 1.62.1) [✓] VS Code (version 1.44.1) [✓] Connected device (3 available) ```Debug Logs
Monthly Logs
```console [Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/5AA169DF-BFF9-412E-8364-0E5A0ECB2CF8/StoreKit/sandboxReceipt [Purchases] - DEBUG: ℹ️ Attempting to check intro eligibility locally [Purchases] - INFO: ℹ️ Receipt parsed successfully [Purchases] - DEBUG: ℹ️ Skipping products request because products were already cached. products: {( CSECommunityMonthlyiOS )} [Purchases] - DEBUG: ℹ️ Local intro eligibility computed locally. Result: { CSECommunityMonthlyiOS = 2; } flutter: Intro Eligibility for "CSECommunityMonthlyiOS": "IntroEligibilityStatus.introEligibilityStatusEligible" [Purchases] - DEBUG: ℹ️ Vending Offerings from cache [Purchases] - DEBUG: ℹ️ makePurchase [Purchases] - DEBUG: 💰 Purchasing product from package - CSECommunityMonthlyiOS in Offering default [Purchases] - DEBUG: ℹ️ PaymentQueue updatedTransaction: CSECommunityMonthlyiOS (null) ((null)) (null) - 0 ```Yearly Logs
```console [Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/5AA169DF-BFF9-412E-8364-0E5A0ECB2CF8/StoreKit/sandboxReceipt [Purchases] - DEBUG: ℹ️ Attempting to check intro eligibility locally [Purchases] - INFO: ℹ️ Receipt parsed successfully [Purchases] - DEBUG: ℹ️ Skipping products request because products were already cached. products: {( CSECommunityYearlyiOS )} [Purchases] - DEBUG: ℹ️ Local intro eligibility computed locally. Result: { CSECommunityYearlyiOS = 2; } flutter: Intro Eligibility for "CSECommunityYearlyiOS": "IntroEligibilityStatus.introEligibilityStatusEligible" [Purchases] - DEBUG: ℹ️ Vending Offerings from cache [Purchases] - DEBUG: ℹ️ makePurchase [Purchases] - DEBUG: 💰 Purchasing product from package - CSECommunityYearlyiOS in Offering default [Purchases] - DEBUG: ℹ️ PaymentQueue updatedTransaction: CSECommunityYearlyiOS (null) ((null)) (null) - 0 ```