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

Native Development

Reply
Contributor
Posts: 19
Registered: ‎03-19-2012
My Device: playbook
My Carrier: movistar

Questions about Payment Service.

Hi..

 

I'm trying to test my code wich uses the paymentservice API, I have a couple of questions:

 

- How do I "match" my app to the app created in the "Vendor Portal"? I have a "package ID" in my bar-descriptor.xml, in the form of 'com.example.appname', but I don't see a similar field in the vendor portal. The "SKU" doesn't allow dots, so that's not it, and the description for the "Name" fields says it's displayed in the storefront, so that's not it either.

- The paymentservice API mentions a product ID and an SKU for the virtual goods. But when I create the goods in the Vendor Portal, I see the SKU field, but no ID, only a "Name" (which also seems to appear in the storefront). Where do I set the ID for the product?

- When I use the "local" mode to test transactions, the "Already purchased" value seems to be an error status, so I can't use the "get_digital_good_id" method on the event (returns NULL). Is this a bug? Most micro-transaction APIs treat the "already purchased" value as a non-error status.

 

Thanks!

 

Contributor
Posts: 19
Registered: ‎03-19-2012
My Device: playbook
My Carrier: movistar

Re: Questions about Payment Service.

Update: I figured out that the ID is automatically assigned when I create the virtual good, so ignore my second question.

 

Still, when I run my code in non-local mode, the call to paymentservice_purchase_request returns inmediatelly with an error, and errno is 2, ENOENT, "No such file or directory". What file is it trying to open? I think I still need it to somehow connect the app that's running with the app that's created in the App portal. Any help?

 

Thanks.

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Questions about Payment Service.

How did you install your app for testing? If not through App World via the developer sandbox then you would be unable to test non-local mode. Local mode is generally how devs are expected to test until the application is ready to go live.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 19
Registered: ‎03-19-2012
My Device: playbook
My Carrier: movistar

Re: Questions about Payment Service.


gbeukeboom wrote:

How did you install your app for testing? If not through App World via the developer sandbox then you would be unable to test non-local mode. Local mode is generally how devs are expected to test until the application is ready to go live.



Is there a different App World for this? I added my ID to the sandbox users, and I uploaded a release for the application, but it's not showing up in the normal App world, should it be among all the "normal" apps? My product is still in "draft", is that ok? (I can't go live before I test the virtual goods stuff).

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Questions about Payment Service.

The following page explains how you can get access to your application via your sandbox account:

https://bdsc.webapps.blackberry.com/air/documentation/ww_air_services/testing_your_application_air_m...

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 19
Registered: ‎03-19-2012
My Device: playbook
My Carrier: movistar

Re: Questions about Payment Service.

Hi, thanks for the link, I was able to open it earlier, but now it's broken. Has it been relocated?

 

Anyway, if I install through App World, doesn't that mean I won't be able to run my app inside the debugger or even look at the console output? Isn't there a way to do that? This is the part of the app that takes real money from the users, I can't release it without thoroughly testing it first.

 

Thanks.

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Questions about Payment Service.

Looks like the link broke, I have reported it for investigation.

 

For testing purposes you can simulate purchases locally before moving to real purchases through App World. If you need to test real purchases then you could still use a test version of the app that writes out to a log on the shared file system which you can access later, but be sure to turn this off before publishing for sale.

Garett
@garettBeuk
--
Goodbye everybody!