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:
You’re selecting the correct package to purchase (if you’re using syntax like packages.first, make sure you’re selecting the annual package.)
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.
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.
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:
You’re selecting the correct package to purchase (if you’re using syntax like packages.first, make sure you’re selecting the annual package.)
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.
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.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.