In-app purchase bug?

Hi everyone (sorry for my bad English). I have installed the “in app purchases” extension on my game, everything works fine except for “paid subscriptions” when I have an active subscription and when I enter my game the “owned” status of that subscription is not confirmed and therefore remains in “false” ", the strange thing however is that if I quit the game and come back I change the status of “owned” from false to true. Anyone know why and how to fix this problem?

I didn’t try this extension, so I can’t help much, but there’s something I don’t understand.
What’s the difference between “when I enter my game” and “if I quit the game and come back”?

I don’t know what changes for the game but theoretically nothing should change, let me explain better, the first time I enter the game, it records the products in the store and downloads the information (such as price and other things) in a variable, theoretically if I have a active subscription the variable associated with the subscription should change state and become “owned” but this does not happen, but if I enter the game for the first time and exit leaving the application open in the background, when I return to the app the state of the variable changes and becomes “owned”. I don’t know why this happens since the variables are being downloaded every time the store is connected

I see.
Are you using a real phone for testing?
Can you share a screenshot of your events handling the variable changes you mention?

Excuse the wait but I was at work. I will try to be as concise and clear as possible

  1. initially I register the names of my items with the same id they have on Play Console

  2. I use the “watch the event” approved “” event to understand when the payment was made and I use “store data in scene variable” to create a structured scene variable with various information including the cost of the object and the state ie whether it is “owned” or not

  3. I use the “ads_ok” variable to understand when the payment was made and to be able to set “ads” (which is the id of my subscription) as delivered

  4. in this screenshot I created two options that I tried separately, first I tried to look at the “owned” event and set a variable as true, in the second case I used the subscription data downloaded earlier in the “ads” variable and so I checked if it was in the “owned” state or not

Nothing seems to work, I buy my subscription in the game, it is confirmed and I even get the status of “owned” the first time, but if I close the game and come back I cannot understand that I have that subscription, so I tried to redo the subscription and it tells me that I cannot change my subscription, but if I quit the game leaving it in the background and reopen it it changes the status of my subscription making it “owned”.
Sorry for the length but I tried to explain everything in the best possible way

What do you mean by “I cannot understand that I have the subscription”? You mean the Hide icon action is not executed?
It might be a bug, as this extension is experimental, but it might also be an issue of event sequence/order. The truncated screenshots prevent me from checking that.
Can you make a test scene with this feature only, test it on a real phone, and share a full screenshot if it doesn’t work?

On a side note, have you tried using another item type such as “non-consumable”?

Yes that’s right, the action “hide the icon” does not work

I have reproduced a simplified example with the same actions I have in the other app. I only added a second item classified as “non-consumable” to test if it works but I had already done this test in the other app and it didn’t work. But now I can’t test the app because I no longer have free builds to export it as .aab

@arthuro555 @Jurfix you are the only people I know who have used the IAP extension, do you know something about why paid subscriptions have this problem and not the rest?

The events seem fine btw.

I have not used extension, I don’t have the necessary google play license for that :stuck_out_tongue:
Though i have a few guesses:

  1. Maybe the event only triggers when you start owning the item? Try to verify the data of the item directly (here variable sub.owned)
  2. I think i recall something in the Cordova plugin documentation saying subscriptions require a verification server or something similar?

I thought that might be the problem too, but I tried and it doesn’t change anything :confused:

I don’t think so, I simply registered a subscription on the Play Console and when I purchase it my subscription with all the data appears on my Google Play in the “subscriptions” section

I haven’t tested subscriptions and therefore haven’t added them to my version of in-app purchases.

Please help me out with IAP. How to add in app purchase. I am having problem with IAP. (Showing Null in price display). How to fix this. Gdevelop IAP example also has same problem…

I am stuck with it for one week. Please Help…

I have exactly the same Problem… any Solutions?