Important: Please read the Qt Code of Conduct -

Unable to create buy intent

  • The Qt Purchasing API ... on Android..
    E/QtInAppPurchase(31315): Unable to create buy intent. Response code: 7

    What does this mean?

    The purchase is of a "managed" product that is defined and registered on Google


  • The strange thing about this is that the purchase of in-app managed products used to work in my app. When it was a paid app.

    I the changed the app to from $3 to "FREE"..and changed the cost of the in-app-managed products.

    Now it does not work.

    Is this a Google Play thing or a bug in the Qt Purchasing API?

  • Lifetime Qt Champion


    I'd recommend bringing this question on the interest mailing list. You'll find there QtPurchasing's developers/maintainers. This forum is more user oriented.

  • @SGaist
    Thx. I must be a dummy. I can't figure out how to search the interest list.

  • Here is output from the Google Play Store instantiation..

    W/ContextImpl(15516): Implicit intents with startService are not safe: Intent { } android.content.ContextWrapper.bindService:517
    W/System.err(15516): org.json.JSONException: No value for orderId
    W/System.err(15516): at org.json.JSONObject.get(
    W/System.err(15516): at org.json.JSONObject.getString(
    W/System.err(15516): at
    W/System.err(15516): at$200(
    W/System.err(15516): at$1$
    W/System.err(15516): at
    D/Qt (15516): qrc:/AppMain.qml:394 (onCompleted): qml: AppMain:: AppStore::onCompleted: *****************

  • Lifetime Qt Champion

    To search or to post on it ? To post a question you should first subscribe to the list.

  • He wrote "search"... One should always search previous discussions before posting a question....

  • Lifetime Qt Champion

    @PSI_lbc You can use to search the archived messages.

  • @SGaist

    Thx.. Searching now.

  • Nothing current for the issue I'm seeing.
    Update: Reverted to previously known working versions on 2 different apps. Both are exhibiting similar issues.

    The app goes through the purchase process of an in-app managed product. The app gets a success signal, but then the transaction is cancelled (by Google?) and the transaction then gets a failed signal. Even though the transaction failed, the in-app product cannot be purchased again. And yes the tranactions are finalized()

    Even if the transaction was interrupted, the "success" signal is supposed to be resent when the store/product is created when the app starts up. No signal is sent at store creation by Google on subsequent app starts other than..

    W/System.err(21678): org.json.JSONException: No value for orderId
    W/System.err(21678): at org.json.JSONObject.get(
    W/System.err(21678): at org.json.JSONObject.getString(
    W/System.err(21678): at
    W/System.err(21678): at$200(
    W/System.err(21678): at$1$
    W/System.err(21678): at

  • An e-mail that went out to Google Play developers..that I did not get..I do not use gmail. :-(

    A guess would be that this affects everyone using the Qt Purchasing API.

    So the Purchasing API code that assumes an orderID will exist in a reply from Google, when it does not, probably breaks something causing the Purchasing API to throw an error.

    When can a fix be expected in the Qt Purchasing API ?

    --begin e-mail--

        Hello Google Play Developer,
        Beginning June 20, 2016, we’ll be making a change to test purchases for one-time in-app purchases (IAPs).
        Previously, test purchases for one-time IAPs generated order IDs. Starting June 20, 2016, one-time IAPs will not generate order IDs and will not appear in the Merchant Center. This behavior already applies to subscription IAPs.
        You can learn more about testing in-app billing in the Android Developers Help Center (which will be updated with the information above on June 20).
        Thanks for supporting Google Play,
        The Google Play Team

    --end e-mail--
    link to a discussion in Korean regarding the problem...

  • Lifetime Qt Champion

    Such an email shouldn't be gmail dependent but it seems you're not the only one not having received it.

    In any case, others concerned developers may have not received it yet. I'd recommend taking a look a the bug report system to see if it's something known, if not please consider opening a new report providing all the information you have about it. (that mail, the logs etc.) That will help get this fixed.

  • @SGaist

    I could be mistaken, but if I remember correctly, Google forces you to use a gmail account when creating a Developer Console id. I have a gmail account for that purpose only. I never access gmail. Which I assume is why I never got the msg.

    I opened a support request through my Qt Account.

  • Lifetime Qt Champion

    IIRC, you need a Google Account but it doesn't mean that you need a GMail account for that. In any case, it's a good thing you checked it.

    There will likely be a bug report created for that, please post the link here so other people may find it more easily :)

  • QtQTBUG-54518

    Qt Purchasing no longer works on Android %3D QTBUG AND text ~ purchasing

    Probably the same issue.

  • Lifetime Qt Champion

    Most likely yes.

    Thanks for the link !

  • I've been notified that this is "resolved".

    The "patch" involves about 4 lines of code. I assume the fixes are available on Git.

    I was told a formal library release downloadable by the is 1-2 months away.

  • Lifetime Qt Champion

    Good :)

    Thanks for the followup

Log in to reply