Search Unity

IAP Plugin.- Test in Sandbox. Help!

Discussion in 'BlackBerry' started by SirMarley, Nov 20, 2014.

  1. SirMarley

    SirMarley

    Joined:
    Jul 26, 2014
    Posts:
    115
    Hey guys...

    I have made a game in Unity and after I checked all its functionality, I have uploaded it and saved it into a draft mode in my vendor portal

    Then I went ahead, I downloaded the game into my Z10 and I have tried to make a purchase of the "only item" I have listed for the game...

    First I named it FullGame and, when I tried to purchase it, it redirected me to purchase another application instead of the item... so, I went ahead, and I named it HungryRabbitFullGame... after waiting a couple of hours (before it was saying the game could not be bought), I have tried to purchase the IAP again, and it says:

    The content is not available (AW35016!)

    Does anyone have any clue on what is going on and how to fix it? ... I am just that step away for the game to be available :(

    Thanks!!!
     
  2. Elkis

    Elkis

    Joined:
    Jun 15, 2013
    Posts:
    87
    I was getting that very same error. It turned out I had to create an account with a different ID than my vendor's and add it as a sandbox tester. Then I had to download the draft of the game from the store in development mode with the new account and finally I was able to purchase the items for free.
    Hope it helps!
     
  3. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
  4. Elkis

    Elkis

    Joined:
    Jun 15, 2013
    Posts:
    87
  5. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Yes I bought this one, imported it and produced Red warnings, thats when I thought; got no time for this asset. I use Stans asset packs, wonderful, he just missing BlackBerry one..anyway we see how the free one works..
     
  6. Elkis

    Elkis

    Joined:
    Jun 15, 2013
    Posts:
    87
    Really? I had that issue when I was targeting a non-BlackBerry platform, had to add preprocessor directives to the imported scripts and remove some packages temporarily. It is a hassle, yes, but it's not like there are many options for BlackBerry :(
     
  7. lloydsummers

    lloydsummers

    Joined:
    May 17, 2013
    Posts:
    358
  8. lloydsummers

    lloydsummers

    Joined:
    May 17, 2013
    Posts:
    358
    I've had this exact error hit me this week, using the latest version of the Reign plugin and latest patched Unity 5.1.4.

    Step 1 - Create a sandboxed application, say com.x.game as the SKU
    Step 2 - Add tester ID to list of testers
    Step 3 - Add several SKU items to in app list. In my case com.x.game.id

    Now it's important to note that drafts still go through an internal BlackBerry process. So after you add them it usually takes hours but can take days to populate.

    Installing the app:
    Step 1 - Use a phone connected to the test ID
    Step 2 - Enable Development Mode
    Step 3 - In BlackBerry World swipe down, settings and select Development mode
    Step 4 - Enter game SKU and install

    Now Reign is able to collect the Payment prices for my SKU's about 75 percent of the time. Trying to purchase generates the error above.

    I can check on the SKU by putting it in the same Development Mode SKU box as I used to download the game. It is saying 'Unavailable for this device'. There could be several reasons for this, including that the error is the default when accessed outside of the gamespace. But I doubt it. In which case this could be a BlackBerry problem.

    The other possibility is maybe it requires a non domainesque SKU.

    Either way I'll open some tickets, talk to some staff and devs and if I find a solution I'll circle back here.
     
    MrEsquire likes this.
  9. lloydsummers

    lloydsummers

    Joined:
    May 17, 2013
    Posts:
    358
    Update for today,

    I was pretty tired when I posted here the other day. I ran my batch-tests this afternoon and identified a bigger issue with how I setup my store items. I've reconfigured the store on my device as well as the vendor portal. It takes the BlackBerry team (whats left of it) a few hours to allow the SKU's through. And in order to test the in-app-purchases, the application must be downloaded through BlackBerry world and not sideloaded through Unity. In this case, there was a code issue.

    I've uploaded a corrected BAR file back to the abyss, will see if it resolves my issue. Back to waiting.

    One of the architectural-type changes I did, is I ensured that my com.x.game.id matched the capitalization of the com.x.game - I don't know if it will make any difference or not. However, I did see an error saying "this application is not authorized to check the price of these items" when the application was querying in-app purchase item prices and I know that the SKU's and SKU lookups are case sensitive. It seems like a good practice to me anyway. Will drop a line once it is (or isn't) successful.
     
    Wadjey and MrEsquire like this.
  10. lloydsummers

    lloydsummers

    Joined:
    May 17, 2013
    Posts:
    358
    Update : yup, I can confirm it's working this morning. All the in app purchases worked.

    So my suggestion is to log into the vendor portal:
    - Add your BlackBerry ID to the testers list
    Note: You cannot review any apps you install as a sandbox user. And you cannot make actual purchases. You can tell a purchase won't complete if it has 0 taxes and you don't get a paypal receipt.
    - Create App SKU (NOT com.x.game - that should be the internal package name only)
    - Create Inapp SKU's under under application (com.x.game.iapsku is OK here)
    Note: The SKU is the weird box at the bottom. It says it's only used for analytics but it's what we use for Unity too

    In the app:
    - Add your inapp purchase code (use sku com.x.game.iapsku)
    - Trace the request including requested ID well into the log
    Note: You want to check this carefully against the SKU you used in BlackBerry World. Remember that capitalization matters.

    Check the app:
    - Do a debug build and install it over USB
    - Run the app, do the debug, pull the log, validate the string
    - Upload the bar as a draft

    Wait for BlackBerry World to become active
    - Enable development mode on your BlackBerry (Settings -> Security)
    - Open BlackBerry World and access development SKUs (Settings -> Development mode)
    - Put the SKU for your app in
    Note: very important the app MUST come through BlackBerry World.
    Note: if it says download failed retry, either wait. Or press cancel. Close appworld. Disable wifi. Reopen appworld. Reapply the SKU. If it immediately shows a Retry button, press cancel the previous attempt and close BlackBerry World and repeat (don't press retry). Eventually it works for most people.
    - Put the SKU in for one of your Inapp items (com.x.game.id). It should appear but not let you buy it yet.

    Testing the app
    - Install the app (from BlackBerry World -> Very important)
    - Do an inapp purchase

    If you are sandboxed and you installed the app from the sandbox, inapp should work.
     
    Last edited: Oct 13, 2015
    Elkis and Wadjey like this.