IAP Plugin doesn't work - Blackberry Test

Bugs will be moved here once resolved.

Post » Fri Mar 07, 2014 10:26 am

Plugin isn't giving a success or failure

I have the plugin in test mode, and the app in sandbox mode on BBWorld.
The first step, We added product id and requested store listing.

Then, on store listing success -> print a debug
on store listing failure -> print a debug.

After this we have other conditions on whether user has purchased or if store is available or not.
Sadly, the first step of store listing is itself not working.
Should I be expect some message either success or failure... how do I live if it does nothing :)

Steps to Reproduce Bug

Observed Result
No success message nor failure message!

Expected Result
Some form of message to tell me what's happening or why is it failing.

Affected Browsers
NA

Operating System and Service Pack
NA

Construct 2 Version ID
158.2
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Fri Mar 07, 2014 12:45 pm

Updated to r163, although release notes suggests nothing new in IAP side.
Still doesnt work :/
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Mon Mar 10, 2014 7:37 am

Guys bump.
@ashley
@tom

Please help. This is holding up our release :(
Last edited by krish on Mon Mar 10, 2014 7:00 pm, edited 1 time in total.
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Mon Mar 10, 2014 6:59 pm

Sigh... cry for help goes un-heard? even though this is holding up our release :(

Contacted @WaterlooErik and he took some painful amount of testing to see what the problem is.
Sent me a procedure.. I will try and let you guys know how it works.
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Tue Mar 11, 2014 4:33 pm

The piece I'm unsure of is the initial setup. From the docs:

  1. On start of layout, use the Add product ID action to add the product IDs you will be using, e.g. "product1,product2,product3".
  2. After that (still in the 'Start of layout' event), use the Request store listing action. This starts downloading the names and prices of the given products. Some platforms require this information to be available for the IAP features to work.
  3. When On store listing success triggers, the product names and prices are available, and purchases can start being made or checked with the Has product condition.

With respect to BlackBerry 10; does the Product ID refer to:
  1. The numeric, auto-assigned (by Vendor Portal) Product ID
  2. The user-defined Product Name
  3. The user-defined Product SKU

I'm assuming we actually want the Product SKU since the majority of BlackBerry Payment APIs are based on the SKU, but was hoping someone could confirm.

Also, what is the exact function of Request Store Listing? The closest BlackBerry Payment API I can identify would be GetExistingPurchases. And does that mean that this function uses the Product IDs specified in the first step to bring down local information on each of those? Does this create a WebStorage (or other local) object that gets referenced for the Has Product and similar calls?

Ultimately, I'm hoping someone could elaborate on the specific functionality of configuring the IAP Object and how it applies to the BlackBerry 10 platform.
B
4
S
1
Posts: 79
Reputation: 808

Post » Tue Mar 11, 2014 4:52 pm

@WaterlooErik - you can look at the code yourself in <install directory>\exporters\html5\plugins\iap\runtime.js. The Blackberry implementation is implemented with the Blackberry10Store class.

The product ID is passed as "digitalGoodID" to the purchase() method. 'Request store listing' requests item prices and also calls getExistingPurchases() to identify what products are already owned (since unlike most other stores there's not a method to check if a particular product is owned already). The documentation and samples around the BB10 purchases were not great last time I checked, would be good if you could review the code @WaterlooErik and let me know if there's anything amiss. It's difficult for us to test without publishing all the way to the store, where you can't then debug it.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Tue Mar 11, 2014 6:38 pm

Ashley wrote:The product ID is passed as "digitalGoodID" to the purchase() method.


So that makes it the numerical "id" of the virtual good and not the SKU?



It's difficult for us to test without publishing all the way to the store, where you can't then debug it.


I am currently in middle publishing, stuck with this problem.
You want to me to run some checks? I'd be glad to do so.
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Tue Mar 11, 2014 6:50 pm

Yeah, maybe try the numerical ID instead? I'm not sure why there would be more than one ID per item.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Wed Mar 12, 2014 3:49 am

I was using numerical ids the whole last week, and it didn't work.
Only on the last 2 builds I tested yesterday, I've been using SKUs as a trail to see if that works.... since SKU is also unique on BBWorld and so is id.

It would have been really helpful if some sort of error was being captured in IAP.ErrorMessage or IAP.Debug? ... having nothing is clueless and headless beating behind the bush for us. :)
B
21
S
6
G
5
Posts: 391
Reputation: 5,662


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests