Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 51
Registered: ‎10-22-2011
My Device: 9800
My Carrier: Telus

In app purchase testing on PlayBook using sandbox accounts

[ Edited ]

I eventually managed to get my DRAFT app downloaded from App World onto my PlayBook under a sandbox account.   Any attempt to load existing purchases returns with an error "Unable to access Payment Service on this device" - the same error I see when side-loading.   Has anybody managed to test IAP on PlayBook using sandbox accounts?   Given local mode doesn't work post-2.0 in my experience, launching appears to be a case of "Hope and Pray".

 

My main reason for asking is I have seen some claims that this feature doesn't work and would like confirmation either way.

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: In app purchase testing on PlayBook using sandbox accounts

Hi there,

When in sandbox mode, the App World servers do not cache your purchases, so getExistingPurchases will not return anything; you have that right.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 51
Registered: ‎10-22-2011
My Device: 9800
My Carrier: Telus

Re: In app purchase testing on PlayBook using sandbox accounts

[ Edited ]

Aware of that but everything seems to return that I cannot access payment servers.   Actually, I just retested and I'm no longer getting the cannot access Payment Service message - I'm guessing the server was lagging the update.   Annoying but had the same problem on Google Play. 

 

Interestingly getExistingPurchases isn't just returning (calling back with) an empty set but is instead not calling back at all (error or otherwise).   Do you know if that is expected?  It truly screws up my program as it needs to know what options to offer the user prior to showing the first screen.

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: In app purchase testing on PlayBook using sandbox accounts

As far as I know, the callback should always trigger regardless. Do you happen to have some sample source you could share?

 

Also, just to double-check, are you deploying directly to the device through USB/WiFi or are you downloading your application through App World's sandbox? (You'll need to do the latter.) If you do have any previous side-loaded versions, I would recommend removing them.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 51
Registered: ‎10-22-2011
My Device: 9800
My Carrier: Telus

Re: In app purchase testing on PlayBook using sandbox accounts

Thanks - that was my expectation as well.   Unfortunately the code is all tied into a larger bundle of code.   Right now I'm setting up a timeout so if I don't get the callback quickly I can at least notify the user of the error and show a basic options list.   Better than the current blank screen.  To say this is a bad solution is an understatement.  The App works correctly in local mode (at least on the 1.7 simulator - local mode doesn't work under 2.0 - jira filed) and it works properly when sideloaded in the sense it gets and responds to the failure callback.

 

I loaded through appworld (TST followed by going into the browser and opening the appworld content link for the app).   I had removed the side-loaded versions prior to doing that.