Problem Implementing 2 Product IDs for In-App Purchases

I have 2 product IDs in my app. I’m trying to code it to sell 2 products, but I couldn’t do it and it really frustrated me. Thanks in advance.

You use the WebViewStringChange event
So how do you change that string? Can you show us the corresponding parts in your html file?

Taifun

if (window.AppInventor && window.AppInventor.setWebViewString) {
window.AppInventor.setWebViewString(“10ipucu”);
if (window.AppInventor && window.AppInventor.setWebViewString) {
window.AppInventor.setWebViewString(“20ipucu”);

I can sell the first product in my store, but I have three products in total. In the “Blocks I Want” section, I want to be able to manage three product IDs. Why does only the first product ID work?
ipucu10 is ready for sales transactions, but the ipucu20 section does not work.

Show us what is your getvalue that comes in webviewstring change event for all the three products, so that we can help u further

Also tell us how this event triggered when billing triggers

I wanted to simplify the question a bit. There are two product IDs: when button 1 is clicked, the ID named gazi should be triggered; when button 2 is clicked, the ID named meva should be triggered.


When button is clicked connectionbhas been started

Then in the hit product details why dont you try with if (then else) getID = {s you above said id and try}?

Why do you use webstring got change event for this?


I solved most of the problem. But my current issue is that I couldn’t trigger the payment system, which is activated by a button, using a WebView string change. How can I fix this? I tested it, and the values coming from the WebView string are correct

I can use it without any issues when I use a button.