Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Solved] Amazon App Store IAP Dead End

Discussion in 'Unity IAP' started by ldaughtry, Jun 10, 2016.

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

    ldaughtry

    Joined:
    Oct 30, 2012
    Posts:
    38
    Hey all,

    I'm at the end of my rope here. I have an app that is working correctly on iTunes and Google Play with IAP. On Kindle devices it works correctly using the local json file and test app method. But when I try and use it on the Amazon App store it never returns from UnityPurchasing.Initialize(). OnInitialized(blah) nor OnInitializedFailed() is never called. Some things I know are correct:

    - I have used the menu option to set it to the Amazon App Store variant of android IAP. (I've even verified before build that the correct setting is in the json file that modifies).
    - I know the device I'm testing on is online.
    - I know the device I'm testing on has in app purchasing enabled in the store.
    - I know the bundle, build, and version id are identical to what's on the store now.
    - I know the AndroidManifest.xml being used in the /Temp/Staging/ folder on build has the right provisions.

    HALP!?!?! Can anyone point to anything that may help me trouble shoot this? I've dug all over the forums and internet to no avail.
     
  2. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Are you attempting to test against Amazon's sandbox or locally using their app tester? Have you been through our configuration guide?

    Please capture a trace from your device using ADB from when you launch your Application and post any relevant errors.
     
  3. ldaughtry

    ldaughtry

    Joined:
    Oct 30, 2012
    Posts:
    38
    Ok, it was definitely in sandbox mode. But why? Snippet:
    D/d (14554): In App Purchasing SDK - Sandbox Mode: PurchasingListener registered: com.unity.purchasing.amazon.AmazonPurchasing@41d45770
    D/d (14554): In App Purchasing SDK - Sandbox Mode: PurchasingListener Context: com.unity3d.player.UnityPlayerActivity@41a969b8
    I/Unity (14554): initializing UnityPurchasing
    I/Unity (14554):
    I/Unity (14554): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
    I/Unity (14554):
    D/Unity Purchasing Amazon(14554): RetrieveProducts 30
    D/c (14554): In App Purchasing SDK - Sandbox Mode: sendGetUserDataRequest

    As stated above:
    • I have a Live app on the store.
    • I am ensuring that the editor thinks it's in Amazon Android Store mode.
    • I'm ensuring that the AndroidManifest.xml file has the entries as per your and Amazons docs (Unity is building them, they're not mine).
    <receiver android:name="com.amazon.device.iap.ResponseReceiver">
    <intent-filter>
    <action android:name="com.amazon.inapp.purchasing.NOTIFY" android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY" />
    </intent-filter>
    </receiver>

    • And every other store I work with is working fine so it's not the Unity code near as I can tell.
    But clearly it thinks it's in Sandbox mode. And I can't find a single way in any docs to specify sandbox mode or not save from here:
    https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/testing-iap-2.0

    Which as near as I can tell is telling me I shouldn't be in sandbox mode because I have a live app that has items with the proper sku's. But more importantly, I'm not even getting an initialize response right now because it thinks it's in sandbox mode and I can't figure out why or how to change it.
     
  4. ldaughtry

    ldaughtry

    Joined:
    Oct 30, 2012
    Posts:
    38
    Also, the device I'm on doesn't even have the Amazon App Tester or any type of product json on it.
     
  5. ldaughtry

    ldaughtry

    Joined:
    Oct 30, 2012
    Posts:
    38
    erika_d likes this.
  6. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Yes, you need to install it from the Amazon store for it to work against the live Amazon API.
     
    erika_d likes this.
Thread Status:
Not open for further replies.