Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
team_wrg's avatar
team_wrg
Honored Guest
3 years ago

IAP LaunchCheckoutFlow Dialog closing immediately on launch

Hi,
We have been trying to integrate Add-ons into our app. However, on invoking the 

IAP.LaunchCheckoutFlow(sku).OnComplete((message) => { ... });

method, we encountered an issue where the dialog appeared, displayed a loading indicator, and then closed immediately. Upon checking the logcat, we found no abnormal logs. However, we did notice a message containing the grant time, expiration time, and add-on details. Also, The OnComplete callback is never fired and no errors are thrown.

To verify this information, we called the S2S API, but the response did not contain the add-on. We are uncertain as to why the dialog is closing immediately and would greatly appreciate any assistance.

Thank you in advance.

5 Replies

Replies have been turned off for this discussion
    • Mohammed_hashim's avatar
      Mohammed_hashim
      Start Partner

      Mine fixed by itself, But here are some of the things I made
      - Either because my IAP was free and I made another one but this time I made it Paid, I think if its Free then it will auto purchase it at first without asking you, and then the pop up never opense since you own it.
      - Or the issue was related Oculus server not being ready, make sure to give it a few hours or a day after you publish your IAP, make sure to publish it from your oculus dash.
      - The last reason I can think is your own profile, try to download another game with IAP and see if it works.
      If none of the above worked, then probably outdated Oculus SDK issue. 

      • Cricket2718's avatar
        Cricket2718
        Explorer

        Thank you! I was able to fix the issue by doing:

        IAP.ConsumePurchase(skuToPurchase).OnComplete(callback);
        after the checkoutflow.