Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

[Solved] Purchasing Login Inconsistent

Discussion in 'Unity IAP' started by Mycroft, May 31, 2016.

Thread Status:
Not open for further replies.
  1. Mycroft

    Mycroft

    Joined:
    Aug 29, 2012
    Posts:
    160
    When I run our apk on my device, I'm able to log into purchasing without a problem.

    Like this
    Code (CSharp):
    1.  
    2. 05-31 13:57:28.738: I/UnityIAP(9727): invoking callback
    3. 05-31 13:57:28.738: I/UnityIAP(9727): Checking for in-app billing 3 support.
    4. 05-31 13:57:28.788: I/UnityIAP(9727): In-app billing version 3 supported for com.companyName.Project.Name
    5. 05-31 13:57:28.798: I/UnityIAP(9727): Subscriptions AVAILABLE.
    6. 05-31 13:57:28.798: I/UnityIAP(9727): onIabSetupFinished: 0
    7. 05-31 13:57:28.798: I/UnityIAP(9727): Requesting 3 products
    8. 05-31 13:57:28.798: I/UnityIAP(9727): QueryInventory: 3
    9. 05-31 13:57:28.798: I/UnityIAP(9727): invoking callback
    10. 05-31 13:57:28.798: I/UnityIAP(9727): Querying owned items, item type: inapp
    11. 05-31 13:57:28.798: I/UnityIAP(9727): Package name: com.companyName.Project.Name
    12. 05-31 13:57:28.798: I/UnityIAP(9727): Calling getPurchases with continuation token: null
    13. 05-31 13:57:28.808: I/UnityIAP(9727): Owned items response: 0
    14. 05-31 13:57:28.808: I/UnityIAP(9727): Continuation token: null
    15. 05-31 13:57:28.808: I/UnityIAP(9727): Querying SKU details.
    16. 05-31 13:57:28.898: I/UnityIAP(9727): Got sku details: SkuDetails:{"title":"Purchase 100  Points  (Project.Name)","price":"$0.99","type":"inapp","description":"Purchase 100 points to use in project","price_amount_micros":990000,"price_currency_code":"USD","productId":"manoke_purchase_points_0"}
    17. 05-31 13:57:28.898: I/UnityIAP(9727): Got sku details: SkuDetails:{"title":"Purchase 1000 Points (Project.Name)","price":"$4.99","type":"inapp","description":"Purchase Points for use in (Project.Name)","price_amount_micros":4990000,"price_currency_code":"USD","productId":"manoke_purchase_points_1"}
    18. 05-31 13:57:28.898: I/UnityIAP(9727): Got sku details: SkuDetails:{"title":"Purchase 10,000 Points (Project.Name)","price":"$29.99","type":"inapp","description":"Purchase Points for use in project","price_amount_micros":29990000,"price_currency_code":"USD","productId":"manoke_purchase_points_2"}
    19. 05-31 13:57:28.898: I/UnityIAP(9727): Querying owned items, item type: subs
    20. 05-31 13:57:28.898: I/UnityIAP(9727): Package name: com.companyName.Project.Name

    But when others run the apk it ends up failing the Purchasing Login and saying that it's "Notifying Unity..."

    Code (CSharp):
    1.  
    2. 05-31 18:26:34.998: I/UnityIAP(24876): invoking callback
    3. 05-31 18:26:34.998: I/UnityIAP(24876): Checking for in-app billing 3 support.
    4. 05-31 18:26:35.008: W/Finsky(19521): [780] InAppBillingService.getPreferredAccount: com.companyName.Project.Name: No account found.
    5. 05-31 18:26:35.008: W/Finsky(19521): [780] InAppBillingService.checkBillingEnabled: Billing unavailable for this package and user.
    6. 05-31 18:26:35.008: I/UnityIAP(24876): onIabSetupFinished: 3
    7. 05-31 18:26:35.008: I/UnityIAP(24876): Failed to setup IAB. Notifying Unity...
    Any suggestions on the difference between the two....?
     
    Last edited: May 31, 2016
  2. Mycroft

    Mycroft

    Joined:
    Aug 29, 2012
    Posts:
    160
    The first was on Android, the second on iOS. The iOS Purchasing wasn't fully setup.
     
  3. rayw24

    rayw24

    Joined:
    May 23, 2016
    Posts:
    52
    Hi @Mycroft,

    On line 4 of the first snippet, is "com.CompanyName" your bundle ID or did you edit it for privacy reasons?

    Also, is the app currently in alpha/beta testing? If so, could it be possible that the devices that are testing this app not be authorized testers?

    Lastly, is it possible that you could be running on an older version of the market? Running on an older version of the market can cause these issues and it is explained more in depth here.

    Please let me know if this information was helpful.

    Ray
     
    Mycroft and erika_d like this.
  4. Mycroft

    Mycroft

    Joined:
    Aug 29, 2012
    Posts:
    160
    Yes, edited for privacy.

    I had updated to a recent version of Purchasing to avoid a recent error like this, so I was reasonably sure that wasn't the case.

    The problem turned out to be simple. I was testing on Android and another person was testing on iOS when I thought they were testing Android. The iOS store settings weren't setup correctly and would fail. Once the iOS IAP were setup comparable to the Google Play IAP it started connecting fine.


    Thanks for the update.
     
    erika_d likes this.
  5. rayw24

    rayw24

    Joined:
    May 23, 2016
    Posts:
    52
    @Mycroft, glad everything worked out! Feel free to reach out if you run into any other issues!
     
    erika_d likes this.
Thread Status:
Not open for further replies.