Hi! I registered two in-app products on Google Play. One Unlockable Managed Product and another Consumable Subscription type product. Then following the instruction given in 'Qt Purchasing' documentation I added the required code. However, I can successfully start purchase flow (call purchase() method) on Unlockable Managed Product but when I call purchase() on the Consumable Subscription Type product, I get error Attempted to purchase unregistered product
Here is my code
Store
{
id: globalInAppStore
Product
{
id: tbiosUnlockable
identifier: "tbios_drugquery_temp_prod"
type: Product.Unlockable
onPurchaseFailed: {
console.log("purchase failed!", transaction.orderId)
}
onPurchaseSucceeded: {
console.log("purchase succeeded!", transaction.orderId)
}
}
Product
{
id: tbiosYearlySubscription
identifier: "tbios_drugquery_inappsub_yearly"
type: Product.Consumable
onStatusChanged: {
switch (status)
{
case Product.PendingRegistration: console.debug("Registering " + identifier); break
case Product.Registered: console.debug(identifier + " registered with price " + price); break
case Product.Unknown: console.debug(identifier + " was not found in the market place"); break
}
}
onPurchaseFailed: {
console.log("purchase failed!", transaction.orderId)
}
onPurchaseSucceeded: {
console.log("purchase succeeded!", transaction.orderId)
}
}
}
Store
{
id: globalInAppStore
Product
{
id: tbiosUnlockable
identifier: "tbios_drugquery_temp_prod"
type: Product.Unlockable
onPurchaseFailed: {
console.log("purchase failed!", transaction.orderId)
}
onPurchaseSucceeded: {
console.log("purchase succeeded!", transaction.orderId)
}
}
Product
{
id: tbiosYearlySubscription
identifier: "tbios_drugquery_inappsub_yearly"
type: Product.Consumable
onStatusChanged: {
switch (status)
{
case Product.PendingRegistration: console.debug("Registering " + identifier); break
case Product.Registered: console.debug(identifier + " registered with price " + price); break
case Product.Unknown: console.debug(identifier + " was not found in the market place"); break
}
}
onPurchaseFailed: {
console.log("purchase failed!", transaction.orderId)
}
onPurchaseSucceeded: {
console.log("purchase succeeded!", transaction.orderId)
}
}
}
To copy to clipboard, switch view to plain text mode
And I call it like
tbiosYearlySubscription.purchase();
tbiosUnlockable.purchase();
tbiosYearlySubscription.purchase();
tbiosUnlockable.purchase();
To copy to clipboard, switch view to plain text mode
Any idea what could be causing this issue?
Bookmarks