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
Puzzling
Posts: 51
Registered: ‎10-22-2011
My Device: 9800

In-app purchase cancelled status

Webworks on PB.  I just went back and retested my in-app purchase code.  This was working under 1.7 but now I'm getting a payment failure with message "The payment process has been cancelled."  I am using development mode for payment calls.   I'm getting this with two devices running different versions of PB2.   I'm also getting this with the payment sample application.   However, everything works fine on the 1.7 simulator.   Has anybody else seen this?   Did it work when you went to the live servers?

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

Re: In-app purchase cancelled status

Are you testing in Sandbox mode? Live or network testing? How was the app installed?

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Puzzling
Posts: 51
Registered: ‎10-22-2011
My Device: 9800

Re: In-app purchase cancelled status

Not sure what you mean by sandbox mode - using window.blackberry.payment.developmentMode=true, if that helps.  Software was loaded over local WiFi using the SDK tools (BarDeploy.jar). 

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

Re: In-app purchase cancelled status

Ah ok, that is the came as local testing :smileyhappy:.

Do you get a dialog before the issue occurs?

What version of the WebWorks SDK is being used?

Can you provide a snippet of code that can be used to reproduce the issue?

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Puzzling
Posts: 51
Registered: ‎10-22-2011
My Device: 9800

Re: In-app purchase cancelled status

As I said, I get this with the payment sample application.  It works under 1.7 (currently only simulator) but fails on the 2.0 devices.  The dialog flow is slightly different in the two cases.   In the working case, I get the regular purchase dialog showing the purchase, app, price, payment method, account and "Cancel" or "Buy Now" buttons.  When I click "Buy Now" I get what appears to be a test mode dialog for the Transaction ID, License Key, and allowing me to select the Response (Success, User Cancelled or various errors).   When I select Success and click Okay, the sample app shows the purchased item in the history.     In the non-working case, on the 2.0 devices, the two dialogs come up in the opposite order!  I just noticed this now or I would have mentioned it earlier.   Flicking Okay and Buy Now, results in a message of "onPaymentFailure: The payment process has been cancelled." in the sample application.   My own application sees a similar problem.

 

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

Re: In-app purchase cancelled status

What version of WebWorks SDK are you using? It would be worth upgrading to the latest to see if something may have changed.

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Puzzling
Posts: 51
Registered: ‎10-22-2011
My Device: 9800

Re: In-app purchase cancelled status

[ Edited ]

Using 2.2.0.5.  Is there something post 2.2.0.5 on PB?  Last time I looked, that was current on the web site.

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

Re: In-app purchase cancelled status

Nope, 2.2.0.5 is the right/current version.

 

I did some testing and found something strange:

The WebWorks implementation for PlayBook is based on AIR. The AIR sample application works as expected (returns success when testing) but with the WebWorks sample I get the same issue you have reported. This means that the issue lies with the AIR/JavaScript layer of WebWorks.

 

So something must have changed after OS 1.0.7 that has caused this issue.

 

I would recommend logging this issue here:

https://github.com/blackberry/WebWorks-TabletOS/issues

 

That's the place that the WebWorks developers will look for issues and work with you to fix.

 

Thanks for reporting!

 

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Puzzling
Posts: 51
Registered: ‎10-22-2011
My Device: 9800

Re: In-app purchase cancelled status

Thanks - will file.   Would I be correct in interpreting your comment as the suspect code is available in Github?  If so, I'll also take a look at it.

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

Re: In-app purchase cancelled status

Yes, it should be accessible in GitHub but you can also just open the WebWorks directoryon your computer and browse the source files directly there. 

 

ex C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\bbwp\ext

Garett
@garettBeuk
--
Goodbye everybody!