Skip to main content
Solved

purchasepackage is working for monthly subscription but same code is not working for annual subscription

  • September 17, 2021
  • 1 reply
  • 114 views

Forum|alt.badge.img+4

Hi, I am using flutter to implement purchase package. My code looks like ;

 

_purchaserInfo = await Purchases.purchasePackage(packages.first);//print('purchase completed');appData.isPro = _purchaserInfo.entitlements.all["all_charts"]!.isActive;

 

This code is invoked on a click of a button. It works fine for monthly subscription but when I use same code for annual subscription, nothing is happening. I just get following messages;

 

D/[Purchases] - DEBUG(13801): ℹ️ Vending Offerings from cache
D/[Purchases] - DEBUG(13801): ℹ️ Checking if cache is stale AppInBackground false
 

Best answer by sharif

It seems like the SDK isn’t making the API calls to purchase the annual package. I would first check to make sure the following:

  1. You’re selecting the correct package to purchase (if you’re using syntax like packages.first, make sure you’re selecting the annual package.)
  2. If you can reproduce the issue in sandbox, try placing some breakpoints in your code, for example when the button is pressed, when purchasePackage is called, etc. to make sure you’re hitting the correct code.
  3. From what you pasted it seems to me that purchasePackage simply isn’t being called, but feel free to paste the entire debug logs from when you launch the app all the way until you hit the bug.

Let me know if the tips above don’t help!

View original
Did this post help you find an answer to your question?

1 reply

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • Answer
  • September 20, 2021

It seems like the SDK isn’t making the API calls to purchase the annual package. I would first check to make sure the following:

  1. You’re selecting the correct package to purchase (if you’re using syntax like packages.first, make sure you’re selecting the annual package.)
  2. If you can reproduce the issue in sandbox, try placing some breakpoints in your code, for example when the button is pressed, when purchasePackage is called, etc. to make sure you’re hitting the correct code.
  3. From what you pasted it seems to me that purchasePackage simply isn’t being called, but feel free to paste the entire debug logs from when you launch the app all the way until you hit the bug.

Let me know if the tips above don’t help!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings