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


Qt Code:
  1. Store
  2. {
  3. id: globalInAppStore
  4. Product
  5. {
  6. id: tbiosUnlockable
  7. identifier: "tbios_drugquery_temp_prod"
  8. type: Product.Unlockable
  9. onPurchaseFailed: {
  10. console.log("purchase failed!", transaction.orderId)
  11. }
  12. onPurchaseSucceeded: {
  13. console.log("purchase succeeded!", transaction.orderId)
  14. }
  15. }
  16. Product
  17. {
  18. id: tbiosYearlySubscription
  19. identifier: "tbios_drugquery_inappsub_yearly"
  20. type: Product.Consumable
  21. onStatusChanged: {
  22. switch (status)
  23. {
  24. case Product.PendingRegistration: console.debug("Registering " + identifier); break
  25. case Product.Registered: console.debug(identifier + " registered with price " + price); break
  26. case Product.Unknown: console.debug(identifier + " was not found in the market place"); break
  27. }
  28. }
  29. onPurchaseFailed: {
  30. console.log("purchase failed!", transaction.orderId)
  31. }
  32. onPurchaseSucceeded: {
  33. console.log("purchase succeeded!", transaction.orderId)
  34. }
  35. }
  36. }
To copy to clipboard, switch view to plain text mode 

And I call it like

Qt Code:
  1. tbiosYearlySubscription.purchase();
  2. tbiosUnlockable.purchase();
To copy to clipboard, switch view to plain text mode 

Any idea what could be causing this issue?