"Exception: Product %r is has not been registered." Google Play in app purchases issue.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

"Exception: Product %r is has not been registered." Google Play in app purchases issue.

#1 Post by ComputerArt.Club »

I'm trying to set up in app purchases for a new game as per this thread: viewtopic.php?f=51&t=49196 and the wiki: https://www.renpy.org/doc/html/iap.html, but when I click on the buy button in the game it generates an error.

Below is the error generated from the emulated version on my PC, but the error is the same on my phone.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 1684, in script
    $ iap.purchase ("unlock_lvl")
  File "game/script.rpy", line 1684, in <module>
    $ iap.purchase ("unlock_lvl")
  File "renpy/common/00iap.rpy", line 409, in purchase
    p = get_product(product)
  File "renpy/common/00iap.rpy", line 393, in get_product
    raise Exception("Product %r is has not been registered.")
Exception: Product %r is has not been registered.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 1684, in script
    $ iap.purchase ("unlock_lvl")
  File "H:\Renpy\renpy-6.99.14.3-sdk\renpy\ast.py", line 862, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "H:\Renpy\renpy-6.99.14.3-sdk\renpy\python.py", line 1888, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script.rpy", line 1684, in <module>
    $ iap.purchase ("unlock_lvl")
  File "renpy/common/00iap.rpy", line 409, in purchase
    p = get_product(product)
  File "renpy/common/00iap.rpy", line 393, in get_product
    raise Exception("Product %r is has not been registered.")
Exception: Product %r is has not been registered.

Windows-7-6.1.7601-SP1
Ren'Py 6.99.14.3.3347
bpmf 1.0
Tue Jun 12 23:36:57 2018
I have it down as an in app product rather than subscription. The status is supposedly active. Not sure what is going on there.

Also, not getting an email from google after sending out an internal test to my email address, this is my first time trying that function, too.

code for the product:

Code: Select all

init:
    define unlock_lvl = iap.register(product = "pro", identifier = "bpmf.catmat", google = "Game title",)
the label (as of yet not been adjusted much as this is still being tested):

Code: Select all

label label_billing:
    $ iap.purchase ("unlock_lvl")
    "If the payment is successful, the game will continue."
    if iap.has_purchased ("unlock_lvl"):
        "Thank you for purchasing the level! Continue the game"
        $ MainMenu(confirm=False)()
    else:
        "Payment canceled"
The product ID on Google Play is: "pro" (stupid name and not accurate, might change it if I get it to work) and the status is marked as active.
Probably something stupid, either that or I just need to wait for something to happen on Google's side regarding the registration of this in-app product.

Any ideas? Anyone else had a similar problem? Thanks again!

Post Reply

Who is online

Users browsing this forum: No registered users