Problem with purchase after purchase

Hello friends,
I can perform the purchase test after the purchase in the application I have made. But when I go back in the application or close and open it, the purchase section appears again. What I want is that the airtable extension, which is not visible after the purchase, is permanently opened and closed for purchase again.
Where am I doing wrong?



Thanks.

2 Likes

hello @polygram

you may use TinyDb for that.

Use tiny db as @Ariyan_AD said.

1 Like

usually you should always check the purchased products before doing anything…
i.e. only if you own the product then hide the purchase section…
however the Kodular billing component does not offer Acknowledgements, which means, you have to Consume the product after purchasing it, else the user will get the purchase refunded after 3 days…
therefore use TinyDB… however this also has disadvantages, because the user can’t switch the device then…

how you can do it correctly see my billing extension App Inventor Extensions: Billing | Pura Vida Apps, which offers an AutoAcknowledgement feature…

Taifun

Thanks for the feedback. I will buy your extension. but I’m not sure if my usage of tinydb is correct. Can you take a look at my blocks above please? Have I used them correctly?

you do not need TinyDB anymore to store anything about the billing process if you are using my billing extension
Taifun

1 Like

Hello Taifun,
Your Extension works great (Purchase, Subscription etc.)

But there is one thing I can’t do. I want to create After Purchased status like in kodular. What can I use instead of this option in your extension.
So, in short, I want; ‘Make this Airlist table visible after Subscribing to this product id’

In my Console test, after the subscription ends, my Air table remains open. I want it closed again.
What path should I follow?
Thanks.

follow the Example App 3: Simple Subscription and read the notes there
https://puravidaapps.com/billing.php

Taifun

Your example doesn’t quite match what I’m looking for. Everything is fine in internal testing. but the Airtable list, which should appear after subscription purchase, only appears once. When I go to the home page or any page, the Airtable list does not stay persistent and disappears. I handled this with ‘Got Owned Purchased’ in Kodular.

What should I do to make the airtable list permanent and visible after purchase and subscription until the end of subscription in Taifun Billin?

each time you are coming back to your screen use the PurchasedSubscriptions method together with the GotPurchasedSubscriptions event as shown in tbe example

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

I have 3 separate subscription systems on 7 different pages. A total of 21 different product ids were defined.
For example, I want the Airtable image to be opened when the monthly subscription is clicked.
When I go back to the home screen or buy again, the airtable becomes invisible.
Also, when I go to another purchase page, the airtable opens once and then disappears. So all subscriptions seem to trigger all product id subscriptions.

Screen Shot 2021-11-13 at 17.53.29

I tried your method as in the example, but it didn’t work either.

Screen Shot 2021-11-13 at 17.58.07

In this method, the airtable is only opened once. It does not stay permanently on the subscriber’s phone.
Screen Shot 2021-11-13 at 18.05.19

I even tried this method that you didn’t recommend. :slight_smile: I’m doing wrong somewhere, but I couldn’t figure out where.


only start the connection during screen initialize
all other method calls move to the Setup finished event

Unbenannt2
you should check listAcknowledged for your product ids… a list is not a boolean value…
if your product id is in the list then for example set your arrangement to visible = true


it does not make sense to use that event to get the state of other product ids

in the GotPurchasedSubscriptions event you get a list of purchased subscriptions back

from the documentation

Event indicating that list of purchased subscriptions has been received. The following parameter are available

  1. listProductIds (all purchased productIds, can also contain pending subscriptions),
  2. listAcknowledged (list of product ids, which have been acknowledged),
  3. listNotAcknowledged (list of product ids, which are in state Purchased and are ready to be acknowledged) and
  4. jsonArray (an array of jsonObjects with details for each product id
    If property AutoAcknowledge is true, then for products found in list listNotAcknowledged the Acknowledge process will be triggered automatically.

Taifun

1 Like